vbabenko97 commited on
Commit
e36728b
·
verified ·
1 Parent(s): 1a9c5fa

Update logbook: Repro - Instance-Level Costs for Nuanced Classifier Evaluation

Browse files
logbook.json CHANGED
@@ -11,7 +11,7 @@
11
  "icml2026-repro",
12
  "paper-qMI1xD8O3x"
13
  ],
14
- "updated_at": "2026-07-18T16:06:46+00:00",
15
  "root": {
16
  "slug": "index",
17
  "title": "Repro - Instance-Level Costs for Nuanced Classifier Evaluation",
@@ -73,6 +73,6 @@
73
  }
74
  ]
75
  },
76
- "agent_view_tokens": 11393,
77
- "revision": "1784390806954493000"
78
  }
 
11
  "icml2026-repro",
12
  "paper-qMI1xD8O3x"
13
  ],
14
+ "updated_at": "2026-07-18T16:07:17+00:00",
15
  "root": {
16
  "slug": "index",
17
  "title": "Repro - Instance-Level Costs for Nuanced Classifier Evaluation",
 
73
  }
74
  ]
75
  },
76
+ "agent_view_tokens": 11605,
77
+ "revision": "1784390837996515000"
78
  }
pages/claim-6-delta-regression-calibration-not-accuracy/page.md CHANGED
@@ -26,3 +26,86 @@ Two paper points reproduce:
26
  2. **Calibration diagnostic.** The Jigsaw Δ-MAE of **0.325 log-odds** ≈ the paper's 0.30: regression predictions deviate from the true vote-margin by about a third of a log-odds unit on average — a calibration signal that binary classification does not expose. (NHANES MAE is on the mmHg scale of Δ=SBP−130, so ~10 mmHg, not comparable to the log-odds datasets.)
27
 
28
  This confirms Claim 6: Δ-regression provides calibration information without an accuracy gain over cross-entropy.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  2. **Calibration diagnostic.** The Jigsaw Δ-MAE of **0.325 log-odds** ≈ the paper's 0.30: regression predictions deviate from the true vote-margin by about a third of a log-odds unit on average — a calibration signal that binary classification does not expose. (NHANES MAE is on the mmHg scale of Δ=SBP−130, so ~10 mmHg, not comparable to the log-odds datasets.)
27
 
28
  This confirms Claim 6: Δ-regression provides calibration information without an accuracy gain over cross-entropy.
29
+
30
+
31
+ ---
32
+ <!-- trackio-cell
33
+ {"type": "code", "id": "cell_e5dfab1a8e3b", "created_at": "2026-07-18T16:07:12+00:00", "title": "Run: uv paired_regression_stats.py (exit 0)", "command": ["uv", "run", "python", "scripts/paired_regression_stats.py"], "exit_code": 0, "duration_s": 1.362}
34
+ -->
35
+ ````bash
36
+ $ uv run python scripts/paired_regression_stats.py
37
+ ````
38
+
39
+ exit 0 · 1.4s
40
+
41
+
42
+ ````python title=paired_regression_stats.py
43
+ """Claim 6: paired per-seed test of regression NEC vs classification NEC.
44
+
45
+ The seeds share train/test splits within a dataset, so the honest comparison is
46
+ the PAIRED per-seed difference (regression - standard), not overlapping marginal
47
+ CIs. Reports mean paired difference with a t-based 95% CI and whether the CI
48
+ excludes zero, per dataset.
49
+ """
50
+
51
+ import sys
52
+ from pathlib import Path
53
+
54
+ import numpy as np
55
+ import pandas as pd
56
+ from scipy import stats
57
+
58
+ ROOT = Path(__file__).resolve().parents[1]
59
+
60
+ SOURCES = {
61
+ "Jigsaw TF-IDF": ROOT / "outputs" / "jigsaw_tfidf" / "per_seed.csv",
62
+ "Turkey (any_injury)": ROOT / "outputs" / "turkey" / "per_seed_any_injury.csv",
63
+ "NHANES": ROOT / "outputs" / "nhanes" / "per_seed.csv",
64
+ }
65
+
66
+ rows = []
67
+ for name, path in SOURCES.items():
68
+ df = pd.read_csv(path)
69
+ piv = df.pivot(index="seed", columns="strategy", values="nec")
70
+ d = (piv["regression"] - piv["standard"]).to_numpy() * 100 # NEC points (%)
71
+ n = len(d)
72
+ mean = float(np.mean(d))
73
+ half = float(stats.t.ppf(0.975, n - 1) * np.std(d, ddof=1) / np.sqrt(n))
74
+ rows.append(
75
+ {
76
+ "dataset": name,
77
+ "n_seeds": n,
78
+ "paired_diff_mean_pts": round(mean, 3),
79
+ "ci95_lo": round(mean - half, 3),
80
+ "ci95_hi": round(mean + half, 3),
81
+ "excludes_zero": bool(mean - half > 0 or mean + half < 0),
82
+ }
83
+ )
84
+
85
+ out = pd.DataFrame(rows)
86
+ print("Paired per-seed NEC difference: regression - standard (percentage points)")
87
+ print(out.to_string(index=False))
88
+ out.to_csv(ROOT / "outputs" / "claim6_paired.csv", index=False)
89
+ print(f"wrote {ROOT / 'outputs' / 'claim6_paired.csv'}")
90
+
91
+ ````
92
+
93
+
94
+ ````output
95
+ Paired per-seed NEC difference: regression - standard (percentage points)
96
+ dataset n_seeds paired_diff_mean_pts ci95_lo ci95_hi excludes_zero
97
+ Jigsaw TF-IDF 10 -0.061 -0.091 -0.032 True
98
+ Turkey (any_injury) 10 -0.263 -0.710 0.183 False
99
+ NHANES 10 -0.299 -0.822 0.225 False
100
+ wrote /Users/vitaliibabenko/babenko-dev/repro-31878-instance-level-costs/outputs/claim6_paired.csv
101
+
102
+ ````
103
+
104
+
105
+ ---
106
+ <!-- trackio-cell
107
+ {"type": "artifact", "id": "cell_69ca70a71294", "created_at": "2026-07-18T16:07:13+00:00", "title": "Artifact: claim6_paired.csv", "path": "outputs/claim6_paired.csv", "size": 194, "artifact_type": "dataset", "auto": true}
108
+ -->
109
+ **📦 Artifact** `outputs/claim6_paired.csv` · dataset · 194 B
110
+
111
+ trackio-local-path://outputs/claim6_paired.csv