MMMModelBuilder.fit#
- MMMModelBuilder.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
ifsklearnisavailable,otherwisearray,shape(n_obs,n_features) The training input samples.
- yarray_like
ifsklearnisavailable,otherwisearray,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_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.
- Xarray_like
- Returns:
- self
az.InferenceData returns inference data of the fitted model.
Examples
>>> :obj:`model` = :obj:`MyModel`\() ..>>> :obj:`idata` = :obj:`model.fit`\(X,y) ..- Auto-assigning
NUTSsampler… InitializingNUTSusingjitter+adapt_diag…
- self