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_dfpd.DataFrame, optional

New task data. If None, uses data from initialization.

methodstr

Method used to fit the model. One of "mcmc", "map", "demz", "advi" or "fullrank_advi".

progressbarbool, optional

Show progress bar during sampling.

random_seedRandomState, optional

Random seed for reproducibility.

sample_kwargsdict, optional

Only used by the variational methods; forwarded to Approximation.sample.

**kwargs

Additional arguments passed to the underlying PyMC routine.

Returns:
xr.DataTree

Fitted model with posterior samples.