Getting different values between `sklearn.metrics` and `torchmetrics`

hey @sudarshan85

in sklearn the default average reduction is binary whereas in torchmetrics, it is micro

in torchmetrics you can do it like:

print(torchmetrics.Recall(average='none', num_classes=2)(preds_pt, targets_pt)[1])
print(torchmetrics.Precision(average='none', num_classes=2)(preds_pt, targets_pt)[1])
print(torchmetrics.F1Score(average='none', num_classes=2)(preds_pt, targets_pt)[1])

with none, it computes the individual metrics for each class, which is [0, 1] here, and just like sklearn pick the positive class.

Also, we have moved the discussions to GitHub Discussions. You might want to check that out instead to get a quick response. The forums will be marked read-only soon.

Thank you