Skip to content
EvalSuite
Documentation menu

Clinical

Diagnostic odds ratio

Implementedclinical.diagnostic_odds_ratio

Definition

Ratio of the odds of a positive result in people with the condition to the odds in people without it.

Formula

DOR = (TP · TN) / (FP · FN) = LR+ / LR−

Range: [0, ∞)

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

  • Undefined when FP or FN is zero unless a continuity correction is requested explicitly.

Python API

PythonSince v0.2.0
import evalsuite as es

es.diagnostic_odds_ratio(y_true, y_pred)
es.diagnostic_report(y_true, y_pred)  # every measure with a CI

References

  1. Glas, A. S., Lijmer, J. G., Prins, M. H., Bonsel, G. J., & Bossuyt, P. M. M. (2003). The diagnostic odds ratio: a single indicator of test performance. Journal of Clinical Epidemiology, 56(11), 1129–1135.

Implementation status