Metrics for AUC

I am new to this community. Just wondering what metrics from fastai libraries should I use to calculate Area Under the Curve and Confusion Matrix for tabular data.

I use the following code.
from sklearn.metrics import roc_auc_score
def roc_score(inp, target):
_, indices = inp.max(1)
return torch.Tensor([roc_auc_score(target, indices)])[0]

learn = cnn_learner(data, models.densenet161, metrics=[accuracy, roc_score], loss_func=loss_func, ps=0.5, wd=1e-1).to_fp16()
2 Likes