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
- Matrix from Python to MATLAB
- matlab – Python: Average of multiple 2D curves
- matlab – reading v 7.3 mat file in python
- matlab – Initialize empty matrix in Python
- How to convert matlab code to python code automatically
- matlab – Parfor for Python
- python – Equivalent to matlabs imagesc in matplotlib?
- A tool to convert MATLAB code to Python