clfkit report

model rf · 2 classes · split sizes {'train': 284, 'calib_fit': 85, 'calib_conf': 86, 'test': 114} · calibration: temperature

0.947test accuracy0.052test ECE0.947APS coverage (target 0.95)1.04APS 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
rf0.9120.1750.0610.336
logreg0.9300.2290.0470.029
hgb0.9120.3860.0740.072

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.9470.0290.3480.0770.934
temperature0.9470.0520.3520.0880.986
platt0.9470.0490.3550.0890.986
isotonic0.9470.0581.4600.1070.995

3. Conformal prediction sets

Thresholds from calib_conf (n=86); coverage measured on test. Guarantee: marginal coverage ≥ 0.95 (and ≤ 0.961 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.9561.0180.9820.0000.944
lac_mondrian0.9471.0880.9120.0000.931
aps0.9471.0350.8950.0350.944
aps_mondrian0.9911.1490.8510.0000.976

4. Abstention (selective classification)

Answer only if confidence ≥ 0.8000. On calib_conf: 77 answered, 2 wrong, simultaneous upper bound on selective risk 0.1382 ≤ target 0.15 (Clopper-Pearson, Bonferroni over 53 fixed thresholds, δ=0.05).

On test: coverage 0.982, selective risk 0.0446. AURC 0.0266.

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.930; median certified radius 1.716.

Empirical stability of the final model (rf) 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.0501.0001.000
0.1000.9970.991
0.2000.9820.974
0.5000.9530.877

Generated by clfkit. Raw numbers: summary.json.