I have a huge dataset of features on which I want to fit a Gaussian Mixture Model using standard expectation maximization, as it is implemented by sklearn. Since not all features fit into the memory at once, I need to train my GMM iteratively, i.e. one batch after the other. What is the best approach to do this? Just go for GMM.fit(batch) for each batch? Maybe use a smaller number of iterations for the EM algorithm? Anymore thoughts, ideas, or even better references therefore?



1 Answer 1


This question has been asked on Stackoverflow a while back .

Since scikit-learn did not extend their implementation of Gaussian mixtures with a partial_fit method (as was the case with other models in the past) I would suggest applying the solution in the accepted answer - sample a subset of the data that fits into the available memory and learn the model for that.

Given the sample isn't too small, it should represent the original distribution well enough.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.