Makes MCMC samples from PyJAGS usable in ArviZ
Project description
pyjags_arviz
Makes MCMC samples from PyJAGS usable in ArviZ
Table of Contents
Installation
-
Install via PIP:
pip install pyjags_arviz
or
pip3 install pyjags_arviz
if not using Anaconda.
To get the latest version, clone the repository from github, open a terminal/command prompt, navigate to the root folder and install via
pip install .
or
pip3 install .
if not using Anaconda.
Usage
Import the function convert_pyjags_samples_dict_to_arviz_inference_data via
from pyjags_arviz import convert_pyjags_samples_dict_to_arviz_inference_data
Having sampled the from the posterior distribution using PyJAGS via
samples \ = jags_model.sample(...)
one can write
idata = convert_pyjags_samples_dict_to_arviz_inference_data(samples)
to convert the dictionary returned from PyJAGS to an ArviZ InferenceData object.
This object can be used in ArviZ to generate trace plots and compute diagnostics.
Trace plot:
az.plot_trace(idata)
Effective sample size:
az.ess(idata)
Gelman and Rubin statistic:
az.rhat(idata)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyjags_arviz-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 748f722ce3197422cc2bfe477faddce9ee2a64829f0d64ca60e1358f414f0266 |
|
MD5 | 1c30fa2d31b2c2925fa8522cb60f7e9f |
|
BLAKE2b-256 | 94058114f7d85d5057c3fd350a5d6345223104618f8ec197533e8cfe5955b458 |