Registry / ai-ml / gmr
library2.0.3pypypi✓ verified 84d ago

Gaussian Mixture Regression (GMR) for learning and inferring multivariate probability distributions from data. Version 2.0.3 supports Python >=3.7, NumPy 2 compatibility, and sklearn-compatible GaussianMixtureRegressor. Low release cadence (last release 2024-06-03).

pip install gmr
INSTALL
IMPORT
SIG · GMR
G
gmr
ai-mlpythonv2.0.3
Install
7.4s avg
Import
2485ms
Disk
230MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 2.542s · 230.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.4s · import 2.428s · 222MB
230MB installed
● package 230MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GMM
from gmr import GMM
from gmr.gmm import GMM
Flat import structure; submodule not exposed directly.
MVN
from gmr import MVN
from gmr.mvn import MVN
MVN is also exported from top-level.
GaussianMixtureRegressor
from gmr import GaussianMixtureRegressor
from gmr.sklearn import GaussianMixtureRegressor
Brought to top-level in 1.6.

Basic usage: create GMM, fit data, condition on a slice.

import numpy as np from gmr import GMM, MVN # Create a simple GMM with 2 components random init random_state = np.random.RandomState(0) gmm = GMM(n_components=2, random_state=random_state) X = np.random.randn(100, 3) gmm.from_samples(X) # Condition on first dimension mvn_conditional = gmm.condition(np.array([0.5]), [0]) print("Conditional mean:", mvn_conditional.mean)
Debug
Known issues
breaking`GMM.condition` now returns an `MVN` object (not tuple of mean/covariance). Code assuming tuple will break.
fix
Access `.mean` and `.covariance` attributes on the returned MVN.
affects: >=1.6
breakingProbability density scaling fixed in v2.0.0; marginal densities may differ from v1.x by factor that ensures integration to 1.
fix
If you relied on original scaling, normalize outputs or use v1.6.1.
affects: >=2.0.0
gotcha`GMM.from_samples` does not check if the data has sufficient rank; singular covariance matrices cause runtime errors unless using oracle approximating shrinkage (enabled by default).
fix
Use `oracle_approximating_shrinkage=True` (default) or regularize via `GMM.priors`. See docstring.
affects: >=1.6
deprecatedPython 2.7 support ended silently; no compatibility guarantees for Python 2.
fix
Upgrade to Python >=3.7 and gmr >=2.0.0.
affects: <2.0.0
Errors
Common errors & fixes
AttributeError: module 'gmr' has no attribute 'GMM'
Incorrect import path (tried `from gmr import GMM` but installed old version <1.6 or import shadowed by file named gmr.py).
fix
Install gmr>=1.6 (`pip install gmr==2.0.3`) and ensure no local file named gmr.py.
ValueError: operands could not be broadcast together with shapes ...
Condition indices or values vector length mismatch with data dimensions.
fix
Verify that condition indices are within range [0, n_features-1] and values length equals len(indices).
LinAlgError: Singular matrix
Covariance matrix became singular due to duplicate data points or insufficient samples per component.
fix
Increase `n_components`, add noise to data, or set `random_state` to a different seed.
Upgrade
Version history
2.0.3latest on PyPI · released Jan 12, 2026
Audit
Dependencies
numpyrequiredCore dependency for array operations
scikit-learnoptionalFor GaussianMixtureRegressor and clustering utilities
scipyoptionalOptional for some examples
Agent activity
11 hits · last 30 days
node
10
OpenAI (training)
1
Resources
gmr — pip install gmr · libregistry