Skip to content
EvalSuite
Documentation menu

Clinical

Negative predictive value

Implementedclinical.npv

Definition

Probability that a person with a negative result does not have the condition.

Formula

NPV = TN / (TN + FN)

Range: [0, 1]

Inputs and outputs

  • y_true: binary reference standard
  • y_pred: binary test result

Returns: float

Assumptions

No assumptions beyond valid, aligned inputs of the documented types.

Limitations

  • Depends on prevalence.

Python API

PythonSince v0.1.0
import evalsuite as es

es.npv(y_true, y_pred)

References

  1. Altman, D. G., & Bland, J. M. (1994). Diagnostic tests 2: predictive values. BMJ, 309(6947), 102.

Implementation status