arviz.PyStanSamplingWrapper

class arviz.PyStanSamplingWrapper(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 (3.0+) sampling wrapper base class.

See the documentation on SamplingWrapper for a more detailed description. An example of PyStan3SamplingWrapper usage can be found in the pystan3_refitting notebook.

Warning

Sampling wrappers are an experimental feature in a very early stage. Please use them with caution.

Methods

PyStanSamplingWrapper.__init__(model[, ...])

PyStanSamplingWrapper.check_implemented_methods(methods)

Check that all methods listed are implemented.

PyStanSamplingWrapper.get_inference_data(...)

Convert the fit object returned by self.sample to InferenceData.

PyStanSamplingWrapper.log_likelihood__i(...)

Retrieve the log likelihood of the excluded observations from idata__i.

PyStanSamplingWrapper.sample(...)

Rebuild and resample the PyStan model on modified_observed_data.

PyStanSamplingWrapper.sel_observations(idx)

Select a subset of the observations in idata_orig.