mirror of
https://github.com/dgirardeau/q3DMASC.git
synced 2026-08-29 08:34:48 +08:00
Update confusionmatrix.cpp
This commit is contained in:
+4
-4
@@ -57,10 +57,10 @@ void ConfusionMatrix::compute_precision_recall_f1_score(cv::Mat& confusion_matri
|
||||
FN += confusion_matrix.at<int>(realIdx, predictedIdx);
|
||||
}
|
||||
int den = TP + FN;
|
||||
if (den == 0)
|
||||
precision_recall_f1_score.at<float>(RECALL, realIdx) = CCCoreLib::NAN_VALUE;
|
||||
else
|
||||
precision_recall_f1_score.at<float>(RECALL, realIdx) = TP / den;
|
||||
// if (den == 0)
|
||||
// precision_recall_f1_score.at<float>(RECALL, realIdx) = CCCoreLib::NAN_VALUE;
|
||||
// else
|
||||
// precision_recall_f1_score.at<float>(RECALL, realIdx) = TP / den;
|
||||
}
|
||||
|
||||
// compute F1-score
|
||||
|
||||
Reference in New Issue
Block a user