Separate Drawing of Gaussian Mixture Model
Show older comments
I have a 1D data which need to be separated by two .
So I used
fitgmdist(data,2);
and got
- mu
- sigma
- component proportion
for each of the gaussian distribution.
And here is the graph. (Gray : Data, Blue : psd of GMModel from fitgmdist)

Until here, everything was okay.
So, question.
How can I separate those two gaussian distribution graph?
I tried
- Using makedist('Normal') to create each gaussian distribution.
- Multiply by each component proportion
- Add two distribution up
But somehow I wasn't able to get the same graph overlapping picture above.
Probably I have the wrong concept of "Normalization" or "Gaussian Mixture Model".
Any advise or site to lookup would be grateful.
------------------------------------------------------------ @Image Analyst: data uploaded. thanks for the advice I'll remember that next time :)
5 Comments
Image Analyst
on 27 Jan 2016
Care to attach your data and code so people can try some things?
Amr Hashem
on 26 Mar 2017
what is the code u use to fit the Gaussian of mixtures one dimentional?
Trisha Kibaya
on 20 Aug 2018
Hi Ji Hoon Jeong, could you please share your codes? I am trying to get the same gaussian model on my one dimensional data but i'm not sure of what I am doing. Thanks a lot.
Ji Hoon Jeong
on 24 Aug 2018
Edited: Ji Hoon Jeong
on 24 Aug 2018
Trisha Kibaya
on 28 Aug 2018
Thanks a lot, this helped a lot!
Accepted Answer
More Answers (2)
yusra Ch
on 5 Sep 2020
0 votes
Could you plz tell me how did you plot the bleu line in your graph ? I have GM that I want to draw but I dont know how to do it . could you plz help me?
gm =
Gaussian mixture distribution with 2 components in 1 dimensions
Component 1:
Mixing proportion: 0.500000
Mean: 3.3153
Component 2:
Mixing proportion: 0.500000
Mean: -61.5348
The values of Sigma are :
val(:,:,1) =
15.3648
val(:,:,2) =
137.2863
1 Comment
Ji Hoon Jeong
on 18 Sep 2020
cynthia thing
on 31 Dec 2020
0 votes
Hi , could you share the code for the histogram with fitted mixture model curve like the first picture above?
Much appreciated
Categories
Find more on Gaussian Mixture Models in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!