arviz.PyMCSamplingWrapper#

class arviz.PyMCSamplingWrapper(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]#

PyMC (4.0+) sampling wrapper base class.

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

Warning

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

Methods

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

PyMCSamplingWrapper.check_implemented_methods(methods)

Check that all methods listed are implemented.

PyMCSamplingWrapper.get_inference_data(...)

Return sampling result without modifying.

PyMCSamplingWrapper.log_likelihood__i(...)

Get the log likelilhood samples \(\log p_{post(-i)}(y_i)\).

PyMCSamplingWrapper.sample(...)

Update data and sample model on modified_observed_data.

PyMCSamplingWrapper.sel_observations(idx)

Select a subset of the observations in idata_orig.