clfkit report

model hgb · 4 classes · split sizes {'train': 1800, 'calib_fit': 300, 'calib_conf': 300, 'test': 600} · calibration: temperature

0.958test accuracy0.013test ECE0.925APS coverage (target 0.90)1.05APS avg set size

1. Model comparison

Internal 80/20 split of the training rows; sorted by validation log-loss (a proper scoring rule).

modelval_accuracyval_log_lossval_ecefit_seconds
hgb0.9390.2800.0510.987
logreg0.9080.4420.2000.128
rf0.9330.4530.2510.920

2. Calibration

Each calibrator is fitted on calib_fit and evaluated on test. ECE: binned |accuracy - confidence| (15 bins). NLL and Brier are proper scores (lower is better).

methodaccuracyecenllbriermean_confidence
none0.9580.0240.1450.0640.980
temperature0.9580.0130.1280.0620.966
platt0.9630.0120.1300.0610.967
isotonic0.9580.0220.3560.0640.969

3. Conformal prediction sets

Thresholds from calib_conf (n=300); coverage measured on test. Guarantee: marginal coverage ≥ 0.90 (and ≤ 0.903 for continuous scores) on average over calibration draws, if data are exchangeable. Per-class coverage is not guaranteed by the marginal method; Mondrian conformal fixes this per class at the cost of larger sets.

methodcoverageavg_set_sizesingletonsemptyworst_class_cov
lac0.9030.9150.9150.0850.868
lac_mondrian0.9120.9270.9270.0730.875
aps0.9251.0470.8580.0580.889
aps_mondrian0.9251.0500.8550.0580.882

4. Abstention (selective classification)

Answer only if confidence ≥ 0.5000. On calib_conf: 293 answered, 4 wrong, simultaneous upper bound on selective risk 0.0498 ≤ target 0.05 (Clopper-Pearson, Bonferroni over 53 fixed thresholds, δ=0.05).

On test: coverage 0.992, selective risk 0.0353. AURC 0.0037.

Guaranteed: with prob. ≥ 1-δ over the held-out draw, the true error rate among answered inputs is ≤ target, for future data from the same distribution. Not guaranteed: per-input correctness, the realised rate on a small batch, the fraction answered, or anything under drift.

5. Robustness

Exact L2 certificate for the logistic-regression baseline in its preprocessed features (standardised numerics / one-hot / TF-IDF): no perturbation of norm below the radius can change its predicted label. Clean accuracy 0.960; median certified radius 0.088.

Empirical stability of the final model (hgb) under random noise (numeric: Gaussian with sd = σ × feature sd; text: each token dropped with prob. σ). Random noise is much weaker than adversarial noise: this is a smoke test, not a certificate.

sigmaagreementstable_all
0.0500.9870.966
0.1000.9750.940
0.2000.9640.926
0.5000.8730.704

6. Drift check

DRIFT DETECTED (level 0.01; reference n=600, new n=600). Alarms: {"features": true, "scores": false, "c2st": true}

Score drift (KS on confidence): stat 0.073, p=7.94e-02; mean confidence 0.966 → 0.962.
Classifier two-sample test: held-out accuracy 0.648 (chance 0.5), p=1.68e-13.

featureteststatisticpp_holm
text[oov_rate]KS0.9900
channelchi22.120.3471
text[length]KS0.03670.8151
n_prev_ticketsKS0.0350.8561

Label-shift estimate (valid only if p(x|y) is unchanged; confusion-matrix condition number 1.1):

classreferenceestimated_new (BBSE)predicted_new
account0.2520.2480.238
billing0.2520.2390.248
shipping0.2400.2520.247
technical0.2570.2600.267

Generated by clfkit. Raw numbers: summary.json.