Skip to content

rreusser/gaussian-mixture-estimator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gaussian-mixture-estimator

Estimate a Gaussian Mixture model using the Expectation Maximation (EM) algorithm

Fits an n-dimensional Gaussian Mixture to data using the Expectation Maximization (EM) algorithm. The algorithm is guaranteed to improve on every iteration, but it's not guaranteed to converge to a global maximum. The implementation currently uses a pretty naive initial guess. I may integrate k-nearest neighbors initilization, or may leave that to the user. I haven't decided yet. The demo uses k-nearest neighbor initialization, but the particular module is a bit unstable sometimes, so at the moment, I'm leaning toward excluding anything but rudimentary built-in initialization.

Gaussian mixture in 2D

Demo at: https://rreusser.github.io/gaussian-mixture-estimator/

Example

Not currently on npm. Pass it a list of n-dimensional coordinates (1D components must currently be wrapped in an array) and specify the number of mixture components. More documentation to come.

var estimate = require('gaussian-mixture-estimator')

estimate(
  [[x1, y1, ...],
   [x2, y2, ...],
   [x3, y3, ...],
    ...
  ],
  5
);

License

© 2016 Ricky Reusser. MIT License.

About

[WIP] Gaussian Mixture Estimator using the Expectation Maximation algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages