Clinical
Specificity
Implemented
clinical.specificityDefinition
Proportion of people without the condition whom the test correctly identifies as negative.
Formula
Specificity = TN / (TN + FP)
Range: [0, 1]
Inputs and outputs
- y_true: binary reference standard
- y_pred: binary test result
Returns: float
Assumptions
- Defined for binary tasks only.
Limitations
No metric-specific limitations are documented yet. Interpret the value alongside the task, data, and other metrics.
Python API
import evalsuite as es
es.specificity(y_true, y_pred)References
- Altman, D. G., & Bland, J. M. (1994). Diagnostic tests 1: sensitivity and specificity. BMJ, 308(6943), 1552.