BaseMMM.fit#
- BaseMMM.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:
X (array-like if sklearn is available, otherwise array, shape (n_obs, n_features)) – The training input samples.
y (array-like if sklearn is available, otherwise array, shape (n_obs,)) – The target values (real numbers).
progressbar (bool) – 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_seed (Optional[RandomState]) – Provides sampler with initial random seed for obtaining reproducible samples
**kwargs (Any) – Custom sampler settings can be provided in form of keyword arguments.
- Returns:
self – returns inference data of the fitted model.
- Return type:
az.InferenceData
Examples
>>> model = MyModel() >>> idata = model.fit(X,y) Auto-assigning NUTS sampler... Initializing NUTS using jitter+adapt_diag...