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¶
Score categorical log probabilities directly, preserving extreme logits. |
|
Compute the classwise expected calibration error for PyTorch tensors. |
|
Compute the confidence expected calibration error for PyTorch tensors. |
|
Compute log loss without logging zero probabilities of classes with no target mass. |
|
Compute the log probabilities of a torch tensor. |
|
One-hot encode the first maximum of each probability vector of a torch tensor. |
|
Compute precision-recall curve along the last axis. |
|
Return a torch tensor of probabilities unchanged. |
|
Score normalized categorical probabilities with target-aware logarithms. |
|
Compute ROC curve along the last axis. |