Skip to content

chanyikchong/EM_GMM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Estimation maximisation with gaussian mixture model (EM GMM)

EM GMM is an unsupervise learning algorithm by clustering data to different guassian model.

Package

You will need the following package to run the model

  • numpy
  • scipy
  • matplotlib

Usage

Import the model.

from EM_GMM import GMM_EM

Initialize the model and define the number of cluster.

model = GMM_EM(k)

Train the model with your data and also the number of iteration. You can also plot the training performance by setting plot = True. (Only for 2d data)

model.train(data, epoch, plot = True) # default is True


You can get the negative log likelihood (do not use the likelihood function).

model.li
#or get the final negative log likelihood
model.li[-1]

You can also plot the negative log likelihood in all training steps

model.plot_li()


Contribution

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages