projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74325fe
)
fixed likelihood computing
author
Maria Dimashova
<no@email>
Tue, 10 Apr 2012 13:21:32 +0000
(13:21 +0000)
committer
Maria Dimashova
<no@email>
Tue, 10 Apr 2012 13:21:32 +0000
(13:21 +0000)
modules/ml/src/em.cpp
patch
|
blob
|
history
diff --git
a/modules/ml/src/em.cpp
b/modules/ml/src/em.cpp
index
72617f9
..
ea70a06
100644
(file)
--- a/
modules/ml/src/em.cpp
+++ b/
modules/ml/src/em.cpp
@@
-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;
}
}