CoverageRate#
- class torch_uncertainty.metrics.classification.CoverageRate(num_classes=None, average='micro', validate_args=True, **kwargs)[source]#
Empirical coverage rate metric.
- Parameters:
num_classes (
int|None) – Number of classes. Defaults toNone.average (
str) –Defines the reduction that is applied over labels. Defaults to
"macro". Should be one of the following:'macro': Compute the metric for each class separately and find their unweighted mean. This does not take label imbalance into account.'micro': Sum statistics across over all labels.
validate_args (
bool) – Whether to validate the arguments. Defaults toTrue.kwargs – Additional keyword arguments, see Advanced metric settings.
- Raises:
ValueError – If num_classes is None and average is not micro.
ValueError – If num_classes is not an integer larger than 1.
ValueError – If average is not one of macro or micro.