fixed likelihood computing

This commit is contained in:
Maria Dimashova 2012-04-10 13:21:32 +00:00
parent 74325fe993
commit 411467eab8

View File

@ -530,7 +530,7 @@ void EM::computeProbabilities(const Mat& sample, int& label, Mat* probs, double*
if(logLikelihood)
{
double logWeightProbs = std::log(std::max(DBL_MIN, sum(*sampleProbs)[0]));
double logWeightProbs = std::log(weights.dot(*sampleProbs));
*logLikelihood = logWeightProbs;
}
}