Skip to content

Commit

Permalink
fix specificity documentation when metric is not defined (closes Ligh…
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas Ewecker committed Apr 3, 2024
1 parent d6b5b98 commit 95a0fa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/torchmetrics/classification/specificity.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ class Specificity(_ClassificationTaskWrapper):
.. math:: \text{Specificity} = \frac{\text{TN}}{\text{TN} + \text{FP}}
Where :math:`\text{TN}` and :math:`\text{FP}` represent the number of true negatives and false positives
respectively. The metric is only proper defined when :math:`\text{TP} + \text{FP} \neq 0`. If this case is
respectively. The metric is only proper defined when :math:`\text{TN} + \text{FP} \neq 0`. If this case is
encountered for any class/label, the metric for that class/label will be set to 0 and the overall metric may
therefore be affected in turn.
Expand Down

0 comments on commit 95a0fa6

Please sign in to comment.