![test.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/210738/test.png)
Why the result of GMM(Gaussian mixture model) is not the same for twice calculation?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Yihan Ma
el 27 de Mzo. de 2019
Comentada: the cyclist
el 28 de Mzo. de 2019
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.
0 comentarios
Respuesta aceptada
the cyclist
el 27 de Mzo. de 2019
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/210738/test.png)
2 comentarios
the cyclist
el 28 de Mzo. de 2019
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.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!