SensitivityAnalysis#

class pymc_marketing.mmm.sensitivity_analysis.SensitivityAnalysis(mmm)[source]#

SensitivityAnalysis class is used to perform counterfactual analysis on MMM’s.

Methods

SensitivityAnalysis.__init__(mmm)

Initialize the SensitivityAnalysis with a reference to the MMM instance.

SensitivityAnalysis.compute_marginal_effects(...)

Compute marginal effects via finite differences from the sweep results.

SensitivityAnalysis.create_intervention(...)

Apply the intervention to the predictors.

SensitivityAnalysis.run_sweep(var_names, ...)

Run the model's predict function over the sweep grid and store results.