Need help with gmm-torch?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

201 Stars 39 Forks MIT License 39 Commits 1 Opened issues


Gaussian mixture models in PyTorch.

Services available


Need anything else?

Contributors list

This repository contains an implementation of a simple Gaussian mixture model (GMM) fitted with Expectation-Maximization in pytorch. The interface closely follows that of sklearn.

Example of a fit via a Gaussian Mixture model.

A new model is instantiated by calling

and providing as arguments the number of components, as well as the tensor dimension. Note that once instantiated, the model expects tensors in a flattened shape
(n, d)

The first step would usually be to fit the model via
, then predict with
. To reproduce the above figure, just run the provided

Some sanity checks can be executed by calling

. To fit data on GPUs, ensure that you first call

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.