MMM.fit#

MMM.fit(X, y=None, progressbar=None, random_seed=None, **kwargs)[source]#

Fit the model and inject cost_per_unit metadata if provided.

Delegates to the parent fit() and then injects the parsed cost_per_unit DataArray into idata.constant_data.

Parameters:
Xpd.DataFrame or xr.Dataset or xr.DataArray

Training input samples.

ypd.Series or xr.DataArray or np.ndarray or None

Target values.

progressbarbool, optional

Whether to show the progress bar.

random_seedRandomState, optional

Random seed for reproducibility.

**kwargsAny

Additional keyword arguments passed to the sampler.

Returns:
az.InferenceData

Inference data of the fitted model.