ExperimentResult#
- class pymc_marketing.mmm.experiment.ExperimentResult(result, experiment_type)[source]#
Wrapper around a CausalPy experiment result.
Provides convenience methods to access the causal effect estimates and convert them into the lift test DataFrame format expected by
MMM.add_lift_test_measurements().- Parameters:
- result
causalpyexperimentinstance The CausalPy experiment result (e.g.
InterruptedTimeSeries).- experiment_type
ExperimentType The type of experiment that was run.
- result
- Attributes:
- result
causalpyexperimentinstance The underlying CausalPy result object.
- experiment_type
ExperimentType The experiment type.
- result
Examples
from pymc_marketing.mmm.experiment import ExperimentResult, ExperimentType experiment_result = ExperimentResult( result=causalpy_result, experiment_type=ExperimentType.ITS, ) experiment_result.summary() df_lift = experiment_result.to_lift_test(channel="tv", x=1000.0, delta_x=200.0)
Methods
ExperimentResult.__init__(result, ...)ExperimentResult.effect_summary(**kwargs)Get a structured effect summary.
ExperimentResult.plot(**kwargs)Plot the experiment results.
Print a summary of the experiment results.
ExperimentResult.to_lift_test(channel, x, ...)Convert experiment results to a lift test DataFrame.
Attributes
idataAccess the ArviZ InferenceData object.