ArviZ provides stats, diagnostics, and plots for exploratory analysis of Bayesian models. ArviZ.jl started out as a PyCall wrapper of the Python ArviZ package, with utilities to work with Julia probabilistic programming languages (Turing, Soss, Stan, etc). Over time, to improve usability and integration with the ecosystem, components have been ported to and redesigned for Julia.
ArviZ v0.10 is now out! This update brings many improvements.
New features
ArviZ is now a meta-package
ArviZ.jl now re-exports the following component packages.
- InferenceObjects.jl: types and utilities for storing data and inference results following the InferenceData schema. Uses DimensionalData under the hood for ease of working with multidimensional arrays with named dimensions.
- MCMCDiagnosticTools.jl: diagnostics for Markov Chain Monte Carlo methods
- PSIS.jl: Pareto-smoothed importance sampling
- PosteriorStats.jl: common statistical analyses for the Bayesian workflow (model selection, predictive checks, summary statistics, etc)
Each of the dependencies is lightweight, and methods are intended to be overloaded for types implemented by Bayesian modeling packages. For example, Turing’s MCMCChains extends MCMCDiagnosticTools and is planned to extend PosteriorStats. Our own InferenceObjects extends both packages using v1.9’s extensions system.
ArviZ is now pure-Julia and ultra-lightweight
The component packages listed above are all pure Julia! This reduced ArviZ’s load time from ~4.5s with ArviZ v0.8 on Julia v1.9.2 to 0.58s with ArviZ v0.10 on Julia v1.10.0-beta1!
More importantly, there were always some users who could not install ArviZ due to the combined challenges of Python dependency management and packaging Python with Julia. This is now solved!
Additional functionality is now in the ecosystem
Additional functionality can be loaded with the following packages:
- ArviZExampleData.jl: example
InferenceData
objects, useful for demonstration and testing - ArviZPythonPlots.jl: Python ArviZ’s library of plotting functions for Julia types
ArviZPythonPlots is a transitional package while we work on porting Python ArviZ’s visualizations to Julia. It should be much easier to install and work with than older ArviZ versions, since we moved from PyCall to PythonCall.
What’s next?
- Porting Python ArviZ’s plots to Plots.jl and Makie.jl recipes (Hook into Plots.jl and/or Makie.jl · Issue #108 · arviz-devs/ArviZ.jl · GitHub): this is a lot of work and will go a lot faster with more contributors, so let me know if you’d like to contribute!
- Reducing compilation time across all packages, especially when operating on
InferenceData
(Reducing compilation time with InferenceData · Issue #15 · arviz-devs/InferenceObjects.jl · GitHub) - Overloading PosteriorStats methods for MCMCChains types (Overloading PosteriorStats methods · Issue #430 · TuringLang/MCMCChains.jl · GitHub)
- Making
InferenceData
an official data type for Turing. This work is well underway (Add InferenceObjects integration by sethaxen · Pull Request #465 · TuringLang/DynamicPPL.jl · GitHub). It is likelyInferenceData
will at some point replaceMCMCChains.Chains
as Turing’s default return type for MCMC. - Supporting more PPLs. Gen.jl is in the works (initial work at GitHub - arviz-devs/ArviZGen.jl), but if you have a favorite PPL you’d like to support, let us know.
- More and better documentation. This is a really easy way to make a big impact! A welcome and more advanced contribution would be case studies demonstrating usage of the analyses on real data and models.
There are lots of issues for smaller features on all of the component packages. If you’d like to contribute, just comment on an existing issue or open a new one. PRs welcome!