MMMModelBuilder.fit#

MMMModelBuilder.fit(X, y=None, progressbar=None, random_seed=None, **kwargs)#

Fit a model using the data passed as a parameter.

Sets attrs to inference data of the model.

Parameters:
Xarray_like | array, shape (n_obs, n_features)

The training input samples. If scikit-learn is available, array-like, otherwise array.

yarray_like | array, shape (n_obs,)

The target values (real numbers). If scikit-learn is available, array-like, otherwise array.

progressbarbool, optional

Specifies whether the fit progress bar should be displayed. Defaults to True.

random_seedOptional[RandomState]

Provides sampler with initial random seed for obtaining reproducible samples.

**kwargsAny

Custom sampler settings can be provided in form of keyword arguments.

Returns:
selfaz.InferenceData

Returns inference data of the fitted model.

Examples

>>> model = MyModel()
>>> idata = model.fit(X,y)
Auto-assigning NUTS sampler...
Initializing NUTS using jitter+adapt_diag...