I wrote a algorithm based on GMM. After a few iterations the following problem is caused: density values in Some observations are zero and the entire algorithm makes trouble.

For example, for i=67203 from observations, the density values in all components is zero (not even a small number).

With this code, I calculated the density of all components for this observation and all became zero.

for l=1:9

pr(l)=mvnpdf(y(67203,:),mu(l,:),sigma(:,:,l))

end

Hence, posterior probabilites and then parameters (mu and sigma matrix) are NaN.

Is there a way to prevent this zero values for densites and NaN values for Posteriori probabilities?

More Hamideh Sadat Fatemi Ghomi's questions See All
Similar questions and discussions