Skip to content
EvalSuite
Documentation menu

Clinical

Net benefit (decision curve analysis)

Implementedclinical.net_benefit

Definition

Clinical utility of a model across threshold probabilities, compared with treat-all and treat-none strategies.

Formula

NB(pₜ) = TP/N − (FP/N) · pₜ / (1 − pₜ)

Inputs and outputs

  • y_true: array of binary labels {0, 1}
  • y_prob: predicted probability of the positive class in [0, 1]
  • thresholds: threshold probabilities in (0, 1)

Returns: DCAResult (threshold, model, treat_all, treat_none)

Assumptions

  • Threshold probability reflects the relative harm of false positives and false negatives.

Limitations

  • Net benefit is relative to the evaluation population and its prevalence.

Python API

PythonSince v0.2.0
import evalsuite as es

es.net_benefit(y_true, y_prob, threshold=0.2)
es.decision_curve(y_true, {"model": y_prob})

References

  1. Vickers, A. J., & Elkin, E. B. (2006). Decision curve analysis: a novel method for evaluating prediction models. Medical Decision Making, 26(6), 565–574.

Implementation status