ArviZ is a Python package for exploratory analysis of Bayesian models

Overview

PyPI version Azure Build Status codecov Code style: black Gitter chat DOI DOI Powered by NumFOCUS

ArviZ

ArviZ (pronounced "AR-vees") is a Python package for exploratory analysis of Bayesian models. Includes functions for posterior analysis, data storage, model checking, comparison and diagnostics.

ArviZ in other languages

ArviZ also has a Julia wrapper available ArviZ.jl.

Documentation

The ArviZ documentation can be found in the official docs. First time users may find the quickstart to be helpful. Additional guidance can be found in the usage documentation.

Installation

Stable

ArviZ is available for installation from PyPI. The latest stable version can be installed using pip:

pip install arviz

ArviZ is also available through conda-forge.

conda install -c conda-forge arviz

Development

The latest development version can be installed from the main branch using pip:

pip install git+git://github.com/arviz-devs/arviz.git

Another option is to clone the repository and install using git and setuptools:

git clone https://github.com/arviz-devs/arviz.git
cd arviz
python setup.py install

Gallery

Ridge plot Parallel plot Trace plot Density plot
Posterior plot Joint plot Posterior predictive plot Pair plot
Energy Plot Violin Plot Forest Plot Autocorrelation Plot

Dependencies

ArviZ is tested on Python 3.6, 3.7 and 3.8, and depends on NumPy, SciPy, xarray, and Matplotlib.

Citation

If you use ArviZ and want to cite it please use DOI

Here is the citation in BibTeX format

@article{arviz_2019,
  doi = {10.21105/joss.01143},
  url = {https://doi.org/10.21105/joss.01143},
  year = {2019},
  publisher = {The Open Journal},
  volume = {4},
  number = {33},
  pages = {1143},
  author = {Ravin Kumar and Colin Carroll and Ari Hartikainen and Osvaldo Martin},
  title = {ArviZ a unified library for exploratory analysis of Bayesian models in Python},
  journal = {Journal of Open Source Software}
}

Contributions

ArviZ is a community project and welcomes contributions. Additional information can be found in the Contributing Readme

Code of Conduct

ArviZ wishes to maintain a positive community. Additional details can be found in the Code of Conduct

Donations

ArviZ is a non-profit project under NumFOCUS umbrella. If you want to support ArviZ financially, you can donate here.

Sponsors

NumFOCUS

Comments
  • Use xarray throughout

    Use xarray throughout

    There have been proposals to use xarray as a common language for pymc3, pystan, and pymc4. This library might be a good place to start that by implementing utility functions for translating pymc3's Multitrace and pystan's OrderedDict into xarray objects, and then having all plotting functions work with xarrays.

    opened by ColCarroll 42
  • Model comparison issue:

    Model comparison issue: "Found several log likelihood arrays var_name cannot be None"

    Hi community, I have two models that I would like to compare using LOO and WAIC.

    Model 1:

    with pm.Model() as Model_1:
        α_v = pm.HalfCauchy('α_v',2)
        α_a = pm.HalfCauchy('α_a', 2) 
        α_max_ampl = pm.HalfCauchy('α_max_ampl',2)  
        α_tau = pm.HalfCauchy('α_tau', 2)     
        α_ter = pm.HalfCauchy('α_ter', 2)  
        
        β = pm.Normal('β', 0.334, 0.1)
    
        γ_v = pm.Normal('γ_v', params_group[-1,0], .1)
        γ_a = pm.Normal('γ_a', params_group[-1,1], .1) 
        γ_ter = pm.Normal('γ_ter', params_group[-1, 2], .1)     
        γ_max_ampl = pm.Normal('γ_max_ampl', params_group[-1,3], .1)
        γ_tau = pm.Normal('γ_tau', params_group[-1,4], .1)     
    
        μ_v = -α_v*pm.math.exp(-β*Age_years_group) + γ_v
        μ_a = α_a*pm.math.exp(-β*Age_years_group) + γ_a      
        μ_max_ampl = α_max_ampl*pm.math.exp(-β*Age_years_group) + γ_max_ampl
        μ_tau = α_tau*pm.math.exp(-β*Age_years_group) + γ_tau 
        μ_ter = α_ter*pm.math.exp(-β*Age_years_group) + γ_ter     
        
        σ_v = pm.HalfNormal('σ_v', .1)
        σ_a = pm.HalfNormal('σ_a', .1)
        σ_max_ampl = pm.HalfNormal('σ_max_ampl', .1)
        σ_tau = pm.HalfNormal('σ_tau', .1)      
        σ_ter = pm.HalfNormal('σ_ter', .1)     
        
        y_v = pm.Normal('y_v', μ_v, σ_v, observed=params_group[:, 0])    
        y_a = pm.Normal('y_a', μ_a, σ_a, observed=params_group[:, 1])     
        y_ter = pm.Normal('y_ter', μ_ter, σ_ter, observed=params_group[:, 2]) 
        y_max_ampl = pm.Normal('y_max_ampl', μ_max_ampl, σ_max_ampl, observed=params_group[:, 3])     
        y_tau = pm.Normal('y_tau', μ_tau, σ_tau, observed=params_group[:, 4])     
    
    

    Model_2:

    with pm.Model() as Model_2:
        α_v = pm.HalfCauchy('α_v',2)
        α_a = pm.HalfCauchy('α_a', 2) 
        α_max_ampl = pm.HalfCauchy('α_max_ampl',2)  
        α_tau = pm.HalfCauchy('α_tau', 2)     
        α_ter = pm.HalfCauchy('α_ter', 2)  
        
        β_v = pm.Normal('β_v', 0.334, 0.1)#Kail (1991)
        β_a = pm.Normal('β_a', 0.334, 0.1)#Kail (1991)
        β_max_ampl = pm.Normal('β_max_ampl', 0.334, 0.1)#Kail (1991)
        β_tau = pm.Normal('β_tau', 0.334, 0.1)#Kail (1991)
        β_ter = pm.Normal('β_ter', 0.334, 0.1)#Kail (1991)
          
        #asymptote (get the mean value of adults)
        γ_v = pm.Normal('γ_v', params_group[-1,0], .1)
        γ_a = pm.Normal('γ_a', params_group[-1,1], .1) 
        γ_ter = pm.Normal('γ_ter', params_group[-1, 2], .1)     
        γ_max_ampl = pm.Normal('γ_max_ampl', params_group[-1,3], .1)
        γ_tau = pm.Normal('γ_tau', params_group[-1,4], .1)     
    
        μ_v = -α_v*pm.math.exp(-β_v*Age_years_group) + γ_v
        μ_a = α_a*pm.math.exp(-β_a*Age_years_group) + γ_a      
        μ_max_ampl = α_max_ampl*pm.math.exp(-β_max_ampl*Age_years_group) + γ_max_ampl
        μ_tau = α_tau*pm.math.exp(-β_tau*Age_years_group) + γ_tau 
        μ_ter = α_ter*pm.math.exp(-β_ter*Age_years_group) + γ_ter     
        
        σ_v = pm.HalfNormal('σ_v', .1)
        σ_a = pm.HalfNormal('σ_a', .1)
        σ_max_ampl = pm.HalfNormal('σ_max_ampl', .1)
        σ_tau = pm.HalfNormal('σ_tau', .1)      
        σ_ter = pm.HalfNormal('σ_ter', .1)     
        
        y_v = pm.Normal('y_v', μ_v, σ_v, observed=params_group[:, 0])    
        y_a = pm.Normal('y_a', μ_a, σ_a, observed=params_group[:, 1])     
        y_ter = pm.Normal('y_ter', μ_ter, σ_ter, observed=params_group[:, 2]) 
        y_max_ampl = pm.Normal('y_max_ampl', μ_max_ampl, σ_max_ampl, observed=params_group[:, 3])     
        y_tau = pm.Normal('y_tau', μ_tau, σ_tau, observed=params_group[:, 4])           
    

    I thus tried to compute:

    compare_dict = {Model_1: trace, Model_2: trace_2}
    compare_LOO = az.compare(compare_dict) 
    
    

    and got the following error:

    Traceback (most recent call last):
    
      File "<ipython-input-35-26e3f30f8929>", line 1, in <module>
        compare_LOO = az.compare(compare_dict)
    
      File "C:\Users\mservant\Anaconda3\lib\site-packages\arviz\stats\stats.py", line 211, in compare
        ics = ics.append([ic_func(dataset, pointwise=True, scale=scale)])
    
      File "C:\Users\mservant\Anaconda3\lib\site-packages\arviz\stats\stats.py", line 646, in loo
        log_likelihood = _get_log_likelihood(inference_data, var_name=var_name)
    
      File "C:\Users\mservant\Anaconda3\lib\site-packages\arviz\stats\stats_utils.py", line 412, in get_log_likelihood
        "Found several log likelihood arrays {}, var_name cannot be None".format(var_names)
    
    TypeError: Found several log likelihood arrays ['y_v', 'y_a', 'y_ter', 'y_max_ampl', 'y_tau'], var_name cannot be None
    

    Could you please help me solve this issue ? I am confused because I could compute LOO and WAIC using a previous version of arviz.

    opened by mservantufc 41
  • Improved tooltip information for bokeh pair_plot

    Improved tooltip information for bokeh pair_plot

    Description

    Checklist

    • [x] Follows official PR format
    • [ ] Includes a sample plot to visually illustrate the changes (only for plot-related functions)
    • [ ] New features are properly documented (with an example if appropriate)?
    • [ ] Includes new or updated tests to cover the new feature
    • [ ] Code style correct (follows pylint and black guidelines)
    • [ ] Changes are listed in changelog

    Added improved tooltip parameters to bokeh backend files of plots To fix #952

    opened by amukh18 40
  • Initial prototype of plot_lm

    Initial prototype of plot_lm

    Description

    This PR and #1747 summarizes my work done in Google Summer of Code 2021. I added 2 plots, plot_lm and plot_ts. The first one is covered in this PR and the next one in #1747. The project workflow was like this:

    1. Started with a high-level design: Discussed the user API function with the mentors and other community members. Discussion includes input variable names, accepted datatypes, accepted values and other input details. Also showed a sample output visualization. Once it was approved, I moved on to opening this PR. This Github Gist shows the design and some discussions related to it. The design process took an initial week.

    2. Submitted a prototype: This PR was earlier a prototype. This step is basically implementing the design decision made in the previous step. In addition to the user API, backend functions are also added. As ArviZ uses 2 backends, artist functions for both of them were added. This step took another week.

    3. Improved it according to reviews: In this step, mentors review your code to provide feedback and improvement tips. Learned the best code practices in this step. Ideally, improving never ends. It is important to maintain the added code after it is merged to keep it bug-free. I aim to provide support after GSoC. This step was a bit lengthy and complex and thus took 2 weeks.

    4. Tested the functionality: Added unit tests using pytest. Aimed and achieved to cover all of the added functionality under tests. Similar to step 2, added tests for both of the backends. Also, solved some simple to complex bugs that arise while testing. This step took another week.

    5. Added examples: Examples are added to the docstring as well as to the examples folder. Please check out the files changed tab to know more about this step. This step was quick, took only half a week.

    6. Added documentation: If you want to know how to use plot_lm, checkout out this blog. However, if you want to go on a low level to know the working in detail, I would suggest taking a look over the docstring in ArviZ docs and probably follow the comments sequentially. Another week was consumed in this step.

    Output : image

    Checklist

    • [x] Follows official PR format
    • [x] Includes a sample plot to visually illustrate the changes (only for plot-related functions)
    • [x] New features are properly documented (with an example if appropriate)?
    • [x] Includes new or updated tests to cover the new feature
    • [x] Code style correct (follows pylint and black guidelines)
    • [ ] Changes are listed in changelog
    opened by utkarsh-maheshwari 38
  • [WIP] Start adding Dask support

    [WIP] Start adding Dask support

    Description

    Start adding Dask compatibility starting from diagnostics/stats ufuncs.

    Checklist

    • [x] Follows official PR format
    • [x] New features are properly documented (with an example if appropriate)?
    • [ ] Includes new or updated tests to cover the new feature
    • [ ] Code style correct (follows pylint and black guidelines)
    • [ ] Changes are listed in changelog
    opened by nitishp25 36
  • Explain sample_stats naming convention

    Explain sample_stats naming convention

    Description

    fixes #1053

    Checklist

    • [x] Does the PR follow official PR format?
    • [x] Is the code style correct (follows pylint and black guidelines)?
    • [x] Is the change listed in changelog?
    opened by nitishp25 31
  • Update doc-Refitting NumPyro models with ArviZ (and xarray)

    Update doc-Refitting NumPyro models with ArviZ (and xarray)

    Description

    fixes #1801

    Checklist

    • [x] Follows official PR format
    • [ ] Includes a sample plot to visually illustrate the changes (only for plot-related functions)
    • [x] New features are properly documented (with an example if appropriate)?
    • [ ] Includes new or updated tests to cover the new feature
    • [x] Code style correct (follows pylint and black guidelines)
    • [ ] Changes are listed in changelog

    Changes Done: Replaced az.reloo with {func}~arviz.reloo Edited some grammatical mistakes Replaced PyStanSamplingWrapper terms with NumPyroSamplingWrapper Replaced "Stan Code" with "NumPyro Code" Replaced pystan_wrapper to numpyro_wrapper

    opened by Divyateja04 30
  • Skip tests for optional/extra dependencies when not installed

    Skip tests for optional/extra dependencies when not installed

    Description

    When running all tests locally ImportErrors are thrown if optional/extra dependencies are not installed. By skipping these tests when not installed, users can still run the entire test suite if desired. The entire test suite should still be run via CI.

    This behavior is largely achieved by changing

    import xx
    

    to

    xx = pytest.importorskip(xx)
    

    which will try to import module xx, and will skip all tests in file if the module is not installed.

    Individual tests may also be skipped using the decorator:

    @pytest.mark.skipif(importlib.util.find_spec("xx") is None, reason="xx tests only required for CI")
    
    

    The last remaining issue is numba, which is used in 20+ tests, used in a variety of files. One option is to make numba an entry in requirements-dev.txt instead of requirements-optional.txt, or add the skip decorators to each of the 20+ tests.

    This PR addresses Issue #1112 .

    Checklist

    • [X] Follows official PR format
    • [X] New features are properly documented (with an example if appropriate)?
    • [X] Code style correct (follows pylint and black guidelines)
    • [X] Changes are listed in changelog
    opened by hectormz 30
  • Add more data to InferenceData objects [GSOC]

    Add more data to InferenceData objects [GSOC]

    ~For now should solve only half of #220, the part related to constant_data.~ I would also like to support multiple log_likelihoods somehow (related to #771).

    EDIT: constant data support was added in #814


    EDIT

    I update the description of what this PR does and what will still be pending.

    Does

    • Supports storage of multiple observed variables each with its own log likelihood data
      • dict
      • emcee
      • pymc
      • pystan
    • Updates loo, waic... to get the log likelihood data from the new group. To do so, a function get_log_likelihood has been added in stats_utils. From here on, log likelihood values should be accessed using this helper function (it could even become public or a method of inference data, we have to think about this)

    Note: lp variable is left in sample_stats group, there should be no change involving this.

    Pending

    • support storage of multiple observed values
      • cmdstan
      • cmdstanpy
      • numpyro
      • pyro
    • update ic functions to use the data available
      • add a var_name/obs_name to waic, loo, compare...
      • take into account diferent cases such as an ic value per observation, considering all observations a single variable...
    • add new group to inference data schema
    opened by OriolAbril 29
  • [DOC][WIP] Added user guide for dask support inside ArviZ

    [DOC][WIP] Added user guide for dask support inside ArviZ

    This pull request adds a user guide for showing current dask capabilities in ArviZ. Closes #1631

    Link to the notebook

    Edits to be made:

    • [x] Note on out of memory computation
    • [x] Provide a link to best practices doc.
    • [x] Section on how to get dask backed InferenceData objects.
    • [x] For both non-dask and dask enabled method, initialize the data at the start instead of loading it everytime.
    • [x] Small note on Client and ResourceProfiler
    • [x] High level explanation on az.Dask and link to it's api docs
    • [x] Check if dask="allowed" works or not
    User Documentation 
    opened by MgeeeeK 28
  • loading cmdstanpy csv output

    loading cmdstanpy csv output

    Hello, I am trying to load a pretty big (1.1GB) cmdstanpy csv output file using arviz with: data = az.from_cmdstan(posterior="path-to-csv") or with data = az.from_cmdstan(posterior=["path-to-csv", "parameter-name"]) both ways take more than an hour and use many GB of memory (at this point even 20gb is not enough and python process crushes). Is there a more efficient way to load the sampling output data?

    This issue was also discussed here - https://discourse.mc-stan.org/t/loading-cmstanpy-output-in-python/17828

    arviz - the current master version (0.9.0) cmdstanpy - 0.9.63 cmdstan - 2.24.1 python - 3.7.0 centOS7

    opened by reznida 27
  • Additional minor corrections

    Additional minor corrections

    Additional minimal documentation corrections for:

    1 auto_corr 2 bpv 3 ess

    plots

    Checklist

    • [x] Follows official PR format
    • [x] Code style correct (follows pylint and black guidelines)
    • [ ] Changes are listed in changelog
    opened by asael697 0
  • Custom limits for 2D KDE

    Custom limits for 2D KDE

    For feature parity with 1D KDE, custom limits could be supported in 2D.

    I hacked an implementation by simply adding optional xmin, xmax, ymin, ymax arguments to _fast_kde_2d to override the limits inferred from the input data. Here's an example (left is current behavior of plot_kde, right has the same grey contours but the filled contour plot modifies xmin and ymin).

    image

    Just thought I'd throw this out there since the implementation is simple. Happy to share a reproducer (or draft a PR) if desired.

    opened by zachjweiner 0
  • Passing kwargs to KDE functions through plot_kde

    Passing kwargs to KDE functions through plot_kde

    A kde_kwargs parameter to plot_kde, passed on to the KDE routines, would be useful. It seems the 2D KDE method is undocumented/private, though - making it public would be nice rather than restricting the flag to 1D KDEs only (though _fast_kde_2D has few parameters for customization). (IMHO, It would even nicer if kde could mimic plot_kde's generality to 1D and 2D by accepting a values2 argument, but that would be a breaking change since kde currently accepts circular as the second positional argument.)

    opened by zachjweiner 0
  • KDE backend function documentation missing

    KDE backend function documentation missing

    The docstring of kde cites kde_linear and kde_circular for details on keyword args, but their docstrings don't appear in the documentation. (Note that both methods actually have leading underscores.)

    opened by zachjweiner 0
  • How to plot random(group-based scores) effects?

    How to plot random(group-based scores) effects?

    Short Description

    Greetings all,

    I'm looking for a way to plot differences based on random effects on categorical regression. However, I failed to find any examples or API reference.

    For instance;

    Code Example or link

    import arviz as az
    import bambi as bmb
    import matplotlib.pyplot as plt
    import numpy as np
    import pandas as pd
    import seaborn as sns
    import pymc as pm
    import pymc.sampling_jax
    import numpyro
    
    df = pd.DataFrame({"Target": target_variable, "Random_Effects_Var": random_effects, "Column1": column1, "Column2": column2})
    
    model = bmb.Model("Target~ Column1 + Column2 + (1|Random_Effects_Var)",
                      data = df, family = "categorical", auto_scale = True, priors = priors)
    
    model.build()
    
    with model.backend.model:
        idata=pm.sampling_jax.sample_numpyro_nuts(draws= 250, tune = 50, target_accept = .99,
                                                  postprocessing_backend = 'cpu', idata_kwargs={"log_likelihood":True},chain_method='parallel')
        posterior_predictive = pm.sample_posterior_predictive(trace = idata, extend_inferencedata=True)
    
    idata
    

    So far, so good. Imagine, Random_Effect_Var includes 2 levels of categorical data, A and B , and I'd like to plot the influence of each (Indeed group-level scores) over the Target variable along with variables in Column1 and Column2.

    here is an example from R package Modelbasedlink

    Screenshot 2022-12-28 at 02 03 15

    How can I plot something similar with Arviz?

    opened by fatihbozdag 3
  • remove workaround ravel

    remove workaround ravel

    Description

    There was an issue with scipy 1.10 rc1, so I added this ravel to get CI green quickly. It should be fixed already in rc2 so there is no need to keep it.

    Checklist

    • [x] Does the PR follow official PR format?
    • [x] Is the code style correct (follows pylint and black guidelines)?

    :books: Documentation preview :books:: https://arviz--2187.org.readthedocs.build/en/2187/

    opened by OriolAbril 1
Releases(0.14.0)
  • 0.14.0(Nov 16, 2022)

    What's Changed

    • Fix dimension ordering for traceplot with divergences by @sethaxen in https://github.com/arviz-devs/arviz/pull/2151
    • Add Bayes Factor plot via Savage-Dickey density ratio by @orduek in https://github.com/arviz-devs/arviz/pull/2037
    • Refactor plot_bf by @aloctavodia in https://github.com/arviz-devs/arviz/pull/2152
    • Add step about conda forge recipe to how-to release notes by @OriolAbril in https://github.com/arviz-devs/arviz/pull/2159
    • rename arviz-doc to arviz-docgrid and make arviz-doc a non-grid style by @aloctavodia in https://github.com/arviz-devs/arviz/pull/2157
    • Add weight_predictions function by @aloctavodia in https://github.com/arviz-devs/arviz/pull/2147
    • add observed_rug argument to plot_ppc by @aloctavodia in https://github.com/arviz-devs/arviz/pull/2161
    • copy coords before modifying by @tspeng in https://github.com/arviz-devs/arviz/pull/2160
    • add dev flag to version by @OriolAbril in https://github.com/arviz-devs/arviz/pull/2162
    • Version bump to 0.13.1 by @zaxtax in https://github.com/arviz-devs/arviz/pull/2163

    New Contributors

    • @orduek made their first contribution in https://github.com/arviz-devs/arviz/pull/2037
    • @tspeng made their first contribution in https://github.com/arviz-devs/arviz/pull/2160

    Full Changelog: https://github.com/arviz-devs/arviz/compare/v0.13.0...0.14.0

    Source code(tar.gz)
    Source code(zip)
  • v0.13.0(Oct 24, 2022)

    v0.13.0 (2022 Oct 22)

    Release highlights:

    New features

    • Add side argument to plot_violin to allow single-sided violin plots (1996)
    • Added support for Bean Machine via the function from_beanmachine. (2107)
    • Add support for warmup samples in from_pystan for PyStan 3. (2132)
    • New arviz.extract function.

    Maintenance and fixes

    • Addressed netCDF writing issues. (2129)

    Deprecation

    • Removed fill_last, contour and plot_kwargs arguments from plot_pair function (2085)

    See full CHANGELOG.md file for a detailed release changes description.

    Source code(tar.gz)
    Source code(zip)
  • v0.13.0rc1(Oct 22, 2022)

    v0.13.0rc1 (2022 Oct 22)

    Release highlights:

    New features

    • Add side argument to plot_violin to allow single-sided violin plots (1996)
    • Added support for Bean Machine via the function from_beanmachine. (2107)
    • Add support for warmup samples in from_pystan for PyStan 3. (2132)
    • New arviz.extract function.

    Maintenance and fixes

    • Addressed netCDF writing issues. (2129)

    Deprecation

    • Removed fill_last, contour and plot_kwargs arguments from plot_pair function (2085)

    See full CHANGELOG.md file for a detailed release changes description.

    Source code(tar.gz)
    Source code(zip)
  • v0.12.1(May 13, 2022)

    Version 0.12.1 introduces a new argument to arviz.summary: stat_focus to choose between using the mean and highest density intervals or the median and equal-tail intervals as summaries. It also has several doc improvements and bug fixes.

    See detailed changelog

    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Mar 23, 2022)

    Change log

    v0.12.0 (2022 Mar 23)

    New features

    • Add new convenience function arviz.extract_dataset (1725)
    • Add combine_dims argument to several functions (1676)
    • [experimental] Enable dask chunking information to be passed to InferenceData.from_netcdf with regex support (1749)
    • Allow kwargs to customize appearance of the mean in plot_lm
    • Add dict option to from_cmdstan log_likelihood parameter (as in from_pystan)
    • Unify model comparison API. Both plot_compare, plot_elpd can now take dicts of InferenceData or ELPDData (1690)
    • Change default for rcParam stats.ic_pointwise to True (1690)
    • Add new plot type: plot_ecdf (1753)

    Maintenance and fixes

    • Drop Python 3.6 support (1430)
    • Bokeh 3 compatibility. (1919)
    • Remove manual setting of 2d KDE limits (1939)
    • Pin to bokeh<3 version (1954)
    • Fix legend labels in plot_ppc to reflect prior or posterior. (1967)
    • Change DataFrame.append to pandas.concat (1973)
    • Fix axis sharing behaviour in plot_pair. (1985)
    • Fix parameter duplication problem with PyStan (1962)
    • Temporarily disable pyjags tests (1963)
    • Fix tuple bug in coords (1695)
    • Fix extend 'right' join bug (1718)
    • Update attribute handling for InferenceData (1357)
    • Fix R2 implementation (1666)
    • Added warning message in plot_dist_comparison() in case subplots go over the limit (1688)
    • Fix coord value ignoring for default dims (2001)
    • Fixed plot_posterior with boolean data (1707)
    • Fix min_ess usage in plot_ess (2002)

    Deprecation

    Documentation

    • Fixed typo in Forestplot documentation
    • Restructured contributing section and added several new pages to help contributing to docs (1903)
    Source code(tar.gz)
    Source code(zip)
  • v0.11.4(Oct 3, 2021)

  • v0.11.3(Oct 1, 2021)

  • v0.11.2(Feb 21, 2021)

    Patch release on v0.11.1.

    The highlight of the release is updating the from_cmdstanpy to work with cmdstanpy>=0.9.68. The other changes are listed below

    New features

    • Added to_zarr and from_zarr methods to InferenceData (1518)
    • Added confidence interval band to auto-correlation plot (1535)

    Maintenance and fixes

    • Updated from_cmdstanpy, from_cmdstan, from_numpyro and from_pymc3 converters to follow schema convention (1550, 1541, 1525 and 1555)
    • Fix calculation of mode as point estimate (1552)
    • Remove variable name from legend in posterior predictive plot (1559)
    • Added significant digits formatter to round rope values (1569)
    • Updated from_cmdstan. csv reader, dtype problem fixed and dtype kwarg added for manual dtype casting (1565)

    Deprecation

    • Removed Geweke diagnostic (1545)
    • Removed credible_interval and include_circ arguments (1548)

    Documentation

    • Added an example for converting dataframe to InferenceData (1556)
    • Added example for coords argument in plot_posterior docstring (1566)

    See also detailed change log of v0.11.0

    Source code(tar.gz)
    Source code(zip)
  • v0.11.1(Feb 6, 2021)

    Patch release on v0.11.1. Changes are:

    Maintenance and fixes

    • Fixed regression in plot_pair labels that prevented coord names to be shown when necessary (1533)
    • Fixed ovelapping titles and repeating warnings on circular traceplot (1517)
    • Removed repetitive variable names from forest plots of multivariate variables (1527)

    Documentation

    • Use tabs in ArviZ example gallery (1521)

    See also detailed change log of v0.11.0

    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Jan 17, 2021)

    Highlights

    • Added to_dataframe method, __getitem__ magic and copy method to InferenceData
    • Add ref_line, bar, vlines and marker_vlines kwargs to plot_rank
    • Add observed argument to (un)plot observed data in plot_ppc
    • Add support for named dims and coordinates with multivariate observations
    • Add support for discrete variables in rank plots and loo_pit
    • Make stacking the default method to compute weights in compare (1438)
    • [experimental] Modified SamplingWrapper base API

    Maintenance and fixes

    • Updated CmdStanPy interface
    • Have from_pystan store attrs as strings to allow netCDF storage
    • Use circular KDE function and fix tick labels in circular plot_trace
    • Fix computation of weights in compare
    • Add grid argument to manually specify the number of rows and columns
    • Switch to compact=True by default in our plots
    • Make from_pymc3 compatible with theano-pymc 1.1.0

    Deprecations

    • plot_khat deprecate annotate argument in favor of threshold.

    See detailed change log

    Source code(tar.gz)
    Source code(zip)
  • v0.10.0(Sep 23, 2020)

    Highlights

    • Added support for circular variables to several functions
    • Added InferenceData JSON converter and to_dict function
    • Added plot_separation for binary data
    • Extended InferenceData capabilities for computation and combination of multiple objects.
    • Ridgeplot is now hdi aware
    • Add support for discrete variables in plot_bpv

    Fixes

    • Fixed import error with xarray 0.16.1
    • Restructured code to be compatible with matplotlib>=3.3

    Deprecations

    • This will be the last ArviZ version to support Python 3.6. ArviZ will follow NEP 29

    See detailed change log

    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(Jun 23, 2020)

    Highlights

    • loo-pit KDE and HDI were improved
    • html_repr of InferenceData objects for jupyter notebooks
    • Support for PyJAGS
    • from_pymc3 automatically retrieves coords and dims from model context
    • plot_trace now supports multiple aesthetics to identify chain and variable shape and supports matplotlib aliases
    • plot_hdi can now take already computed HDI values

    Deprecations

    • from_pymc3 without a model context available raises aFutureWarning and will be deprecated in a future version
    • In plot_trace, chain_prop and compact_prop as tuples will now raise a FutureWarning
    • hdi with 2d data raises a FutureWarning

    See detailed change log

    Source code(tar.gz)
    Source code(zip)
  • v0.8.3(May 28, 2020)

  • v0.8.2(May 25, 2020)

  • v0.8.1(May 24, 2020)

    Patch release on v0.8.0. Changes are:

    Maintenance and fixes

    • Fixed bug in from_pymc3 when used with PyMC3<3.9 (#1203)
    • Fixed enforcement of rcParam plot.max_subplots in plot_trace and plot_pair (#1205)
    • Removed extra subplot row and column in in plot_pair with marginal=True (#1205)
    • Added latest PyMC3 release to CI in addition to using GitHub master (#1207)

    Documentation

    • Use dev as version indicator in online documentation (#1204)

    See also detailed change log of v0.8.0

    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(May 22, 2020)

    Highlights

    • Extensions to InferenceData:
      • Added support for warmup data
      • Extended support for predictions and log_likelihood groups
      • Added InferenceData.map method
    • var_names argument in stats and plotting functions now supports filtering parameters based on partial naming (filter="like") or regular expressions (filter="regex")
    • hdi has been extended to work on arrays with more than 2d and on InferenceData objects
    • New option in plot_trace to display rank plot

    Deprecations

    • functions hpd and plot_hpd have been deprecated in favour of hdi and plot_hdi respectively
    • argument credible_interval has been deprecated in favour of hdi_prob

    See detailed change log

    Source code(tar.gz)
    Source code(zip)
  • 0.7.0(Mar 2, 2020)

    Highlights

    • New defaults for cross validation: loo (old: waic) and log -scale (old: deviance -scale)
    • Extensions to InferenceData schema
      • Added support for out of sample posterior predictive with predictions group
      • Added storage support for pointwise log likelihood data from multiple variables with log_likelihood group
    • Improved legends: plot_density, plot_energy and plot_ess support interactive legends in Bokeh, automatic legend in plot_trace(..., compact=True) in matplotlib
    • Added transform argument to plotting functions
    • Better rcParams integration

    Experimental features

    • Added arviz.wrappers module to allow ArviZ to refit the models if necessary
    • Added reloo function to ArviZ

    See detailed change log

    Source code(tar.gz)
    Source code(zip)
  • 0.6.1(Dec 28, 2019)

    Minor release due to error in packaging import statement.

    #975

    • Update for pair_plot (divergences can be selected
    • Default tools follow global (ArviZ) defaults
    • Change packaging import from absolute to relative format, explicitly importing version function

    #976

    • Add interactive legend for a plot, if only two variables are used in pairplot.
    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(Dec 24, 2019)

    Highlights

    • Initial bokeh support.
    • Fully support numpyro (@fehiepsi )
    • log_likelihood and observed data from pyro
    • ArviZ.jl (@sethaxen )
    • improve rcparams
    • fix az.concat functionality (@anzelpwj )
    • distplot docstring plotting example (@jscarbor )
    Source code(tar.gz)
    Source code(zip)
  • 0.5.1(Sep 16, 2019)

  • 0.5.0(Sep 15, 2019)

    New features

    • Add from_numpyro Integration (#811)
    • Numba Google Summer of Code additions (https://ban-zee.github.io/jekyll/update/2019/08/19/Submission.html)
    • Model checking, Inference Data, and Convergence assessments (https://github.com/OriolAbril/gsoc2019/blob/master/final_work_submission.md)

    Bugfix

    Source code(tar.gz)
    Source code(zip)
  • 0.4.1(Jun 10, 2019)

    New features

    • Reorder stats columns (#695)
    • Plot Forest reports ess and rhat by default(#685)
    • Add pointwise elpd (#678)

    Bugfix

    • Fix io_pymc3 bug (#693)
    • Fix io_pymc3 warning (#686)
    • Fix 0 size bug with pystan (#677)
    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(May 20, 2019)

    New features

    • Add plot_dist (#592)
    • New rhat and ess (#623)
    • Add plot_hpd (#611)
    • Add plot_rank (#625)

    Deprecations

    • Remove load_data and save_data (#625)
    Source code(tar.gz)
    Source code(zip)
  • 0.3.3(Feb 23, 2019)

    New features

    • Plot ppc supports multiple chains (#526)
    • Plot titles now wrap (#441)
    • plot_density uses a grid (#379)
    • emcee reader support (#550)
    • Animations in plot_ppc (#546)
    • Optional dictionary for stat_funcs in summary (#583)
    • Can exclude variables in selections with negated variable names (#574)

    Maintenance/fixes

    • Order maintained with xarray_var_iter (#557)
    • Testing very improved (multiple)
    • Fix nan handling in effective sample size (#573)
    • Fix kde scaling (#582)
    • xticks for discrete variables (#586)
    • Empty InferenceData saves consistent with netcdf (#577)
    • Removes numpy pinning (#594)

    Deprecations

    Documentation

    • JOSS and Zenodo badges (#537)
    • Gitter badge (#548)
    • Docs for combining InferenceData (#590)
    Source code(tar.gz)
    Source code(zip)
  • v0.3.2(Jan 15, 2019)

    0.3.2

    New features

    • Support PyStan3 (#464)
    • Add some more information to the inference data of tfp (#447)
    • Use Split R-hat (#477)
    • Normalize from_xyz functions (#490)
    • KDE: Display quantiles (#479)
    • Add multiple rope support to plot_forest (#448)
    • Numba jit compilation to speed up some methods (#515)
    • Add from_dict for easier creation of az.InferenceData objects (#524)
    • Add stable logsumexp (#522)

    Maintenance/fixes

    • Fix for from_pyro with multiple chains (#463)
    • Check __version__ for attr (#466)
    • And exception to plot compare (#461)
    • Add Docker Testing to travisCI (#473)
    • fix jointplot warning (#478)
    • Fix tensorflow import bug (#489)
    • Rename N_effective to S_effective (#505)

    Deprecations

    Documentation

    • Add docs to plot compare (#461)
    • Add InferenceData tutorial in header (#502)
    • Added figure to InferenceData tutorial (#510)
    Source code(tar.gz)
    Source code(zip)
    arviz-0.3.2.tar.gz(3.38 MB)
    arviz-0.3.2.zip(3.43 MB)
  • v0.3.1(Dec 18, 2018)

  • v0.3.0(Dec 14, 2018)

  • v0.2.0(Oct 4, 2018)

  • 0.1.0(Sep 21, 2018)

A python library for Bayesian time series modeling

PyDLM Welcome to pydlm, a flexible time series modeling library for python. This library is based on the Bayesian dynamic linear model (Harrison and W

Sam 438 Dec 17, 2022
Bayesian optimization in JAX

Bayesian optimization in JAX

Predictive Intelligence Lab 26 May 11, 2022
Combines Bayesian analyses from many datasets.

PosteriorStacker Combines Bayesian analyses from many datasets. Introduction Method Tutorial Output plot and files Introduction Fitting a model to a d

Johannes Buchner 19 Feb 13, 2022
Bonsai: Gradient Boosted Trees + Bayesian Optimization

Bonsai is a wrapper for the XGBoost and Catboost model training pipelines that leverages Bayesian optimization for computationally efficient hyperparameter tuning.

null 24 Oct 27, 2022
Case studies with Bayesian methods

Case studies with Bayesian methods

Baze Petrushev 8 Nov 26, 2022
BASTA: The BAyesian STellar Algorithm

BASTA: BAyesian STellar Algorithm Current stable version: v1.0 Important note: BASTA is developed for Python 3.8, but Python 3.7 should work as well.

BASTA team 16 Nov 15, 2022
Bayesian optimization based on Gaussian processes (BO-GP) for CFD simulations.

BO-GP Bayesian optimization based on Gaussian processes (BO-GP) for CFD simulations. The BO-GP codes are developed using GPy and GPyOpt. The optimizer

KTH Mechanics 8 Mar 31, 2022
A collection of interactive machine-learning experiments: 🏋️models training + 🎨models demo

?? Interactive Machine Learning experiments: ??️models training + ??models demo

Oleksii Trekhleb 1.4k Jan 6, 2023
A library of extension and helper modules for Python's data analysis and machine learning libraries.

Mlxtend (machine learning extensions) is a Python library of useful tools for the day-to-day data science tasks. Sebastian Raschka 2014-2021 Links Doc

Sebastian Raschka 4.2k Dec 29, 2022
A statistical library designed to fill the void in Python's time series analysis capabilities, including the equivalent of R's auto.arima function.

pmdarima Pmdarima (originally pyramid-arima, for the anagram of 'py' + 'arima') is a statistical library designed to fill the void in Python's time se

alkaline-ml 1.3k Dec 22, 2022
A Python Module That Uses ANN To Predict A Stocks Price And Also Provides Accurate Technical Analysis With Many High Potential Implementations!

Stox A Module to predict the "close price" for the next day and give "technical analysis". It uses a Neural Network and the LSTM algorithm to predict

Stox 31 Dec 16, 2022
High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.

What is xLearn? xLearn is a high performance, easy-to-use, and scalable machine learning package that contains linear model (LR), factorization machin

Chao Ma 3k Jan 8, 2023
Python package for stacking (machine learning technique)

vecstack Python package for stacking (stacked generalization) featuring lightweight functional API and fully compatible scikit-learn API Convenient wa

Igor Ivanov 671 Dec 25, 2022
A Python Package to Tackle the Curse of Imbalanced Datasets in Machine Learning

imbalanced-learn imbalanced-learn is a python package offering a number of re-sampling techniques commonly used in datasets showing strong between-cla

null 6.2k Jan 1, 2023
A Python package for time series classification

pyts: a Python package for time series classification pyts is a Python package for time series classification. It aims to make time series classificat

Johann Faouzi 1.4k Jan 1, 2023
ELI5 is a Python package which helps to debug machine learning classifiers and explain their predictions

A library for debugging/inspecting machine learning classifiers and explaining their predictions

null 154 Dec 17, 2022
MBTR is a python package for multivariate boosted tree regressors trained in parameter space.

MBTR is a python package for multivariate boosted tree regressors trained in parameter space.

SUPSI-DACD-ISAAC 61 Dec 19, 2022
Python package for machine learning for healthcare using a OMOP common data model

This library was developed in order to facilitate rapid prototyping in Python of predictive machine-learning models using longitudinal medical data from an OMOP CDM-standard database.

Sontag Lab 75 Jan 3, 2023
UpliftML: A Python Package for Scalable Uplift Modeling

UpliftML is a Python package for scalable unconstrained and constrained uplift modeling from experimental data. To accommodate working with big data, the package uses PySpark and H2O models as base learners for the uplift models. Evaluation functions expect a PySpark dataframe as input.

Booking.com 254 Dec 31, 2022