arviz.PyStan2SamplingWrapper#
- class arviz.PyStan2SamplingWrapper(model, idata_orig=None, log_lik_fun=None, is_ufunc=True, posterior_vars=None, sample_kwargs=None, idata_kwargs=None, log_lik_kwargs=None, apply_ufunc_kwargs=None)[source]#
PyStan (2.x) sampling wrapper base class.
See the documentation on
SamplingWrapper
for a more detailed description. An example ofPyStanSamplingWrapper
usage can be found in the Refitting PyStan (3.0+) models with ArviZ notebook. For usage examples of other wrappers see the user guide pages on Sampling wrappers.Warning
Sampling wrappers are an experimental feature in a very early stage. Please use them with caution.
See also
Methods
PyStan2SamplingWrapper.__init__
(model[, ...])Check that all methods listed are implemented.
Convert the fit object returned by
self.sample
to InferenceData.Retrieve the log likelihood of the excluded observations from
idata__i
.Resample the PyStan model stored in self.model on modified_observed_data.
Select a subset of the observations in idata_orig.