Why the result of GMM(Gaussian mixture model) is not the same for twice calculation?

3 ビュー (過去 30 日間)
When I try to use GMM to fitting a 1000 by 1 array, the result of GMM is totally different for twice simluation.
When I try to use 5 one dimension Gaussian plots to fitting the data,
The first time result of Mu_1=[0.6024; 0.4846; 0.5539; 0.6394; 0.4156]; and the second time result of Mu_2=[0.5433; 0.6574; 0.4666; 0.4642; 0.5579];
I don't know why the result is not the same.
The data is attached.

採用された回答

the cyclist
the cyclist 2019 年 3 月 27 日
There is a random component to the fitting algorithm. The results will not be exactly the same each time, because the pseudorandom number generator will not give the same values each time through.
If you put the line
rng default
at the beginning of your code, it will start the generator at the default location each time, and you will get the same results.
Also, given that your data doesn't really look like five gaussians, I am not surprised that you get unstable results. Or maybe I misunderstand something.
test.png
  2 件のコメント
Yihan Ma
Yihan Ma 2019 年 3 月 28 日
Thanks for your reply.
I understand what you mean. But I have another question.
If the result is not the same, how could use this method to classify diiferent data?
I mean, if I have many different of types, if I generate the GMM results one by one, even the same data has different GMM results. Could I classify these data?
the cyclist
the cyclist 2019 年 3 月 28 日
All modeling methods have error. The only advice I can offer is to try to understand your method(s) well enough that you really understand that error.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by