Commit c3e1d06
committed
Stage 7: peer-review-grade significance and bootstrap statistics
Adds analysis_pipeline/stage7_significance.py and wires it into the
run_pipeline orchestrator and both YAML profiles. Stage 7 derives every
inferential statistic referenced in the paper's Statistical Significance
Procedures section directly from the ml_results_<scenario>_classic_nn.json
files emitted by Stage 6:
* Paired Wilcoxon signed-rank (3 s overlap vs 6 s baseline) over the
60 matched scenario x dataset x protocol best-model cells.
* 2000-sample percentile-method nonparametric bootstrap on outer-fold
balanced accuracies for per-cell 95 percent CIs.
* One-sided Wilcoxon signed-rank vs the per-scenario chance level
(1/n_classes) for each cell.
* Vectorised 10000-iteration label-shuffle permutation test on
held-out predicted-label vectors reconstructed from per-fold
confusion matrices, with Bonferroni correction over the full
120-cell grid.
* Optional paired Wilcoxon on baseline-vs-task heart rate from the
Stage 1 QC summary (used in the manuscript's QC sanity check).
Outputs a machine-readable significance_summary.json plus a Markdown
report. Reproduces the manuscript exactly: W=1636, p=5.55e-8, paired
n=60, mean balanced accuracy 0.324 -> 0.380, 46/14/0 cells improved/
worsened/unchanged, 27 winner-identity changes, 111/120 cells with
one-sided Wilcoxon vs chance p<0.05; with N=10000 perms the 10
scenario winners survive Bonferroni (threshold 4.17e-4).1 parent b41a126 commit c3e1d06
4 files changed
Lines changed: 1109 additions & 0 deletions
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
| |||
869 | 870 | | |
870 | 871 | | |
871 | 872 | | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
872 | 907 | | |
873 | 908 | | |
874 | 909 | | |
| |||
0 commit comments