2929from pymc_marketing .utils import from_netcdf
3030
3131
32- # -----------------------------------------------------------------------------
3332def _load_df (path : str | Path ) -> pd .DataFrame :
3433 """
3534 Read a DataFrame from *path* based on extension.
@@ -53,13 +52,24 @@ def build_mmm_from_yaml(
5352 """
5453 Build an MMM model from *config_path*.
5554
55+ The configuration keys:
56+
57+ - `model` (required): MMM initialization parameters
58+ - `effects` (optional): list of additive effects in the model
59+ - `data` (optional): paths to X and y data
60+ - `original_scale_vars` (optional): list of original scale variables
61+ - `idata_path` (optional): path to inference data
62+
5663 Parameters
5764 ----------
5865 config_path : str | Path
59- YAML file following the schema described in factories.py.
60- X, y : pandas.DataFrame, optional
61- Pre-loaded covariate matrix and target vector. If omitted, the loader
62- tries to read them from paths in the YAML under `data:`.
66+ YAML file with model configuration.
67+ X : ~pandas.DataFrame, optional
68+ Pre-loaded covariate matrix. If omitted, the loader tries to read it
69+ from a path in the YAML under `data.X_path`.
70+ y : ~pandas.DataFrame, optional
71+ Pre-loaded target vector. If omitted, the loader tries to read it
72+ from a path in the YAML under `data.y_path`.
6373
6474 Returns
6575 -------
0 commit comments