Skip to content
EvalSuite
Documentation menu

Clinical

Positive predictive value

Implementedclinical.ppv

Definition

Probability that a person with a positive result has the condition.

Formula

PPV = TP / (TP + FP)

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; values from one population do not transfer to another with different prevalence.

Python API

PythonSince v0.1.0
import evalsuite as es

es.precision(y_true, y_pred)  # positive predictive value

References

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

Implementation status