Skip to main content
Version: Latest

reward_model

reward_model performs attribution from aggregated signals using a movement/coherence-based reward baseline. It uses the same D_variables and D_measures structure as auto_mmm.

At a high level, auto_mmm estimates predictive contribution with the automatic MMM engine, while reward_model estimates contribution from movement coherence between signals and the target.

Input structure

Data should contain:

  • a timestamp column
  • one target column mapped to "target" in D_variables
  • one or more signal columns mapped to their final channel names

D_variables maps each column in Data to either the target or a channel name.

D_measures maps each non-target input column to its measure type.

Parameters

PARAMETERTYPEDEFAULTDESCRIPTION
Datadata.frameAggregated dataset with timestamp, target, and input signal columns.
D_variablesdictionary / listMapping from each input column to "target" or to its final channel name.
D_measuresdictionary / listMapping from each non-target input column to its measure type.
max_pint12Maximum lag length considered when the model evaluates delayed effects.
seedint1234567Random seed for reproducible results.
verboseint / bool1Controls runtime logging.
serverstr / list[str]app.channelattribution.ioServer endpoint used by the hosted computation service.
passwordstrNULL / NoneAuthentication token for the hosted service.
return_diagnosticsboolFALSE / FalseIf enabled, returns attribution together with diagnostic objects for advanced inspection.

Output

If return_diagnostics = FALSE, the function returns an attribution data frame.

If return_diagnostics = TRUE, the function returns a list/dict containing:

OUTPUTTYPEDESCRIPTION
attributiondata.frameChannel attribution by time period.
base_rawdata.frame / objectRaw baseline attribution output before final adjustments.
score_multiplierdata.frame / objectScore multiplier information used during attribution assembly.
applied_score_multiplierdata.frame / objectEffective multiplier applied to the returned attribution.
modestrExecution mode metadata.
diagnosticslist / dictAdditional diagnostics intended for advanced inspection.