torchmetrics icon indicating copy to clipboard operation
torchmetrics copied to clipboard

OvO support on AUROC

Open chris-tkinter opened this issue 3 years ago • 0 comments

🚀 Feature

Hi in the sklearn API there is a multi_class parameters which can be set to ‘ovr or ‘ovo'. But it seems that this is not yet implemented in the torchmetrics.

Motivation

In sklearn we can compute ovo AUC, but currently this is not supported

tm = AUROC(num_classes=7, average='macro')
x = torch.randn(100, 7).softmax(1)
y = torch.randint(7, (100, ))
print(tm(x, y), roc_auc_score(y, x, average="macro", multi_class="ovo"))

Additional context

Using torchmetrics 0.6.0

chris-tkinter avatar Nov 03 '21 09:11 chris-tkinter