FrequencyReachAdditiveEffect.set_data#

FrequencyReachAdditiveEffect.set_data(mmm, model, X)[source]#

Update reach & frequency data for prediction (e.g. future) dates.

Zero-fills any dates in model.coords["date"] that are beyond the historical data in df_frequency_reach. Does not mutate the stored DataFrame; construct a new effect instance if historical data change.

Parameters:
mmmModel

The parent MMM instance.

modelpm.Model

The PyMC model whose pm.Data nodes will be updated.

Xxr.Dataset

The predictor dataset for the prediction window (used to read the new date coordinate).