EM was not checking for convergence properly.

This commit is contained in:
Vitor Santos Costa 2008-11-02 15:58:29 +00:00
parent ac34be01b0
commit 941d3c3f13

View File

@ -81,7 +81,7 @@ em_loop(Its, Likelihood0, State, MaxError, MaxIts, LikelihoodF, FTables) :-
writeln(Likelihood:Likelihood0:Tables),
(
(
(Likelihood - Likelihood0)/Likelihood < MaxError
abs((Likelihood - Likelihood0)/Likelihood) < MaxError
;
Its == MaxIts
)