A home for new additions to PyMC, which may include unusual probability distribitions, advanced model fitting algorithms, or any code that may be inappropriate to include in the pymc repository, but may want to be made available to users.
Actively maintained. Last release 13 days ago, commits in 24 of the last 26 weeks. A safe choice.
pip install pymc-extrasWelcome to pymc-extras
PyMC Extras extends PyMC with additional distributions, inference methods, and model transformations. It is maintained by the PyMC team and hosts functionality that is too specialized for the core library, but useful enough that you shouldn't have to write it yourself.
Highlights include:
- Automatic marginalization: exact for finite discrete and conjugate variables, approximate via the Laplace approximation
- Alternative inference methods: Pathfinder, DADVI, INLA, Laplace approximation, and better MAP estimation
- Statespace models: SARIMAX, VARMAX, ETS, and structural time series with Kalman filtering
- Additional distributions such as
DiscreteMarkovChain,GeneralizedPoisson, andGenExtreme
pymc-extras mirrors the namespaces in pymc to make usage and migration as easy as possible.
For example, distributions are used exactly like those in pymc:
import pymc as pm
import pymc_extras as pmx
with pm.Model():
xi = pm.HalfNormal("xi", 0.2)
pmx.GenExtreme("llik", mu=1, sigma=0.5, xi=xi, observed=data)
See the documentation for the full API reference.
Installation
pip install pymc-extras
or for the development version:
pip install git+https://github.com/pymc-devs/pymc-extras.git
Questions
What belongs in pymc-extras?
- statistical methods, for example step methods or model construction helpers
- distributions that are tricky to sample from or test
- specialized fitting methods or distributions
- any code that requires additional optimization before it can be used in practice
Functionality that proves widely useful may graduate to the main pymc repository.