gaussian – GMM by fitgmdist in MATLAB gives different results when running all iterations at once or iteratively

gaussian – GMM by fitgmdist in MATLAB gives different results when running all iterations at once or iteratively

The stopping is likely related to the convergence check in MATLAB/R201Xy/toolbox/stats/stats/@gmdistribution/private/gmcluster.m about halfway through in gmcluster_learn:

%check if it converges
llDiff = ll-ll_old;
if llDiff >= 0 && llDiff < options.TolFun *abs(ll)                                                                                                                    
    optimInfo.Converged=true;
    break;
end
ll_old = ll; 

where ll is set via [ll,post] = estep(log_lh);, but near the top of the function it sets

ll_old = -inf;

so when you run all at once, llDiff shrinks over the iterations but when you run one by one, it remains large and the convergence check always fails.

gaussian – GMM by fitgmdist in MATLAB gives different results when running all iterations at once or iteratively

Related posts

Leave a Reply

Your email address will not be published. Required fields are marked *