Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Update GeneralConfusionMatrix.cs #2191

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public double[] Precision
if (precision == null)
{
var diagonal = Diagonal;
var totals = ColumnTotals;
var totals = RowTotals;
precision = new double[NumberOfClasses];
for (int i = 0; i < precision.Length; i++)
precision[i] = diagonal[i] == 0 ? 0 : diagonal[i] / (double)totals[i];
Expand All @@ -415,7 +415,7 @@ public double[] Recall
if (recall == null)
{
var diagonal = Diagonal;
var totals = RowTotals;
var totals = ColumnTotals;
recall = new double[NumberOfClasses];
for (int i = 0; i < recall.Length; i++)
recall[i] = diagonal[i] == 0 ? 0 : diagonal[i] / (double)totals[i];
Expand Down