ROC AUC from score groups | implementation validation | 2026-11-05

Extract all files to one folder. Use Python 3.9+ and Node.js 18+.
Run: python3 verify_roc.py
To compare against another checkout, supply the path to its roc-tie-audit.mjs.
Its sibling input.mjs must be present. The script needs no third-party packages.

The Python reference computes the trapezoidal empirical ROC area using exact
fractions. The Node runner executes the actual calculator. The per-fixture CSV
records expected/observed results, input class counts, error, and pass status.
The Python script defines or deterministically generates every synthetic input.

Recorded execution: Python 3.12.8; Node.js v22.17.0.
Worked: 6 passed. Exhaustive: 496 passed. Large: 20 passed. Invalid: 12 rejected.
Largest absolute AUC error: 6.734437143348198e-16. Absolute tolerance: 1e-12.
ROC module SHA-256: e20b52971a795e7be207b681788a76b784e66e99959b0168dee34394bf1b7acd
Input parser SHA-256: 2cb0fd6bdba522cd579741c7c9e2a5727d821e4f6e879d856958be9fde113101

The CSV contains the exact rational AUC as numerator/denominator for valid
cases, and the expected rejection status for invalid cases. Read that column
as text in spreadsheet applications. The maximum error is computed against
the exact rational reference before display rounding.
