I have the following data, which when plotted as a histogram, are a mixture of Gaussians:
I would like to write an algorithm that would infer:
(1) the number of "peaks" or normal distributions in this data (i.e. three in the above) (2) the mean/position of each gaussian (3) the variance of each Gaussian (4) the height of each Gaussian/peak
However, I do not know a prior the number of Gaussians in the dataset. Sometimes, there could be four:
or maybe even seven:
If this is an application of the EM algorithm, the latent variables are mean \mu, variance \sigma, and the parameter is k, the number of peaks? As I don't know the number of clusters a priori, is this a different problem?
It seems like I'm using density estimation/unsupervised learning first to infer the number of clusters/gaussians, and then EM to infer the parameters (i.e. the information of each peak). What solutions exist for this problem?