Clinical
Positive predictive value
Implemented
clinical.ppvDefinition
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
import evalsuite as es
es.precision(y_true, y_pred) # positive predictive valueReferences
- Altman, D. G., & Bland, J. M. (1994). Diagnostic tests 2: predictive values. BMJ, 309(6947), 102.