Skip to content

Commit

Permalink
docs: fix specificity when metric is not defined (#2491)
Browse files Browse the repository at this point in the history
Co-authored-by: Lukas Ewecker <lukasewecker@web.de>
  • Loading branch information
lukazso and Lukas Ewecker authored Apr 10, 2024
1 parent f3582bd commit e5b1135
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 e5b1135

Please sign in to comment.