Skip to content

Instantly share code, notes, and snippets.

@Torenable
Last active June 15, 2017 14:35
Show Gist options
  • Save Torenable/931cffcb1b35c6764f80359a5991ec42 to your computer and use it in GitHub Desktop.
Save Torenable/931cffcb1b35c6764f80359a5991ec42 to your computer and use it in GitHub Desktop.
Decomposite a Gaussian mixed univariate in R
library(mixtools)
mixmdl = normalmixEM(train$y)
plot(mixmdl, which = 2)
lines(density(train$y), lty=2, lwd=2)
# credit to [Ron Pearson](https://www.r-bloggers.com/fitting-mixture-distributions-with-the-r-package-mixtools/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment