skillfed

gmr

Gaussian Mixture Regression

gmr v2.0.3 110.6K downloads/30d#12,452 on PyPI201
Permissive license BSD-3-Clause AGING released

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 gmr

uv

uv add gmr

poetry

poetry add gmr

Installing 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

Intended Audience :: DevelopersIntended Audience :: Science/ResearchOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Software Development

Tags

gaussian mixture modelsgmm clustering regressionexpectation maximization fittingconditional prediction gmmmixture model samplingprobabilistic regressiongmm python library
probabilistic-modelingregressionclustering

More Software Development packages