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"inD_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
| PARAMETER | TYPE | DEFAULT | DESCRIPTION |
|---|---|---|---|
| Data | data.frame | Aggregated dataset with timestamp, target, and input signal columns. | |
| D_variables | dictionary / list | Mapping from each input column to "target" or to its final channel name. | |
| D_measures | dictionary / list | Mapping from each non-target input column to its measure type. | |
| max_p | int | 12 | Maximum lag length considered when the model evaluates delayed effects. |
| seed | int | 1234567 | Random seed for reproducible results. |
| verbose | int / bool | 1 | Controls runtime logging. |
| server | str / list[str] | app.channelattribution.io | Server endpoint used by the hosted computation service. |
| password | str | NULL / None | Authentication token for the hosted service. |
| return_diagnostics | bool | FALSE / False | If 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:
| OUTPUT | TYPE | DESCRIPTION |
|---|---|---|
| attribution | data.frame | Channel attribution by time period. |
| base_raw | data.frame / object | Raw baseline attribution output before final adjustments. |
| score_multiplier | data.frame / object | Score multiplier information used during attribution assembly. |
| applied_score_multiplier | data.frame / object | Effective multiplier applied to the returned attribution. |
| mode | str | Execution mode metadata. |
| diagnostics | list / dict | Additional diagnostics intended for advanced inspection. |