Skip to content

mjm522/gmr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gmr

Travis

Code Health

Gaussian Mixture Models (GMMs) (using EM and incremental) for clustering and regression in Python.

image

Example

Estimate GMM from samples and sample from GMM:

from gmr import GMM

gmm = GMM(n_components=3, random_state=random_state)
gmm.from_samples(X)
X_sampled = gmm.sample(100)

Guassian Mixture Regression Estimation Maximization:

from gmr import GMM

gmm = GMM(n_components=3, random_state=0)
gmm.from_samples(X)
Y_gmm = gmm.predict(np.array([0]), X_test[:, np.newaxis])

Guassian Mixture Regression Incremental Update:

from gmr import IGMM

igmm = IGMM(n=2, sig_init=1.1, T_nov=.1) for i in range(X.shape[0]): igmm.update(X[i,:]) Y_igmm = igmm.predict(np.array([0]), X_test[:, np.newaxis])

How Does It Compare to scikit-learn?

There is an implementation of Gaussian Mixture Models for clustering in scikit-learn as well. Regression could not be easily integrated in the interface of sklearn. That is the reason why I put the code in a separate repository.

Installation

from source:

sudo python setup.py install

About

Gaussian Mixture Regression

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%