PyMC Bayesian Statistical Modeling
github.com
2
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
PyMC (formerly PyMC3) is a free and open-source Python package for Bayesian statistical modeling and probabilistic machine learning. Originally created by Chris Fonnesbeck, Anand Patil, and David Huard around 2005 (as PyMC), the library was significantly rewritten by John Salvatier (who introduced Theano as the computational backend) and renamed PyMC3 in 2013. The library transitioned from Theano to PyTensor in 2022 (v4.0+), and the name reverted to PyMC. PyMC is widely used in academia and industry for Bayesian inference. Key features: probabilistic programming: users define probabilistic models by specifying prior distributions, likelihood functions, and deterministic transformations using Python code. The framework automatically handles the computational graph and inference algorithms. Model specification: models are defined within a Model context manager using distribution objects (Normal, Binomial, Poisson, Beta, Gamma, Uniform, HalfNormal) and deterministic transformations. Random variables are combined algebraically to build complex models. MCMC sampling: Markov Chain Monte Carlo algorithms for posterior inference. NUTS (No-U-Turn Sampler), an extension of Hamiltonian Monte Carlo (HMC), is the default sampler for continuous variables, automatically tuning step size and mass matrix. Metropolis and Slice sampling for discrete variables. Variational inference: ADVI (Automatic Differentiation Variational Inference) for fast approximate inference, useful for large datasets where MCMC is too slow. Support for mini-batch ADVI for streaming data. PyTensor backend: PyTensor (forked from Theano) handles symbolic differentiation, C compilation, and GPU acceleration. ArviZ integration: the ArviZ library provides diagnostics (R-hat, effective sample size, trace plots, posterior predictive checks) and visualization. Gaussian processes: built-in support for GP models with various kernels (RBF, Matern, Periodic). Model comparison: WAIC, LOO-CV. Python. Apache-2.0.
Statistics
2
Views
0
Clicks
0
Like
0
Dislike