Skip to main content
Version: Latest

uam

uam combines aggregated attribution and customer journey attribution in a single workflow.

If df_paths is not provided, uam returns the aggregated attribution baseline. If df_paths is provided, uam combines the aggregated baseline with Markov conversion-rate information from customer journeys. The public UAM workflow currently uses auto_mmm as its aggregated-data baseline and applies the current default scoring logic internally.

Input structure

df_aggr should contain:

  • a timestamp column
  • one target or conversions column mapped to "target" in D_variables
  • one or more aggregated signal columns

D_variables maps the target column to "target" and each signal column to its final channel name.

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

df_paths is optional. When supplied, it should contain customer journey paths with conversion counts and optional null-path counts, or another supported journey format compatible with var_path, var_conv, and var_null.

Parameters

PARAMETERTYPEDEFAULTDESCRIPTION
df_aggrdata.frameAggregated dataset with timestamp, target/conversions, and input signal columns.
D_variablesdictionary / listMapping from each aggregated column to "target" or to its final channel name.
D_measuresdictionary / listMapping from each non-target aggregated column to its measure type.
df_pathsdata.frameNULL / NoneOptional customer journey data used to blend aggregated and path-based attribution.
var_pathstr"path"Column containing serialized customer journeys when df_paths is provided.
var_convstr"total_conversions"Column containing conversions associated with each path.
var_nullstr"total_null"Column containing null-path counts when available.
max_pint12Maximum lag length considered in the aggregated baseline model.
nsimint1000Number of simulations used in the aggregated baseline model.
seedint1234567Random seed for reproducible results.
verboseint / bool1Controls runtime logging.
orderint1Markov model order used for the path-based component.
sepstr">"Path separator used inside serialized journey strings.
ncoreint1Number of cores used by the path-based computation.
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 returned list/dict may include:

OUTPUTTYPEDESCRIPTION
attributiondata.frameFinal channel attribution by time period.
parameters_mta_adjustedlist / dictAdjusted parameters used by the path-based component.
baseline_diagnosticslist / dictDiagnostics from the aggregated baseline model.
modestrExecution mode metadata.
raw_score_formulastr / objectDiagnostic information about the raw score formulation.