Incorrect result in computing MulticlassRecall
macro average when ignore_index
is specified
#2441
Labels
MulticlassRecall
macro average when ignore_index
is specified
#2441
馃悰 Bug
Specifying the
ignore_index
argument inMulticlassRecall
leads to incorrect results when computing the macro average.To Reproduce
Expected behavior
In the toy example above there are two classes (0 and 1) and two instances of each class. I want to ignore class 0 altogether (hence
ignore_index=0
), so I would expect the first two predictions to be ignored entirely (since they relate to class 0 instances). Of the remaining two predictions only one is correct, so I would expect the recall score to be0.5
.However, the actual result is
0.25
. It looks as if the recall score for theignore_index
class is simply set to 0 before computing the average, causing the average to be computed as(0 + 0.5) / 2
instead of0.5 / 1
.Environment
The text was updated successfully, but these errors were encountered: