--- id: pymc-extras version: "0.14.0" license: ======= License ======= PyMC is distributed under the Apache License, Version 2.0 Copyright (c) 2006 Christopher J. Fonnesbeck (Academic Free License) Copyright (c) 2007-2008 Christopher J.… (full text in the JSON record) license_treatment: permissive maintenance: active --- # pymc-extras — 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. License: permissive · Maintenance: active · Downloads: 257.7K/mo ## What it is and what it does PyMC Extras is a companion library to PyMC that houses specialized statistical methods and distributions too niche for the core library but mature enough to be useful. It provides alternative inference algorithms (Pathfinder, DADVI, INLA, Laplace approximation, better MAP estimation), additional probability distributions (DiscreteMarkovChain, GeneralizedPoisson, GenExtreme), and statespace models with Kalman filtering (SARIMAX, VARMAX, ETS, structural time series). The library mirrors PyMC's namespaces so distributions and methods integrate seamlessly into existing PyMC models. It is maintained by the PyMC team and designed as an incubator: functionality that proves widely useful may graduate to the main PyMC repository. The package depends on pymc, pytensor, arviz, pydantic, preliz, and better-optimize, and targets modern Python versions (3.12, 3.13, 3.14). It carries no known vulnerabilities and is actively developed. Use it for: - Fit time-series models like SARIMAX or structural time series with Kalman filtering when standard PyMC distributions are insufficient. - Use alternative inference methods such as Pathfinder or INLA for faster or more accurate posterior approximation in specialized models. - Apply automatic marginalization to handle finite discrete or conjugate variables exactly or via Laplace approximation. - Model rare or extreme-value phenomena using specialized distributions like GenExtreme or GeneralizedPoisson. - Implement Markov chain distributions for state-space or sequential modeling tasks. - Experiment with advanced Bayesian techniques before they mature into the core PyMC library. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Extends PyMC with specialized distributions, alternative inference methods, and statespace models that are too specialized for the core library but useful enough to avoid reimplementing. Yes. PyMC Extras is actively maintained by the PyMC team, carries no known vulnerabilities, installs with low friction, and is licensed permissively. Install it if you need specialized distributions, alternative inference methods, or statespace models beyond what PyMC core offers. It is production-ready (Development Status 5) and well-integrated with the PyMC ecosystem. ## Install pip install pymc-extras uv add pymc-extras poetry add pymc-extras ## Installing pymc-extras Before you install: Low install friction with a pure-Python wheel. Actively maintained by the PyMC team with a release 17 days ago and recent commits. Depends on pymc, pytensor, arviz, pydantic, preliz, and better-optimize—all established packages in the scientific Python ecosystem. License in practice: Apache License 2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects as long as you include a copy of the license and document any changes you make. Quickstart: pip install pymc-extras 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) Requires Python 3.12 or later and an existing PyMC installation. Verify before relying: - Whether automatic marginalization via Laplace approximation is exact or approximate in practice for your use case. - Performance characteristics of SARIMAX, VARMAX, and ETS models on typical time-series datasets. - Compatibility of Pathfinder and DADVI methods with custom PyMC model structures. ## Package facts - License: ======= License ======= PyMC is distributed under the Apache License, Version 2.0 Copyright (c) 2006 Christopher J. Fonnesbeck (Academic Free License) Copyright (c) 2007-2008 Christopher J.… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 257.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pymc extensions distributions, bayesian inference methods, time series statespace models, markov chain sampling, laplace approximation, pathfinder inference, discrete distributions bayesian, bayesian-inference, time-series-modeling, probabilistic-programming [View on SkillFed](https://skillfed.io/packages/pymc-extras) · [View on PyPI](https://pypi.org/project/pymc-extras/)