TemporalReach#
- class pymc_marketing.mmm.spend_reach.TemporalReach(additional_carryover_lags, requires_full_axis)[source]#
How much of the date axis a change in spend moves one node over.
Measured by
SpendProbe.measure()rather than taken on trust, because a node that reaches further than the evaluation window would have its tail cut off and the increment would come back quietly low. Measured per node, so that one effect’s long tail cannot be held against another effect’s honest declaration of a short one.- Parameters:
- additional_carryover_lags
int Periods beyond the model’s own
adstock.l_maxover which the node still moves after a change in spend at a single date. Exact for a reach the axis could bound; a lower bound alongsiderequires_full_axis, where all the probe established is that the tail had not ended by the last fitted date.- requires_full_axisbool
Whether the node has to be evaluated on the complete fitted date axis. True when a perturbation still moves the far end of the axis (reach longer than the axis can show), or moves dates before the perturbed one – the signature of a reduction over
date, which takes a different value on a truncated axis and so cannot be windowed at all.
- additional_carryover_lags
Methods
TemporalReach.full_axis([...])Return the reach of a node no window can reproduce.
Return the reach of a node a change in spend does not move.
TemporalReach.widest(reaches)Combine per-node reaches into the one an evaluation has to satisfy.
Attributes
additional_carryover_lagsrequires_full_axis