I am construction a deep neural network for a classification task, when I look at the metrics, I have a specificity of 1.04. Is it possible to have this metric over 100 ? How do you interpret it? Thank you.
$\begingroup$
$\endgroup$
2
-
2$\begingroup$ I think there was an error in my formula, I did Specificity TN/(TP+FP) instead of TN/(TN+FP) $\endgroup$– user979974Commented Jan 5, 2022 at 16:53
-
$\begingroup$ As you discovered, there was a mistake: it's impossible for specificity to be higher than 1, it's a probability. $\endgroup$– ErwanCommented Jan 5, 2022 at 21:12
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
The specificity is defined as
$Specificity = \frac{\sum{True Negative} }{\sum{True Negative} + \sum{False Positive} }$.
These counts are strictly positive values and as such the specificity cannot be negative. You can also see that the specificity must be less than 1 because it is a ratio.
For more details on sensitivity and specificity you can check this answer: Usage of Precision Recall on an unbalanced dataset