VariationRatioCriterion#
- class torch_uncertainty.ood_criteria.VariationRatioCriterion[source]#
OOD criterion based on variation ratio.
This criterion computes the variation ratio from ensemble predictions. Higher variation ratio values indicate greater uncertainty.
Given ensemble predictions where \(n_{\text{mode}}\) is the count of the most frequently predicted class among \(K\) predictions, the variation ratio is computed as:
\[\text{VR} = 1 - \frac{n_{\text{mode}}}{K}\]- Variables:
ensemble_only (bool) – Requires ensemble predictions.
input_type (OODCriterionInputType) – Expected input type is estimated probabilities.