ExperimentDesigner.from_idata#

classmethod ExperimentDesigner.from_idata(idata, saturation='logistic', adstock='geometric')[source]#

Create an ExperimentDesigner from a saved InferenceData fixture.

This constructor is useful for demos and testing when a fitted MMM object is not available. The InferenceData must contain posterior samples and metadata in constant_data.

Parameters:
idataInferenceData

An ArviZ InferenceData containing posterior samples with variables saturation_lam, saturation_beta, and adstock_alpha (with a channel dimension), plus constant_data with current_weekly_spend, residual_std, l_max, and normalize.

saturationstr

Saturation function type. Currently only "logistic" is supported.

adstockstr

Adstock function type. Currently only "geometric" is supported.

Returns:
ExperimentDesigner

A configured designer ready for recommend().