Skip to content
EvalSuite
Documentation menu

Clinical

Specificity

Implementedclinical.specificity

Definition

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

PythonSince v0.1.0
import evalsuite as es

es.specificity(y_true, y_pred)

References

  1. Altman, D. G., & Bland, J. M. (1994). Diagnostic tests 1: sensitivity and specificity. BMJ, 308(6943), 1552.

Implementation status