Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Update GeneralConfusionMatrix.cs #2191

Open
davidrapan wants to merge 1 commit into accord-net:development
base: development
Choose a base branch
Loading
from davidrapan:patch-1
Open

Update GeneralConfusionMatrix.cs #2191

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
4 changes: 2 additions & 2 deletions Sources/Accord.Statistics/Analysis/Performance/GeneralConfus ionMatrix.cs
View file
Open in desktop
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