Skip to main content
Version: 3.19.1

uam

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

The aggregated baseline is now computed through the unified mmm_attribution engine. If df_paths is not provided, uam returns the aggregated baseline. If df_paths is provided, uam adjusts that baseline with Markov conversion-rate information from customer journeys.

Current UAM behavior

The current public behavior is a Markov-limited adjustment of the aggregated baseline:

baseline attribution from mmm_attribution
→ Markov conversion-rate signal from paths
→ channel-level adjustment multiplier
→ row normalization back to the baseline total

The diagnostic formula is:

baseline_model_times_channel_weighted_markov_norm

The public mode is:

adjusted_baseline

Input structure

df_aggr must contain:

  • a timestamp column, or enough information for the wrapper to create/resolve the timestamp internally;
  • the target column passed through target;
  • one or more aggregated signal columns.

target is required and must be the name of an existing column in df_aggr.

D_variables must contain one row per non-target signal variable and these columns:

COLUMNDESCRIPTION
variableName of the signal column in df_aggr.
channelFinal attribution channel associated with the signal. Multiple variables can map to the same channel.
measureMeasure label for the signal. Measure labels are free and do not need to belong to a predefined cap table.

df_paths is optional. When supplied, it can contain either:

  • already aggregated customer journey paths, with columns such as path, total_conversions, and optionally total_null; or
  • event-level customer journeys, with columns such as id_path, timestamp, and touchpoint.

For event-level journeys, the touchpoint column is expected to be named touchpoint.

Parameters

PARAMETERTYPEDEFAULTDESCRIPTION
df_aggrdata.frameAggregated dataset with timestamp, target, and input signal columns.
D_variablesdata.frame / tableTable with variable, channel, and measure columns.
targetstrrequiredName of the target column in df_aggr.
df_pathsdata.frameNULL / NoneOptional customer journey data used to adjust the aggregated baseline.
baseline_modelstr"reward"Baseline engine passed to mmm_attribution. Allowed public values are "reward", "copula", and "linear".
var_pathstr"path"Column containing serialized journeys when aggregated paths are provided.
var_convstr"total_conversions"Column containing conversions associated with each aggregated path.
var_nullstr"total_null"Column containing null-path counts when available.
channel_convstr"((CONV))"Conversion marker used in event-level customer journey data.
max_pint12Maximum lag length considered by the aggregated baseline.
nsimint1000Simulation parameter used by the copula baseline and kept for a consistent API.
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]hosted endpointServer endpoint used by the hosted computation service.
passwordstrNULL / NoneAuthentication token for the hosted service.
return_diagnosticsboolFALSE / FalseIf enabled, returns attribution together with diagnostic objects.

Legacy baseline_model aliases may still be accepted for compatibility, but new examples should use reward, copula, or linear.

Baseline-only mode

When df_paths = NULL / None, uam runs mmm_attribution internally and returns the baseline attribution.

Path-adjusted mode

When df_paths is provided, UAM:

  1. computes the aggregated baseline using mmm_attribution;
  2. runs markov_model(..., type="cr") on the path data;
  3. maps Markov path signals back to channels declared in D_variables;
  4. estimates a channel adjustment weight from path support and baseline/path alignment;
  5. applies a bounded channel-level multiplier to the baseline;
  6. normalizes each row back to the original baseline row total.

The current implementation does not perform a variable-aware row-by-row recomposition from raw variable attribution. It applies a final channel-level adjustment to the channel baseline.

Output

In the current public wrappers, uam returns a list/dict containing:

OUTPUTTYPEDESCRIPTION
attributiondata.frameFinal channel attribution by time period.

If return_diagnostics = TRUE, the returned list/dict may also include:

OUTPUTTYPEDESCRIPTION
baseline_modelstrResolved baseline model: reward, copula, or linear.
model_score_targetstrInternal automatic/blended score target mode.
parameters_mmmlist / dictDiagnostics from the mmm_attribution baseline.
parameters_baselinelist / dictAlias for baseline diagnostics.
parameters_mta_rawlist / dictRaw Markov output.
parameters_mta_adjusteddata.frame / objectChannel-level final Markov adjustment parameters.
parameters_mta_channel_measure_alignmentdata.frame / objectDiagnostic alignment between aggregated data and path support by channel/measure.
parameters_mta_channel_weightsdata.frame / objectChannel-level Markov blend weights.
parameters_mta_markov_blend_summarydata.frame / objectBaseline/final share comparison by channel.
modestrDiagnostic execution mode, such as <baseline_model>_baseline_markov_limited_adjustment.
mode_publicstrPublic mode label, such as adjusted_baseline.
row_sum_checklist / dictDiagnostics checking that row sums remain consistent after adjustment.