|
@@ -102,3 +102,18 @@ double ClassificationResults::getAverageRecognitionRate() const
|
|
|
confusion.normalizeColumnsL1();
|
|
|
return confusion.trace()/confusion.rows();
|
|
|
}
|
|
|
+
|
|
|
+double ClassificationResults::getOverallRecognitionRate() const
|
|
|
+{
|
|
|
+ const_iterator i = begin();
|
|
|
+ NICE::Matrix confusion ( i->scores.size(),i->scores.size(),0.0 );
|
|
|
+
|
|
|
+ for ( ; i != end(); i++ )
|
|
|
+ {
|
|
|
+ const ClassificationResult & r = *i;
|
|
|
+ uint classno_estimated = r.classno;
|
|
|
+ uint classno_groundtruth = r.classno_groundtruth;
|
|
|
+ confusion( classno_estimated, classno_groundtruth ) += 1;
|
|
|
+ }
|
|
|
+ return confusion.trace()/size();
|
|
|
+}
|