= 4
n_classes = torch.normal(0, 1, (16, 20, n_classes))
inp = torch.randint(0, n_classes, (16, 20)).to(torch.int8)
targ _mAP(inp, targ)
0.27493315845795063
Metrics not included in fastai.
MatthewsCorrCoefBinary (sample_weight=None)
Matthews correlation coefficient for single-label classification problems
get_task_metrics (dls, binary_metrics=None, multi_class_metrics=None, regression_metrics=None, verbose=True)
All metrics applicable to multi classification have been created by Doug Williams (https://github.com/williamsdoug). Thanks a lot Doug!!
F1_multi (*args, **kwargs)
Fbeta_multi (inp, targ, beta=1.0, thresh=0.5, sigmoid=True)
Computes Fbeta when inp
and targ
are the same size.
balanced_accuracy_multi (inp, targ, thresh=0.5, sigmoid=True)
Computes balanced accuracy when inp
and targ
are the same size.
specificity_multi (inp, targ, thresh=0.5, sigmoid=True)
Computes specificity (true negative rate) when inp
and targ
are the same size.
recall_multi (inp, targ, thresh=0.5, sigmoid=True)
Computes recall when inp
and targ
are the same size.
precision_multi (inp, targ, thresh=0.5, sigmoid=True)
Computes precision when inp
and targ
are the same size.
metrics_multi_common (inp, targ, thresh=0.5, sigmoid=True, by_sample=False)
Computes TP, TN, FP, FN when inp
and targ
are the same size.
accuracy_multi (inp, targ, thresh=0.5, sigmoid=True, by_sample=False)
Computes accuracy when inp
and targ
are the same size.
mae (inp, targ)
Mean absolute error between inp
and targ
.
mape (inp, targ)
Mean absolute percentage error between inp
and targ
.