EM GMM is an unsupervise learning algorithm by clustering data to different guassian model.
You will need the following package to run the model
- numpy
- scipy
- matplotlib
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()
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.