MaxDiffMixedLogit.fit#
- MaxDiffMixedLogit.fit(task_df=None, *, method='mcmc', progressbar=None, random_seed=None, sample_kwargs=None, **kwargs)[source]#
Fit the model and attach the result to
self.idata.Thin wrapper around
ModelFitter.fit(); see there for the full parameter reference.- Parameters:
- task_df
pd.DataFrame, optional New task data. If None, uses data from initialization.
- method
str Method used to fit the model. One of
"mcmc","map","demz","advi"or"fullrank_advi".- progressbarbool, optional
Show progress bar during sampling.
- random_seed
RandomState, optional Random seed for reproducibility.
- sample_kwargs
dict, optional Only used by the variational methods; forwarded to
Approximation.sample.- **kwargs
Additional arguments passed to the underlying PyMC routine.
- task_df
- Returns:
xr.DataTreeFitted model with posterior samples.