gmr
Gaussian Mixture Regression
What it is and what it does
gmr is a Python library implementing Gaussian Mixture Models for both clustering and regression tasks. It provides a GMM class that fits mixture models to data via expectation-maximization, samples from the learned distribution, and makes conditional predictions given partial observations. The core use case is probabilistic regression: given values for some features, predict the distribution over remaining features.
The package depends only on numpy and scipy, making it lightweight to install. It complements scikit-learn's GaussianMixture (which focuses on clustering) by adding regression capability through conditional probability estimation. Models can be saved via pickle or by extracting and storing the learned priors, means, and covariances for interoperability with other GMM implementations.
Use it for:
- Fit a mixture model to training data and sample new synthetic examples from the learned distribution.
- Predict missing feature values given observed features, with uncertainty estimates from the posterior distribution.
- Initialize a gmr GMM from a scikit-learn GaussianMixture for regression tasks not supported by sklearn.
- Generate trajectory data by sampling from a learned mixture model conditioned on time or state variables.
- Model multimodal relationships in data where a single linear or nonlinear regression would be inadequate.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Gaussian Mixture Models for clustering and regression, providing expectation-maximization fitting, sampling, and conditional prediction on multivariate data.
Yes, if you need probabilistic regression or conditional prediction on multivariate data. The package is stable, well-documented, has no known vulnerabilities, and low install friction. The aging maintenance status (214 days since release) is not a blocker for a mature library, but verify that the release cadence matches your support expectations. Best suited for research, robotics, and scientific computing workflows where mixture models are standard.
Install
gmr on PyPI
pip
pip install gmruv
uv add gmrpoetry
poetry add gmrInstalling gmr
Before you install
Low friction installation with only numpy and scipy as runtime dependencies. Package is aging (214 days since last release) but repository remains active and supported across modern Python versions.
License in practice
BSD-3-Clause (permissive) license allows commercial and private use with minimal restrictions, requiring only license and copyright notice preservation.
Quickstart
pip install gmr
import numpy as np
from gmr import GMM
X = np.random.randn(100, 2)
gmm = GMM(n_components=3, random_state=0)
gmm.from_samples(X)
X_sampled = gmm.sample(100)
x1 = np.random.randn(20, 1)
x2_predicted = gmm.predict([0], x1)
Verify before relying
- Whether the aging maintenance status (214 days since release) indicates planned long-term support or gradual deprecation.
- Performance characteristics and scalability limits for high-dimensional data or large sample counts.
- Comparison of prediction accuracy and speed against current scikit-learn GaussianMixture for regression tasks.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=2.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — numpy, scipy |
| Maintenance | aging — 214 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 110,553/month — #12,452 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gmr-2.0.3-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
spglmFits Gaussian, Poisson, QuasiPoisson, and…
permissive · top 15,000 on PyPI
kmodesImplements k-modes and k-prototypes clustering…
permissive · top 15,000 on PyPI
statsmodelsstatsmodels provides statistical models,…
permissive · top 1,000 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
mgwrCalibrates multiscale and traditional…
permissive · top 15,000 on PyPI
pyriemannpyRiemann provides scikit-learn-compatible…
permissive · top 15,000 on PyPI
SALibSALib implements global sensitivity analysis…
permissive · top 15,000 on PyPI
cornerGenerates publication-quality corner plots…
permissive · top 15,000 on PyPI
quantile-forestQuantile regression forests for estimating…
permissive · top 15,000 on PyPI
linearmodelsProvides panel regression, instrumental…
unclear · top 15,000 on PyPI