ConsiderationSetMixedLogit.sample_posterior_predictive#
- ConsiderationSetMixedLogit.sample_posterior_predictive(choice_df=None, consideration_instruments=None, extend_idata=True, **kwargs)[source]#
Sample from posterior predictive, updating consideration instruments if needed.
- Parameters:
- choice_df
pd.DataFrame, optional New choice data for prediction. If None, uses training data. When provided,
consideration_instrumentsmust also be supplied with a Z_tilde whose first dimension matches the new DataFrame.- consideration_instruments
ConsiderationInstruments, optional New consideration instruments. If None, uses training instruments.
- extend_idatabool, optional
Whether to add to self.idata.
- **kwargs
Additional arguments for pm.sample_posterior_predictive.
- choice_df
- Returns:
xr.DataTreePosterior predictive samples.