torch

PyTorch implementation of Metrics.

Note

There is no TorchSingletonCredalSet or TorchDiscreteCredalSet in probly.representation.credal_set.torch; for those semantics, use the numpy-side NumpySingletonCredalSet / NumpyDiscreteCredalSet types. The remaining torch credal sets (Convex, DistanceBased, ProbabilityIntervals, DirichletLevelSet) all use the interval-dominance rule via their lower() / upper() envelopes.

Functions

torch_accuracy

Compute top-1 classification accuracy for PyTorch tensors.

torch_auc

Compute area under a curve using the trapezoid rule.

torch_average_precision_score

Compute average precision for PyTorch tensors.

torch_classwise_ece

Compute the classwise expected calibration error for PyTorch tensors.

torch_expected_calibration_error

Compute the confidence expected calibration error for PyTorch tensors.

torch_false_negative_rate

Compute the false negative rate for PyTorch tensors.

torch_false_positive_rate

Compute the false positive rate for PyTorch tensors.

torch_precision_recall_curve

Compute precision-recall curve along the last axis.

torch_roc_auc_score

Compute area under the ROC curve for PyTorch tensors.

torch_roc_curve

Compute ROC curve along the last axis.