build_mmm_from_yaml#
- pymc_marketing.mmm.builders.yaml.build_mmm_from_yaml(config_path, *, X=None, y=None)[source]#
Build an MMM model from config_path.
The configuration keys:
model(required): MMM initialization parameterseffects(optional): list of additive effects in the modeldata(optional): paths to X and y dataoriginal_scale_vars(optional): list of original scale variablesidata_path(optional): path to inference data
- Parameters:
- config_path
str|Path YAML file with model configuration.
- X
pandas.DataFrame, optional Pre-loaded covariate matrix. If omitted, the loader tries to read it from a path in the YAML under
data.X_path.- y
pandas.DataFrame|pandas.Series, optional Pre-loaded target vector. If omitted, the loader tries to read it from a path in the YAML under
data.y_path.
- config_path
- Returns:
- model
MMM
- model