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 parsedcost_per_unitDataArray intoidata.constant_data.- Parameters:
- X
pd.DataFrameorxr.Datasetorxr.DataArray Training input samples.
- y
pd.Seriesorxr.DataArrayornp.ndarrayorNone Target values.
- progressbarbool, optional
Whether to show the progress bar.
- random_seed
RandomState, optional Random seed for reproducibility.
- **kwargs
Any Additional keyword arguments passed to the sampler.
- X
- Returns:
az.InferenceDataInference data of the fitted model.