MMM.fit#

MMM.fit(X, y=None, progressbar=True, predictor_names=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 if sklearn is available, otherwise array, shape (n_obs, n_features)

The training input samples.

yarray_like if sklearn is available, otherwise array, shape (n_obs,)

The target values (real numbers).

progressbarbool

Specifies whether the fit progressbar should be displayed

predictor_names: Optional[List[str]] = None,

Allows for custom naming of predictors given in a form of 2dArray Allows for naming of predictors when given in a form of np.ndarray, if not provided the predictors will be named like predictor1, predictor2…

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
>>> :obj:`model` = :obj:`MyModel`\()
    ..
>>> :obj:`idata` = :obj:`model.fit`\(X,y)
    ..
Auto-assigning NUTS sampler…
Initializing NUTS using jitter+adapt_diag…