create_new_spend_data#
- pymc_marketing.mmm.utils.create_new_spend_data(spend, adstock_max_lag, one_time, spend_leading_up=None)[source]#
Create new spend data for the channel forward pass.
Spends must be the same length as the number of channels.
(
Source code
,png
,hires.png
,pdf
)- Parameters:
spend (np.ndarray) – The spend data for the channels.
adstock_max_lag (int) – The maximum lag for the adstock transformation.
one_time (bool, optional) – If the spend is one-time, by default True.
spend_leading_up (np.ndarray, optional) – The spend leading up to the first observation, by default None or 0.
- Returns:
The new spend data for the channel forward pass.
- Return type:
np.ndarray