PeriodIncrements#

class pymc_marketing.mmm.incrementality.PeriodIncrements(periods, windows, reach, freq_offset)[source]#

Every period’s increment, before the periods are laid out together.

What the evaluation shared by every Incrementality method returns, so that each public method chooses its own layout without re-deriving what the evaluation established: stacked totals for compute_incremental_contribution(), a dense matrix for split_incremental_contribution_over_time(), and one band at a time for split_incremental_contribution_current_future().

Parameters:
  • periods (list[DataArray]) – One per period, in period order. Either the period’s total, with a length-one date dimension holding the period end, or its band: the per-date increment on realization_date over the period’s evaluated dates plus its unobserved tail, with a boolean observed coordinate.

  • windows (EvaluationWindows) – The windows the periods were evaluated over, in the same order.

  • reach (SpendReach) – What the probe measured about how far spend moves the evaluated nodes.

  • freq_offset (BaseOffset) – The data’s date frequency, as resolved and validated for the evaluation.

Methods

PeriodIncrements.__init__(periods, windows, ...)

Attributes