Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.
Python cliconsumer-gpudpofine-tuningggufhuggingfacellmllmopslocal-ailocal-llmloralow-vrammachine-learningollamapeftpythonpytorchqlorasfttransformers
fix(ab): decide soup ab with a variance-robust NIG Bayes factor, no burn-in (#1265) (#1419)
Abdulwaarith Zakariyyaf47d6668ba0e
diff --git a/benchmarks/README.md b/benchmarks/README.mdindex 312f29f3..4b4d2dac 100644--- a/benchmarks/README.md+++ b/benchmarks/README.md@@ -43,6 +43,7 @@ They are the evidence behind the preprint:| [`gate-725-lorafa-operating-point.md`](gate-725-lorafa-operating-point.md) | PEFT LoRA-FA optimizer operating point ([#725](https://github.com/MakazhanAlpamys/Soup/issues/725)) | Measured 50.0% fewer trainable adapter parameters and 50.0% fewer AdamW state elements; analytic $r / d_{in}$ activation retention for adapted projections. Micro-benchmark only; explicitly not total LLM peak VRAM, throughput, or quality claim. || [`gate-836-bench-train-contract.md`](gate-836-bench-train-contract.md) | What `soup bench train` reports on a real card ([#836](https://github.com/MakazhanAlpamys/Soup/issues/836), shipped in [#1146](https://github.com/MakazhanAlpamys/Soup/pull/1146)) — the published reference run that acceptance item 7 asked for, on an RTX 5070 Laptop **on battery at a 50 W cap** | **The contract holds; the number does not repeat.** Over **thirteen runs of a byte-identical config** the config hash, token counts, `max_memory_allocated`, `max_memory_reserved` and all three checks are **identical to the byte**, while reported throughput spans **376.4–915.3 supervised tok/s, 2.43x** (CV 35.3%). The noise is **additive, not multiplicative**: across four shapes whose fast-mode step spans 26x (0.197–5.26 s) the fastest and slowest repeat differ by a near-constant **0.17–0.28 s per step** — 4.6% on a 5.3 s step, 1.9x on a 0.2 s one — and a longer window does **not** average it away (160 counted steps still spread 1.89x). Two explanations were tested and **both refuted by their own covariate** (peer processes; CPU frequency, where the highest-frequency run is in the slow half). Also: one shape **completed while allocating 1.51x the card's VRAM** (WDDM spill — `memory` is the allocator's truth, not a fit), `provenance.sm_clock_mhz_after_run` is an **idle reading** that cannot discriminate a 1.83x difference (since replaced by the busy-window `sm_clock_mhz_busy` in [#1177](https://github.com/MakazhanAlpamys/Soup/pull/1177); see the record's addendum), and `config_hash` changes with `--steps` because the tool's own `save_steps` override is inside it. Four refusals exercised verbatim; one **contaminated run** kept in || [`gate-1227-ab-burn-in.md`](gate-1227-ab-burn-in.md) | The burn-in of `soup ab`'s two-sided mSPRT ([#1227](https://github.com/MakazhanAlpamys/Soup/issues/1227)): how many rows per arm before any verdict, so that re-running the test after every new pair keeps its false-positive rate at `--alpha` | **30 rows at alpha >= 0.05, 40 below**, calibrated over runs of up to 1000 rows per arm: worst Type-I **0.0512** at alpha 0.05 (bound 0.0521). At alpha 0.01 the sweep's 0.01088 is inside its bound (0.01094) **only in this seed set**: two of three other seed sets reached 0.0113 and 0.0116, and pooled over seeds the worst case is near **0.0108, about 8% over nominal**, a floor set by the estimated variance that more rows do not lower ([#1265](https://github.com/MakazhanAlpamys/Soup/issues/1265)). A 200-row horizon had picked 20 rows, which reach 0.0534 by 1000 rows. Not calibrated below alpha 0.01 (0.0058 at 0.005). With the true variance the rate stays below alpha everywhere |+| [`gate-1265-ab-nig.md`](gate-1265-ab-nig.md) | `soup ab`'s variance-robust statistic ([#1265](https://github.com/MakazhanAlpamys/Soup/issues/1265)): the normal-inverse-gamma Bayes factor that replaced the #1227 burn-in, with the first rows per arm held out to set the prior scale | **No burn-in; `PRIOR_SCALE_ROWS = 5`.** Worst Type-I under a peek after every pair, runs to 1000 rows: **0.0328** at alpha 0.05, **0.0066** at alpha 0.01, 0.0034 at 0.005 (burn-in: 0.0511 / 0.0110 / 0.0058). Power >= 0.996 from effect_size / sigma 0.3 up (burn-in ~0.82 there); costs: less power below 0.2 and a slower `accept_h0` under H0 (~281 pairs at 0.5 vs 43) |## Harnesses@@ -81,6 +82,7 @@ only in a scratchpad on a machine that is gone, which is| [issue725_lorafa_operating_point.py](harness/issue725_lorafa_operating_point.py) | #725 / [gate-725-lorafa-operating-point.md](gate-725-lorafa-operating-point.md) | Measures trainable parameter counts, AdamW state tensor allocations, step latency, and multi-step loss finiteness between LoRA and LoRA-FA | ~20 s, CPU or GPU, no downloads || [`ab_burn_in_sweep.py`](harness/ab_burn_in_sweep.py) | [#1227](https://github.com/MakazhanAlpamys/Soup/issues/1227) / [`gate-1227-ab-burn-in.md`](gate-1227-ab-burn-in.md) | What false-positive rate does `soup ab`'s burn-in leave when the test is re-run after every new pair? A vectorised H0 simulation of the shipped statistic, checked against `_verdict_from_summary` first, by effect_size / sigma, burn-in, alpha and horizon; picks `BURN_IN_ROWS_BY_ALPHA` | CPU + numpy; ~55 s per ratio at 100,000 runs over 1000 rows; `run` writes JSON parts, `report` merges them || [`head_prefetch_ab.py`](harness/head_prefetch_ab.py) | [#1174](https://github.com/MakazhanAlpamys/Soup/issues/1174) / [#1258](https://github.com/MakazhanAlpamys/Soup/pull/1258) | Interleaved A/B, in one process on one model, of where the output head's load into the shared large-layer slot is issued: `StreamPrefetcher.head_prefetch_layer` at `None` (the last decoder layer, the original timing) against a chosen layer (`0`, right after the embedding lookup). Judges each arm by the step's TOTAL wait from the committed `stream_probe.Instruments` brackets, plus per-group medians (embedding, head, layer 0, other decoder layers), since a decoder entry behind the head on the copy stream can get worse while the head's own entry improves. Covers both tiers, `--read-ahead`, and a `--step-shape preference` (a no-grad forward first) for the disk-tier case where the reader's queue gets replanned. Refuses to run on a tree without `head_prefetch_layer` instead of comparing an arm with itself; the JSON records `soup_cli_file` and `git_sha`, the tree it measured | CUDA GPU; model weights; a few minutes per arm pair |+| [`ab_nig_sweep.py`](harness/ab_nig_sweep.py) | [#1265](https://github.com/MakazhanAlpamys/Soup/issues/1265) / [`gate-1265-ab-nig.md`](gate-1265-ab-nig.md) | Type-I and power of `soup ab`'s NIG mixture under a peek after every pair, side by side with the #1227 burn-in design, by effect_size / sigma, held-out rows, alpha and horizon; checked against `_nig_log_bayes_factor` and `msprt_step` first; picks `PRIOR_SCALE_ROWS` | CPU + numpy; ~350 s per ratio at 100,000 H0 runs over 1000 rows; `run --mode h0/h1` writes JSON parts, `report` merges them |## Hardwarediff --git a/benchmarks/gate-1227-ab-burn-in.md b/benchmarks/gate-1227-ab-burn-in.mdindex 601a3ccf..ce511954 100644--- a/benchmarks/gate-1227-ab-burn-in.md+++ b/benchmarks/gate-1227-ab-burn-in.md@@ -4,6 +4,10 @@ Measured on 2026-09-25 for [#1227](https://github.com/MakazhanAlpamys/Soup/issueCPU. This is the record behind `BURN_IN_ROWS_BY_ALPHA` and `CALIBRATED_HORIZON_ROWS` in[`src/soup_cli/utils/ab_test.py`](../src/soup_cli/utils/ab_test.py).+**Superseded by [#1265](gate-1265-ab-nig.md):** `soup ab` now uses a variance-robust statistic+with no burn-in, and `BURN_IN_ROWS_BY_ALPHA` / `CALIBRATED_HORIZON_ROWS` are gone. This record+and its harness stay as the baseline that sweep compares against.+## What it gates`soup ab` runs a two-sided mSPRT. It averages Wald's likelihood ratios for adiff --git a/benchmarks/gate-1265-ab-nig.md b/benchmarks/gate-1265-ab-nig.mdnew file mode 100644index 00000000..3b0434fb--- /dev/null+++ b/benchmarks/gate-1265-ab-nig.md@@ -0,0 +1,159 @@+# `soup ab` normal-inverse-gamma mixture (#1265)++Measured on 2026-09-27 for [#1265](https://github.com/MakazhanAlpamys/Soup/issues/1265), on+CPU. This is the record behind the statistic and `PRIOR_SCALE_ROWS` in+[`src/soup_cli/utils/ab_test.py`](../src/soup_cli/utils/ab_test.py). It replaces the burn-in+of [#1227](gate-1227-ab-burn-in.md).++## What it gates++The #1227 statistic plugged the estimated variance into a likelihood ratio built for a known+one. From a handful of rows that estimate is too noisy, so `soup ab` held every verdict back+until 30 rows per arm (40 below alpha 0.05). Even so, at alpha 0.01 the Type-I rate under+peeking stayed near 0.011, longer burn-ins did not lower it, and below alpha 0.01 or past+1000 rows per arm it was not calibrated at all.++The statistic is now the normal-inverse-gamma Bayes factor in its right-Haar limit: a flat+prior on the common mean, 1/sigma on sigma, and N(0, g) on the standardised difference+d = delta / sigma. It has a closed form in the pooled two-sample t statistic (Gönen, Johnson,+Lu and Westfall, 2005), with nu = n_c + n_t - 2 and n_eff = n_c n_t / (n_c + n_t):++```text+log BF = -0.5 log(1 + n_eff g) - (nu + 1)/2 [log1p(t² / (nu (1 + n_eff g))) - log1p(t² / nu)]+```++It is scale-invariant, so under H0 its law does not depend on sigma, and as a ratio of+marginal likelihoods it is a martingale under H0. Ville's inequality bounds the chance that it+ever reaches 1/alpha by alpha: from the first rows on, at any horizon, at any alpha. `soup ab`+rejects at `log(1/alpha)` and accepts at `log(beta/(1-alpha))`.++`--effect-size` is in the metric's units and g needs it in standard deviations. The first+`PRIOR_SCALE_ROWS` rows of each arm are held out; their pooled standard deviation s0 sets+g = (effect_size / s0)², and the Bayes factor runs on the rows after them. Because the prior+is fixed before those rows are seen, the guarantee stays exact. This record measures the+design against the burn-in design and picks `PRIOR_SCALE_ROWS`.++## Headline++Worst Type-I rate over 22 values of effect_size / sigma, 100,000 runs each (the bound is+alpha + 3 SE; * = above it):++| `--alpha` | NIG, k = 5, runs to 1000 rows | runs to 200 rows | burn-in (#1227), runs to 1000 rows | bound |+|---|---|---|---|---|+| 0.10 | **0.0676** | 0.0576 | 0.0999 | 0.1029 |+| 0.05 | **0.0328** | 0.0287 | 0.0511 | 0.0521 |+| 0.025 | **0.0164** | 0.0139 | 0.0257 | 0.0265 |+| 0.01 | **0.0066** | 0.0055 | 0.0110 * | 0.0109 |+| 0.005 | **0.0034** | 0.0027 | 0.0058 * | 0.0057 |++The mixture stays well below alpha everywhere, with no burn-in and no alpha or horizon limit,+so the 0.01 floor and both `soup ab` warnings go. **`PRIOR_SCALE_ROWS = 5`**: verdicts can+come from 7 rows per arm.++## Procedure++- **Data.** effect_size 0.1, sigma = 0.1 / ratio, 22 ratios: 0.1, 0.15, 0.2, 0.25, 0.275,+ 0.3, 0.325, 0.35, 0.375, 0.4, 0.425, 0.45, 0.5, 0.55, 0.6, 0.7, 0.8, 1, 1.5, 2, 3 and 5.+ H0: both arms N(0, sigma²), 100,000 runs per ratio. H1: the treatment shifted by+ +effect_size, the smallest difference the operator asked to detect, 20,000 runs per ratio+ (17 of the ratios).+- **Procedure.** A look after every new pair; the first terminal verdict stops the run; a run+ still undecided at the horizon stops there. Horizons 1000 and 200 rows per arm. beta 0.20.+- **Designs.** NIG with k = 3, 5 and 8 held-out rows per arm (verdicts from pair k + 2), and+ the #1227 burn-in design (30 rows at alpha >= 0.05, 40 below, reject at+ `log((1-beta)/alpha)`), computed by the #1227 harness's own functions.+- **Self-check.** Every harness run first compares its vectorised Bayes factor with the+ shipped `_nig_log_bayes_factor` (maximum relative difference 0 over 150 points) and replays+ simulated runs through `msprt_step` itself (0 of 64 peeks differ), in all 11 parts.+- **Closed form.** `tests/test_issue1265_ab_nig.py` also checks the closed form against a+ direct quadrature of the two marginal likelihoods (to 2e-4, including unequal arms and+ nu = 2).++## Power against the asked-for effect++Share of H1 runs that end in `reject_h0` with the right direction, and mean pairs at stop,+runs to 1000 rows per arm. Wrong-direction rejections were at most 0.0002 in the designs shown.++| ratio | burn-in, alpha 0.05 | NIG k=5, alpha 0.05 | burn-in, alpha 0.01 | NIG k=5, alpha 0.01 |+|---|---|---|---|---|+| 0.1 | 0.446 / 800 | 0.311 / 885 | 0.176 / 922 | 0.130 / 960 |+| 0.15 | 0.768 / 450 | 0.724 / 652 | 0.637 / 628 | 0.513 / 805 |+| 0.2 | 0.811 / 261 | **0.946** / 431 | 0.790 / 389 | **0.859** / 583 |+| 0.3 | 0.817 / 119 | **0.996** / 201 | 0.818 / 177 | **0.997** / 279 |+| 0.5 | 0.840 / 49 | **0.996** / 79 | 0.864 / 71 | **0.997** / 107 |+| 1 | 0.977 / 31 | **0.997** / 26 | 0.989 / 41 | **0.997** / 33 |+| 2 | 1.000 / 30 | 0.998 / 12 | 1.000 / 40 | 0.999 / 15 |+| 5 | 1.000 / 30 | 1.000 / 8 | 1.000 / 40 | 1.000 / 9 |++From ratio 0.2 up, the mixture detects the effect more often, and from ratio 1 up it also+decides sooner. The burn-in design's power stalls near 0.82 between ratios 0.2 and 0.5+because it wrongly ends about 18% of those runs in `accept_h0`. That is also why it stops+sooner there. Below ratio 0.2 neither design is reliable within 1000 rows (a fixed-n test+needs about 1570 per arm at ratio 0.1), and the burn-in design detects more, while sitting at+its Type-I limit. At a 200-row horizon the same pattern holds, shifted: the burn-in design+detects more up to ratio 0.35 at alpha 0.05 (0.4 at alpha 0.01) and the mixture above that+(full tables in `report.txt`).++## What it costs: time to `accept_h0`++Under H0 the mixture needs more rows to accept. Mean pairs at stop, runs to 1000 rows (the+"H0: time to accept_h0" section of `report.txt`):++| ratio | 0.2 | 0.3 | 0.4 | 0.5 | 0.7 | 1 | 1.5 | 2 | 5 |+|---|---|---|---|---|---|---|---|---|---|+| burn-in, alpha 0.05 | 235 | 107 | 62 | 43 | 34 | 31 | 30 | 30 | 30 |+| NIG k=5, alpha 0.05 | 889 | 621 | 406 | 281 | 155 | 82 | 41 | 26 | 10 |++A mixture Bayes factor gathers evidence for H0 only like -0.5 log(n_eff g), so reaching+`log(beta/(1-alpha))` takes rows. The burn-in design's early acceptances come from the same+plug-in variance that costs it power under H1. `continue` remains the honest answer until+then: `soup ab` never claims `accept_h0` early.++## Choosing `PRIOR_SCALE_ROWS`++Type-I is within its bound for every k, as it must be. Power at ratio >= 0.3, alpha 0.05,+1000 rows: about 0.980 for k = 3, 0.996 for k = 5, 0.999 for k = 8. Each held-out row adds+about one pair to every decision, and k = 3 loses 1.5 points of power to a noisier prior+scale. k = 5 keeps almost all of k = 8's power for 3 fewer rows.++## Limits++- **Gaussian rows.** As before, binary metrics should be pre-aggregated per prompt.+- **beta 0.20 only** in the H1 runs; beta sets only the accept boundary now.+- **Row order matters for the held-out rows.** The first k rows of each arm, in file order,+ set the scale. If an arm's first rows are all identical, more rows are held out until one+ differs; this depends only on the held-out rows, so the guarantee is unchanged.++## Environment++Windows 11, Python 3.12.13, numpy 2.5.2, CPU only. About 350 s per ratio for an H0 part at+100,000 runs over 1000 rows (8 parts in parallel), about 70 s per ratio for H1 at 20,000.++## Reproducing++The harness is [`harness/ab_nig_sweep.py`](harness/ab_nig_sweep.py); it imports the burn-in+design from [`harness/ab_burn_in_sweep.py`](harness/ab_burn_in_sweep.py). Run it in parts,+then merge:++```bash+python benchmarks/harness/ab_nig_sweep.py run --mode h0 --ratios 0.1,0.15,0.2 --out h0-part1.json+python benchmarks/harness/ab_nig_sweep.py run --mode h0 --ratios 0.25,0.275,0.3 --out h0-part2.json+python benchmarks/harness/ab_nig_sweep.py run --mode h0 --ratios 0.325,0.35,0.375 --out h0-part3.json+python benchmarks/harness/ab_nig_sweep.py run --mode h0 --ratios 0.4,0.425,0.45 --out h0-part4.json+python benchmarks/harness/ab_nig_sweep.py run --mode h0 --ratios 0.5,0.55,0.6 --out h0-part5.json+python benchmarks/harness/ab_nig_sweep.py run --mode h0 --ratios 0.7,0.8,1.0 --out h0-part6.json+python benchmarks/harness/ab_nig_sweep.py run --mode h0 --ratios 1.5,2.0 --out h0-part7.json+python benchmarks/harness/ab_nig_sweep.py run --mode h0 --ratios 3.0,5.0 --out h0-part8.json+python benchmarks/harness/ab_nig_sweep.py run --mode h1 --runs 20000 \+ --ratios 0.1,0.15,0.2,0.25,0.3,0.35 --out h1-part1.json+python benchmarks/harness/ab_nig_sweep.py run --mode h1 --runs 20000 \+ --ratios 0.4,0.45,0.5,0.6,0.7,0.8 --out h1-part2.json+python benchmarks/harness/ab_nig_sweep.py run --mode h1 --runs 20000 \+ --ratios 1.0,1.5,2.0,3.0,5.0 --out h1-part3.json+python benchmarks/harness/ab_nig_sweep.py report h0-part*.json h1-part*.json+```++The parts, the merged report and the run log are in+[`results/gate-1265-ab-nig/`](results/gate-1265-ab-nig/): `h0-part1.json` to `h0-part8.json`,+`h1-part1.json` to `h1-part3.json`, `report.txt` and `sweep.log`. The seeds are fixed per+mode and ratio, so the same numpy reproduces the numbers above.diff --git a/benchmarks/harness/ab_burn_in_sweep.py b/benchmarks/harness/ab_burn_in_sweep.pyindex 7d86376c..d53195b3 100644--- a/benchmarks/harness/ab_burn_in_sweep.py+++ b/benchmarks/harness/ab_burn_in_sweep.py@@ -6,6 +6,11 @@ arm has `min_rows_per_arm(alpha)` rows (the burn-in). This script measures the frate that burn-in leaves, and it is how the values in `soup_cli.utils.ab_test.BURN_IN_ROWS_BY_ALPHA` were chosen.+Superseded by #1265 (`ab_nig_sweep.py`, benchmarks/gate-1265-ab-nig.md), which replaced the+statistic and removed the burn-in; that sweep imports this one's functions as its baseline.+The self-check below compares against the pre-#1265 `_verdict_from_summary`, so on current+code it reports itself skipped.+Procedure, per effect_size / sigma ratio:- H0: control and treatment rows both N(0, sigma^2), sigma = effect_size / ratio,effect_size 0.1 (only the ratio matters), beta 0.20.diff --git a/benchmarks/harness/ab_nig_sweep.py b/benchmarks/harness/ab_nig_sweep.pynew file mode 100644index 00000000..1a63f1b9--- /dev/null+++ b/benchmarks/harness/ab_nig_sweep.py@@ -0,0 +1,286 @@+"""NIG mixture sweep for `soup ab` (#1265): Type-I error and power under peeking.++Since #1265 `soup ab` decides with the normal-inverse-gamma Bayes factor (right-Haar limit)+instead of the two-point mixture with a plug-in variance and a burn-in (#1227). The first+`PRIOR_SCALE_ROWS` rows of each arm are held out to put `effect_size` in standard deviations;+the Bayes factor runs on the rows after them and rejects H0 at 1/alpha. This script measures+that design against the burn-in design it replaces, and it is how `PRIOR_SCALE_ROWS` was+chosen.++Procedure, per effect_size / sigma ratio (effect_size 0.1, sigma = effect_size / ratio,+beta 0.20):+- H0 (`--mode h0`): both arms N(0, sigma^2). H1 (`--mode h1`): the treatment is shifted by+ +effect_size, the smallest difference the operator asked to detect.+- The operator re-runs the test after every new (control, treatment) pair and stops at the+ first terminal verdict, reject_h0 or accept_h0. A run that reaches the horizon (rows per+ arm) undecided stops there. Horizons 200 and 1000.+- NIG with k held-out rows per arm, k in HELD_OUT: verdicts from pair k + 2 on.+- Burn-in: the #1227 statistic (`ab_burn_in_sweep.point_llrs`), no verdict before 30 rows+ per arm at alpha >= 0.05 and 40 below, reject at log((1 - beta) / alpha).+- Reported per design: the share of runs whose first verdict is reject_h0 (under H1, split+ by the reported direction), and the mean pairs at stop.++`run` first checks the vectorised Bayes factor against `_nig_log_bayes_factor`, and whole+simulated runs against `msprt_step`, before recording anything.++Run it in parts (each part writes one JSON file), then merge:+ python benchmarks/harness/ab_nig_sweep.py run --mode h0 --ratios 0.1,0.2 --out h0-1.json+ python benchmarks/harness/ab_nig_sweep.py report h0-1.json h0-2.json h1-1.json ...++CPU only.+"""++from __future__ import annotations++import argparse+import json+import math+import os+import sys+import time++import numpy as np++sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))+from ab_burn_in_sweep import ( # noqa: E402+ DEFAULT_RATIOS,+ next_true,+ point_llrs,+ summaries,+ tolerance,+)++EFFECT_SIZE = 0.1+BETA = 0.20+ALPHAS = (0.10, 0.05, 0.025, 0.01, 0.005)+HELD_OUT = (3, 5, 8)+HORIZONS = (200, 1000)+BURN_IN = {0.10: 30, 0.05: 30, 0.025: 40, 0.01: 40, 0.005: 40}+CHUNK = 2000+++def nig_log_bf(control: np.ndarray, treatment: np.ndarray, prior_variance) -> tuple:+ """The Bayes factor after 2..n rows per arm (column j <-> j + 2), and the mean difference.++ `prior_variance` is a scalar or a (runs, 1) column. Vectorised `_nig_log_bayes_factor`.+ """+ rows, mean_c, mean_t, pooled = summaries(control, treatment)+ nu = 2.0 * rows - 2.0+ n_eff = rows / 2.0+ diff = mean_t - mean_c+ t_squared = diff * diff * n_eff / pooled+ spread = 1.0 + n_eff * prior_variance+ log_bf = -0.5 * np.log(spread) - 0.5 * (nu + 1.0) * (+ np.log1p(t_squared / (nu * spread)) - np.log1p(t_squared / nu)+ )+ return log_bf, diff+++def split_nig(control: np.ndarray, treatment: np.ndarray, held: int) -> tuple:+ """NIG with `held` rows per arm held out, padded so column j <-> pair j + 2."""+ head_c, head_t = control[:, :held], treatment[:, :held]+ scale_variance = (head_c.var(axis=1, ddof=1) + head_t.var(axis=1, ddof=1)) / 2.0+ prior = (EFFECT_SIZE * EFFECT_SIZE / scale_variance)[:, None]+ log_bf, diff = nig_log_bf(control[:, held:], treatment[:, held:], prior)+ pad = np.zeros((control.shape[0], held))+ return np.concatenate([pad, log_bf], axis=1), np.concatenate([pad, diff], axis=1)+++def first_verdicts(stat, diff, upper, lower, start, horizons) -> dict:+ """Per horizon: (rejections, rejections with diff > 0, sum of pairs at stop)."""+ next_up = next_true(stat >= upper)[:, start - 2]+ next_lo = next_true(stat <= lower)[:, start - 2]+ out = {}+ for horizon in horizons:+ last = horizon - 2+ reject = (next_up < next_lo) & (next_up <= last)+ col = np.where(reject, next_up, 0)+ positive = reject & (np.take_along_axis(diff, col[:, None], axis=1)[:, 0] > 0)+ stop = np.minimum(np.minimum(next_up, next_lo), last) + 2+ out[horizon] = (int(reject.sum()), int(positive.sum()), int(stop.sum()))+ return out+++def self_check(rng: np.random.Generator) -> str:+ """The vectorised statistic equals the shipped code, point by point and run by run."""+ try:+ from soup_cli.utils.ab_test import (+ PRIOR_SCALE_ROWS,+ MsprtConfig,+ _nig_log_bayes_factor,+ msprt_step,+ )+ except ImportError as exc: # pragma: no cover - reported, not fatal+ return f"self-check skipped ({exc})"+ worst = 0.0+ points = 0+ for sigma in (0.05, 0.2, 1.0):+ control = rng.normal(0.0, sigma, size=(10, 400))+ treatment = rng.normal(0.02, sigma, size=(10, 400))+ log_bf, diff = nig_log_bf(control, treatment, 0.7)+ rows, _, _, pooled = summaries(control, treatment)+ for run in range(10):+ for col in (0, 1, 18, 98, 398):+ ref = _nig_log_bayes_factor(+ n_control=int(rows[col]),+ n_treatment=int(rows[col]),+ mean_difference=float(diff[run, col]),+ pooled_variance=float(pooled[run, col]),+ prior_variance=0.7,+ )+ worst = max(worst, abs(ref - log_bf[run, col]) / max(1.0, abs(ref)))+ points += 1+ mismatched = 0+ runs = 0+ config = MsprtConfig(metric="judge_score", alpha=0.05, beta=BETA, effect_size=EFFECT_SIZE)+ for ratio in (0.35, 1.0):+ sigma = EFFECT_SIZE / ratio+ control = rng.normal(0.0, sigma, size=(8, 120))+ treatment = rng.normal(EFFECT_SIZE, sigma, size=(8, 120))+ stat, _ = split_nig(control, treatment, PRIOR_SCALE_ROWS)+ for run in range(8):+ for pairs in (PRIOR_SCALE_ROWS + 2, 20, 60, 120):+ shipped = msprt_step(+ config,+ control=control[run, :pairs].tolist(),+ treatment=treatment[run, :pairs].tolist(),+ ).log_likelihood_ratio+ mismatched += not math.isclose(shipped, stat[run, pairs - 2], rel_tol=1e-9,+ abs_tol=1e-9)+ runs += 1+ return (f"self-check: max rel diff {worst:.1e} over {points} points vs "+ f"_nig_log_bayes_factor; {mismatched} of {runs} msprt_step peeks differ")+++def sweep_ratio(ratio: float, mode: str, runs: int) -> dict:+ rng = np.random.default_rng([1265, 0 if mode == "h0" else 1, int(round(ratio * 10_000))])+ sigma = EFFECT_SIZE / ratio+ shift = 0.0 if mode == "h0" else EFFECT_SIZE+ n_max = max(HORIZONS)+ counts: dict[str, list[int]] = {}++ def add(key, found):+ for horizon, values in found.items():+ name = f"{key}|{horizon}"+ old = counts.get(name, [0, 0, 0])+ counts[name] = [a + b for a, b in zip(old, values)]++ for _ in range(runs // CHUNK):+ control = rng.normal(0.0, sigma, size=(CHUNK, n_max))+ treatment = rng.normal(shift, sigma, size=(CHUNK, n_max))+ rows, mean_c, mean_t, pooled = summaries(control, treatment)+ plus, minus = point_llrs(rows, mean_c, mean_t, pooled)+ mixture = np.logaddexp(plus, minus) - math.log(2.0)+ burn_diff = mean_t - mean_c+ del rows, mean_c, mean_t, pooled, plus, minus+ for alpha in ALPHAS:+ upper = math.log((1.0 - BETA) / alpha)+ lower = math.log(BETA / (1.0 - alpha))+ add(f"burn-in|{alpha}",+ first_verdicts(mixture, burn_diff, upper, lower, BURN_IN[alpha], HORIZONS))+ del mixture, burn_diff+ for held in HELD_OUT:+ stat, diff = split_nig(control, treatment, held)+ for alpha in ALPHAS:+ upper = math.log(1.0 / alpha)+ lower = math.log(BETA / (1.0 - alpha))+ add(f"nig-k{held}|{alpha}",+ first_verdicts(stat, diff, upper, lower, held + 2, HORIZONS))+ return {"ratio": ratio, "mode": mode, "runs": (runs // CHUNK) * CHUNK, "counts": counts}+++def cmd_run(args: argparse.Namespace) -> None:+ ratios = [float(r) for r in args.ratios.split(",")] if args.ratios else list(DEFAULT_RATIOS)+ print(self_check(np.random.default_rng(99)), flush=True)+ results = []+ for ratio in ratios:+ start = time.perf_counter()+ results.append(sweep_ratio(ratio, args.mode, args.runs))+ print(f"{args.mode} ratio {ratio}: {time.perf_counter() - start:.0f} s", flush=True)+ with open(args.out, "w", encoding="utf-8") as fh:+ json.dump({"beta": BETA, "effect_size": EFFECT_SIZE, "results": results}, fh, indent=1)+ fh.write(chr(10))+ print(f"wrote {args.out}")+++def _load(parts: list[str]) -> dict:+ merged: dict[tuple[str, float], dict] = {}+ for path in parts:+ with open(path, encoding="utf-8") as fh:+ for item in json.load(fh)["results"]:+ merged[(item["mode"], item["ratio"])] = item+ return merged+++def cmd_report(args: argparse.Namespace) -> None:+ merged = _load(args.parts)+ designs = ["burn-in"] + [f"nig-k{k}" for k in HELD_OUT]+ h0 = {r: item for (mode, r), item in sorted(merged.items()) if mode == "h0"}+ h1 = {r: item for (mode, r), item in sorted(merged.items()) if mode == "h1"}+ if h0:+ runs = min(item["runs"] for item in h0.values())+ print(f"H0: Type-I rate (first verdict reject_h0), {runs} runs per ratio; "+ "bound = alpha + 3 SE, * = above it")+ for horizon in sorted(HORIZONS, reverse=True):+ for alpha in ALPHAS:+ bound = alpha + tolerance(alpha, runs)+ print(f"\nalpha {alpha}, horizon {horizon} (bound {bound:.5f})")+ print(" ratio " + "".join(f"{d:>12s}" for d in designs))+ worst = {d: (0.0, None) for d in designs}+ for ratio, item in h0.items():+ cells = []+ for design in designs:+ rate = item["counts"][f"{design}|{alpha}|{horizon}"][0] / item["runs"]+ if rate >= worst[design][0]:+ worst[design] = (rate, ratio)+ cells.append(f"{rate:11.5f}{'*' if rate > bound else ' '}")+ print((f" {ratio:5.3f} " + "".join(cells)).rstrip())+ print(" worst " + "".join(f"{w:11.5f} " for w, _ in worst.values())+ + " at " + ", ".join(f"{r:g}" for _, r in worst.values()))+ print(f"\nH0: time to accept_h0 (mean pairs at stop), {runs} runs per ratio")+ for horizon in sorted(HORIZONS, reverse=True):+ for alpha in (0.05, 0.01):+ print(f"\nalpha {alpha}, horizon {horizon}")+ print(" ratio " + "".join(f"{d:>12s}" for d in designs))+ for ratio, item in h0.items():+ cells = "".join(+ f"{item['counts'][f'{design}|{alpha}|{horizon}'][2] / item['runs']:12.1f}"+ for design in designs+ )+ print(f" {ratio:5.3f} " + cells)+ if h1:+ runs = min(item["runs"] for item in h1.values())+ print(f"\nH1 (true difference = +effect_size): power (reject_h0, direction right) / "+ f"wrong-direction rejections / mean pairs at stop, {runs} runs per ratio")+ for horizon in sorted(HORIZONS, reverse=True):+ for alpha in (0.05, 0.01):+ print(f"\nalpha {alpha}, horizon {horizon}")+ print(" ratio " + "".join(f"{d:>24s}" for d in designs))+ for ratio, item in h1.items():+ cells = []+ for design in designs:+ reject, right, stop = item["counts"][f"{design}|{alpha}|{horizon}"]+ n = item["runs"]+ cells.append(f"{right / n:8.4f} {(reject - right) / n:7.5f} "+ f"{stop / n:7.1f}")+ print(f" {ratio:5.3f} " + "".join(cells))+++def main() -> None:+ parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])+ sub = parser.add_subparsers(dest="command", required=True)+ run = sub.add_parser("run", help="sweep some ratios, write one JSON part")+ run.add_argument("--mode", choices=("h0", "h1"), required=True)+ run.add_argument("--ratios", default="", help="comma-separated effect_size / sigma values")+ run.add_argument("--runs", type=int, default=100_000, help="runs per ratio")+ run.add_argument("--out", required=True)+ run.set_defaults(func=cmd_run)+ report = sub.add_parser("report", help="merge JSON parts and print the tables")+ report.add_argument("parts", nargs="+")+ report.set_defaults(func=cmd_report)+ args = parser.parse_args()+ args.func(args)+++if __name__ == "__main__":+ main()diff --git a/benchmarks/results/gate-1265-ab-nig/h0-part1.json b/benchmarks/results/gate-1265-ab-nig/h0-part1.jsonnew file mode 100644index 00000000..4de2a5da--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/h0-part1.json@@ -0,0 +1,627 @@+{+ "beta": 0.2,+ "effect_size": 0.1,+ "results": [+ {+ "ratio": 0.1,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 259,+ 120,+ 19989821+ ],+ "burn-in|0.1|1000": [+ 7113,+ 3482,+ 75835287+ ],+ "burn-in|0.05|200": [+ 30,+ 12,+ 19999044+ ],+ "burn-in|0.05|1000": [+ 2720,+ 1373,+ 79660364+ ],+ "burn-in|0.025|200": [+ 1,+ 0,+ 19999989+ ],+ "burn-in|0.025|1000": [+ 940,+ 470,+ 81158504+ ],+ "burn-in|0.01|200": [+ 0,+ 0,+ 20000000+ ],+ "burn-in|0.01|1000": [+ 216,+ 99,+ 81878930+ ],+ "burn-in|0.005|200": [+ 0,+ 0,+ 20000000+ ],+ "burn-in|0.005|1000": [+ 62,+ 28,+ 82071803+ ],+ "nig-k3|0.1|200": [+ 832,+ 390,+ 19913595+ ],+ "nig-k3|0.1|1000": [+ 3503,+ 1729,+ 95929606+ ],+ "nig-k3|0.05|200": [+ 289,+ 131,+ 19961213+ ],+ "nig-k3|0.05|1000": [+ 1451,+ 701,+ 97471415+ ],+ "nig-k3|0.025|200": [+ 108,+ 43,+ 19976717+ ],+ "nig-k3|0.025|1000": [+ 619,+ 307,+ 98076992+ ],+ "nig-k3|0.01|200": [+ 31,+ 15,+ 19983589+ ],+ "nig-k3|0.01|1000": [+ 202,+ 100,+ 98379009+ ],+ "nig-k3|0.005|200": [+ 17,+ 8,+ 19985193+ ],+ "nig-k3|0.005|1000": [+ 94,+ 40,+ 98456930+ ],+ "nig-k5|0.1|200": [+ 542,+ 260,+ 19965237+ ],+ "nig-k5|0.1|1000": [+ 3281,+ 1660,+ 98068288+ ],+ "nig-k5|0.05|200": [+ 157,+ 73,+ 19990875+ ],+ "nig-k5|0.05|1000": [+ 1343,+ 664,+ 99191772+ ],+ "nig-k5|0.025|200": [+ 44,+ 20,+ 19997148+ ],+ "nig-k5|0.025|1000": [+ 554,+ 275,+ 99627782+ ],+ "nig-k5|0.01|200": [+ 15,+ 6,+ 19999106+ ],+ "nig-k5|0.01|1000": [+ 183,+ 86,+ 99813743+ ],+ "nig-k5|0.005|200": [+ 5,+ 2,+ 19999549+ ],+ "nig-k5|0.005|1000": [+ 75,+ 31,+ 99865359+ ],+ "nig-k8|0.1|200": [+ 413,+ 202,+ 19977106+ ],+ "nig-k8|0.1|1000": [+ 3194,+ 1590,+ 98381915+ ],+ "nig-k8|0.05|200": [+ 105,+ 55,+ 19994709+ ],+ "nig-k8|0.05|1000": [+ 1263,+ 632,+ 99405367+ ],+ "nig-k8|0.025|200": [+ 32,+ 14,+ 19998241+ ],+ "nig-k8|0.025|1000": [+ 531,+ 261,+ 99764655+ ],+ "nig-k8|0.01|200": [+ 5,+ 2,+ 19999632+ ],+ "nig-k8|0.01|1000": [+ 167,+ 83,+ 99927860+ ],+ "nig-k8|0.005|200": [+ 2,+ 1,+ 19999847+ ],+ "nig-k8|0.005|1000": [+ 70,+ 27,+ 99971183+ ]+ }+ },+ {+ "ratio": 0.15,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 2551,+ 1323,+ 19842572+ ],+ "burn-in|0.1|1000": [+ 9471,+ 4691,+ 37472315+ ],+ "burn-in|0.05|200": [+ 617,+ 318,+ 19972290+ ],+ "burn-in|0.05|1000": [+ 4626,+ 2300,+ 40928099+ ],+ "burn-in|0.025|200": [+ 126,+ 67,+ 19995126+ ],+ "burn-in|0.025|1000": [+ 2202,+ 1096,+ 42715550+ ],+ "burn-in|0.01|200": [+ 13,+ 4,+ 19999457+ ],+ "burn-in|0.01|1000": [+ 813,+ 404,+ 43728163+ ],+ "burn-in|0.005|200": [+ 4,+ 1,+ 19999819+ ],+ "burn-in|0.005|1000": [+ 363,+ 177,+ 44046155+ ],+ "nig-k3|0.1|200": [+ 1900,+ 978,+ 19728974+ ],+ "nig-k3|0.1|1000": [+ 4947,+ 2463,+ 88506896+ ],+ "nig-k3|0.05|200": [+ 704,+ 351,+ 19859386+ ],+ "nig-k3|0.05|1000": [+ 2207,+ 1105,+ 91555176+ ],+ "nig-k3|0.025|200": [+ 289,+ 149,+ 19903603+ ],+ "nig-k3|0.025|1000": [+ 1033,+ 526,+ 92860318+ ],+ "nig-k3|0.01|200": [+ 78,+ 46,+ 19925354+ ],+ "nig-k3|0.01|1000": [+ 338,+ 176,+ 93573919+ ],+ "nig-k3|0.005|200": [+ 30,+ 16,+ 19930652+ ],+ "nig-k3|0.005|1000": [+ 159,+ 75,+ 93780005+ ],+ "nig-k5|0.1|200": [+ 1567,+ 809,+ 19874996+ ],+ "nig-k5|0.1|1000": [+ 4784,+ 2389,+ 94059971+ ],+ "nig-k5|0.05|200": [+ 536,+ 279,+ 19960981+ ],+ "nig-k5|0.05|1000": [+ 2116,+ 1083,+ 96585666+ ],+ "nig-k5|0.025|200": [+ 200,+ 96,+ 19985031+ ],+ "nig-k5|0.025|1000": [+ 986,+ 486,+ 97600853+ ],+ "nig-k5|0.01|200": [+ 57,+ 34,+ 19995546+ ],+ "nig-k5|0.01|1000": [+ 342,+ 176,+ 98126912+ ],+ "nig-k5|0.005|200": [+ 20,+ 11,+ 19997831+ ],+ "nig-k5|0.005|1000": [+ 154,+ 80,+ 98284460+ ],+ "nig-k8|0.1|200": [+ 1424,+ 738,+ 19899164+ ],+ "nig-k8|0.1|1000": [+ 4735,+ 2339,+ 96105075+ ],+ "nig-k8|0.05|200": [+ 476,+ 242,+ 19969239+ ],+ "nig-k8|0.05|1000": [+ 2088,+ 1062,+ 98195599+ ],+ "nig-k8|0.025|200": [+ 170,+ 88,+ 19989395+ ],+ "nig-k8|0.025|1000": [+ 971,+ 487,+ 99010012+ ],+ "nig-k8|0.01|200": [+ 47,+ 25,+ 19997487+ ],+ "nig-k8|0.01|1000": [+ 329,+ 168,+ 99428233+ ],+ "nig-k8|0.005|200": [+ 19,+ 9,+ 19999238+ ],+ "nig-k8|0.005|1000": [+ 151,+ 76,+ 99546566+ ]+ }+ },+ {+ "ratio": 0.2,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 5997,+ 2948,+ 17643108+ ],+ "burn-in|0.1|1000": [+ 9881,+ 4874,+ 21331482+ ],+ "burn-in|0.05|200": [+ 2156,+ 1039,+ 18288877+ ],+ "burn-in|0.05|1000": [+ 4993,+ 2446,+ 23522057+ ],+ "burn-in|0.025|200": [+ 675,+ 318,+ 18537162+ ],+ "burn-in|0.025|1000": [+ 2475,+ 1192,+ 24777435+ ],+ "burn-in|0.01|200": [+ 124,+ 55,+ 18648882+ ],+ "burn-in|0.01|1000": [+ 953,+ 445,+ 25613107+ ],+ "burn-in|0.005|200": [+ 39,+ 15,+ 18679310+ ],+ "burn-in|0.005|1000": [+ 481,+ 235,+ 25899793+ ],+ "nig-k3|0.1|200": [+ 2927,+ 1460,+ 19426933+ ],+ "nig-k3|0.1|1000": [+ 5775,+ 2867,+ 77464683+ ],+ "nig-k3|0.05|200": [+ 1174,+ 594,+ 19664814+ ],+ "nig-k3|0.05|1000": [+ 2667,+ 1325,+ 81975463+ ],+ "nig-k3|0.025|200": [+ 483,+ 240,+ 19754557+ ],+ "nig-k3|0.025|1000": [+ 1239,+ 601,+ 83981857+ ],+ "nig-k3|0.01|200": [+ 155,+ 73,+ 19796200+ ],+ "nig-k3|0.01|1000": [+ 453,+ 226,+ 85093684+ ],+ "nig-k3|0.005|200": [+ 67,+ 26,+ 19807584+ ],+ "nig-k3|0.005|1000": [+ 220,+ 107,+ 85442835+ ],+ "nig-k5|0.1|200": [+ 2675,+ 1315,+ 19731381+ ],+ "nig-k5|0.1|1000": [+ 5719,+ 2804,+ 84315804+ ],+ "nig-k5|0.05|200": [+ 1034,+ 509,+ 19896799+ ],+ "nig-k5|0.05|1000": [+ 2606,+ 1275,+ 88905678+ ],+ "nig-k5|0.025|200": [+ 401,+ 200,+ 19956988+ ],+ "nig-k5|0.025|1000": [+ 1226,+ 588,+ 90888962+ ],+ "nig-k5|0.01|200": [+ 113,+ 51,+ 19981866+ ],+ "nig-k5|0.01|1000": [+ 426,+ 205,+ 91980652+ ],+ "nig-k5|0.005|200": [+ 49,+ 17,+ 19987075+ ],+ "nig-k5|0.005|1000": [+ 207,+ 98,+ 92295341+ ],+ "nig-k8|0.1|200": [+ 2563,+ 1260,+ 19775380+ ],+ "nig-k8|0.1|1000": [+ 5764,+ 2825,+ 88080268+ ],+ "nig-k8|0.05|200": [+ 972,+ 476,+ 19922242+ ],+ "nig-k8|0.05|1000": [+ 2584,+ 1250,+ 92616580+ ],+ "nig-k8|0.025|200": [+ 362,+ 168,+ 19973655+ ],+ "nig-k8|0.025|1000": [+ 1189,+ 569,+ 94462092+ ],+ "nig-k8|0.01|200": [+ 95,+ 43,+ 19993307+ ],+ "nig-k8|0.01|1000": [+ 420,+ 205,+ 95437800+ ],+ "nig-k8|0.005|200": [+ 40,+ 14,+ 19997182+ ],+ "nig-k8|0.005|1000": [+ 198,+ 94,+ 95722756+ ]+ }+ }+ ]+}diff --git a/benchmarks/results/gate-1265-ab-nig/h0-part2.json b/benchmarks/results/gate-1265-ab-nig/h0-part2.jsonnew file mode 100644index 00000000..3d421e69--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/h0-part2.json@@ -0,0 +1,627 @@+{+ "beta": 0.2,+ "effect_size": 0.1,+ "results": [+ {+ "ratio": 0.25,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 8418,+ 4285,+ 12984182+ ],+ "burn-in|0.1|1000": [+ 9986,+ 5055,+ 13821714+ ],+ "burn-in|0.05|200": [+ 3591,+ 1849,+ 13790556+ ],+ "burn-in|0.05|1000": [+ 5016,+ 2553,+ 15237504+ ],+ "burn-in|0.025|200": [+ 1448,+ 742,+ 14140820+ ],+ "burn-in|0.025|1000": [+ 2499,+ 1278,+ 16071615+ ],+ "burn-in|0.01|200": [+ 442,+ 228,+ 14311762+ ],+ "burn-in|0.01|1000": [+ 1031,+ 513,+ 16616476+ ],+ "burn-in|0.005|200": [+ 167,+ 87,+ 14359996+ ],+ "burn-in|0.005|1000": [+ 545,+ 276,+ 16825858+ ],+ "nig-k3|0.1|200": [+ 3681,+ 1882,+ 19005500+ ],+ "nig-k3|0.1|1000": [+ 6219,+ 3128,+ 64778909+ ],+ "nig-k3|0.05|200": [+ 1596,+ 803,+ 19348827+ ],+ "nig-k3|0.05|1000": [+ 2945,+ 1468,+ 70145333+ ],+ "nig-k3|0.025|200": [+ 705,+ 362,+ 19493015+ ],+ "nig-k3|0.025|1000": [+ 1392,+ 708,+ 72658921+ ],+ "nig-k3|0.01|200": [+ 233,+ 123,+ 19562906+ ],+ "nig-k3|0.01|1000": [+ 517,+ 256,+ 74123162+ ],+ "nig-k3|0.005|200": [+ 111,+ 61,+ 19583040+ ],+ "nig-k3|0.005|1000": [+ 268,+ 132,+ 74591755+ ],+ "nig-k5|0.1|200": [+ 3550,+ 1798,+ 19539488+ ],+ "nig-k5|0.1|1000": [+ 6267,+ 3151,+ 69968990+ ],+ "nig-k5|0.05|200": [+ 1447,+ 744,+ 19800405+ ],+ "nig-k5|0.05|1000": [+ 2877,+ 1450,+ 76141221+ ],+ "nig-k5|0.025|200": [+ 656,+ 339,+ 19892742+ ],+ "nig-k5|0.025|1000": [+ 1404,+ 716,+ 78900793+ ],+ "nig-k5|0.01|200": [+ 225,+ 119,+ 19937687+ ],+ "nig-k5|0.01|1000": [+ 543,+ 270,+ 80515151+ ],+ "nig-k5|0.005|200": [+ 94,+ 51,+ 19951637+ ],+ "nig-k5|0.005|1000": [+ 254,+ 119,+ 81034931+ ],+ "nig-k8|0.1|200": [+ 3393,+ 1715,+ 19647712+ ],+ "nig-k8|0.1|1000": [+ 6183,+ 3120,+ 72873903+ ],+ "nig-k8|0.05|200": [+ 1449,+ 763,+ 19857509+ ],+ "nig-k8|0.05|1000": [+ 2937,+ 1506,+ 79426487+ ],+ "nig-k8|0.025|200": [+ 620,+ 328,+ 19940646+ ],+ "nig-k8|0.025|1000": [+ 1399,+ 725,+ 82423745+ ],+ "nig-k8|0.01|200": [+ 233,+ 122,+ 19977848+ ],+ "nig-k8|0.01|1000": [+ 556,+ 275,+ 84097643+ ],+ "nig-k8|0.005|200": [+ 91,+ 47,+ 19989363+ ],+ "nig-k8|0.005|1000": [+ 261,+ 122,+ 84665097+ ]+ }+ },+ {+ "ratio": 0.275,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 9015,+ 4512,+ 11116006+ ],+ "burn-in|0.1|1000": [+ 9858,+ 4946,+ 11501675+ ],+ "burn-in|0.05|200": [+ 4138,+ 2071,+ 11904521+ ],+ "burn-in|0.05|1000": [+ 5105,+ 2568,+ 12646584+ ],+ "burn-in|0.025|200": [+ 1740,+ 870,+ 12276062+ ],+ "burn-in|0.025|1000": [+ 2543,+ 1278,+ 13331945+ ],+ "burn-in|0.01|200": [+ 550,+ 271,+ 12462458+ ],+ "burn-in|0.01|1000": [+ 1055,+ 517,+ 13791073+ ],+ "burn-in|0.005|200": [+ 210,+ 96,+ 12517999+ ],+ "burn-in|0.005|1000": [+ 518,+ 246,+ 13978688+ ],+ "nig-k3|0.1|200": [+ 3922,+ 1970,+ 18721500+ ],+ "nig-k3|0.1|1000": [+ 6292,+ 3149,+ 58047448+ ],+ "nig-k3|0.05|200": [+ 1717,+ 875,+ 19132286+ ],+ "nig-k3|0.05|1000": [+ 3014,+ 1515,+ 63640673+ ],+ "nig-k3|0.025|200": [+ 774,+ 386,+ 19296905+ ],+ "nig-k3|0.025|1000": [+ 1483,+ 736,+ 66287484+ ],+ "nig-k3|0.01|200": [+ 299,+ 144,+ 19381717+ ],+ "nig-k3|0.01|1000": [+ 591,+ 278,+ 67821604+ ],+ "nig-k3|0.005|200": [+ 135,+ 66,+ 19409708+ ],+ "nig-k3|0.005|1000": [+ 273,+ 126,+ 68354132+ ],+ "nig-k5|0.1|200": [+ 3790,+ 1907,+ 19418003+ ],+ "nig-k5|0.1|1000": [+ 6289,+ 3129,+ 62368968+ ],+ "nig-k5|0.05|200": [+ 1644,+ 816,+ 19715078+ ],+ "nig-k5|0.05|1000": [+ 3021,+ 1485,+ 68710246+ ],+ "nig-k5|0.025|200": [+ 730,+ 365,+ 19831989+ ],+ "nig-k5|0.025|1000": [+ 1473,+ 726,+ 71724370+ ],+ "nig-k5|0.01|200": [+ 254,+ 120,+ 19891009+ ],+ "nig-k5|0.01|1000": [+ 563,+ 264,+ 73472737+ ],+ "nig-k5|0.005|200": [+ 117,+ 56,+ 19907213+ ],+ "nig-k5|0.005|1000": [+ 272,+ 123,+ 74053177+ ],+ "nig-k8|0.1|200": [+ 3665,+ 1807,+ 19584019+ ],+ "nig-k8|0.1|1000": [+ 6236,+ 3089,+ 64610216+ ],+ "nig-k8|0.05|200": [+ 1568,+ 784,+ 19829024+ ],+ "nig-k8|0.05|1000": [+ 3008,+ 1473,+ 71433105+ ],+ "nig-k8|0.025|200": [+ 675,+ 341,+ 19925814+ ],+ "nig-k8|0.025|1000": [+ 1445,+ 714,+ 74685285+ ],+ "nig-k8|0.01|200": [+ 240,+ 124,+ 19970179+ ],+ "nig-k8|0.01|1000": [+ 573,+ 279,+ 76558068+ ],+ "nig-k8|0.005|200": [+ 111,+ 60,+ 19982962+ ],+ "nig-k8|0.005|1000": [+ 275,+ 129,+ 77173549+ ]+ }+ },+ {+ "ratio": 0.3,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 9182,+ 4513,+ 9571064+ ],+ "burn-in|0.1|1000": [+ 9643,+ 4741,+ 9752294+ ],+ "burn-in|0.05|200": [+ 4373,+ 2140,+ 10317087+ ],+ "burn-in|0.05|1000": [+ 4958,+ 2429,+ 10699101+ ],+ "burn-in|0.025|200": [+ 2025,+ 994,+ 10681099+ ],+ "burn-in|0.025|1000": [+ 2569,+ 1260,+ 11267659+ ],+ "burn-in|0.01|200": [+ 675,+ 305,+ 10879296+ ],+ "burn-in|0.01|1000": [+ 1040,+ 477,+ 11676461+ ],+ "burn-in|0.005|200": [+ 273,+ 123,+ 10933848+ ],+ "burn-in|0.005|1000": [+ 491,+ 222,+ 11836620+ ],+ "nig-k3|0.1|200": [+ 4158,+ 2017,+ 18427921+ ],+ "nig-k3|0.1|1000": [+ 6398,+ 3134,+ 52649851+ ],+ "nig-k3|0.05|200": [+ 1876,+ 907,+ 18878777+ ],+ "nig-k3|0.05|1000": [+ 3102,+ 1520,+ 58204380+ ],+ "nig-k3|0.025|200": [+ 802,+ 376,+ 19078255+ ],+ "nig-k3|0.025|1000": [+ 1460,+ 712,+ 60934760+ ],+ "nig-k3|0.01|200": [+ 305,+ 146,+ 19177604+ ],+ "nig-k3|0.01|1000": [+ 558,+ 282,+ 62514207+ ],+ "nig-k3|0.005|200": [+ 134,+ 64,+ 19209861+ ],+ "nig-k3|0.005|1000": [+ 256,+ 135,+ 63048993+ ],+ "nig-k5|0.1|200": [+ 4066,+ 1983,+ 19255803+ ],+ "nig-k5|0.1|1000": [+ 6445,+ 3180,+ 55770363+ ],+ "nig-k5|0.05|200": [+ 1795,+ 879,+ 19605326+ ],+ "nig-k5|0.05|1000": [+ 3090,+ 1536,+ 62051801+ ],+ "nig-k5|0.025|200": [+ 772,+ 381,+ 19750386+ ],+ "nig-k5|0.025|1000": [+ 1450,+ 722,+ 65179752+ ],+ "nig-k5|0.01|200": [+ 273,+ 130,+ 19818790+ ],+ "nig-k5|0.01|1000": [+ 544,+ 274,+ 66997516+ ],+ "nig-k5|0.005|200": [+ 129,+ 63,+ 19838453+ ],+ "nig-k5|0.005|1000": [+ 257,+ 139,+ 67578027+ ],+ "nig-k8|0.1|200": [+ 3951,+ 1937,+ 19513370+ ],+ "nig-k8|0.1|1000": [+ 6369,+ 3170,+ 57401220+ ],+ "nig-k8|0.05|200": [+ 1712,+ 833,+ 19793849+ ],+ "nig-k8|0.05|1000": [+ 3055,+ 1513,+ 64156740+ ],+ "nig-k8|0.025|200": [+ 732,+ 364,+ 19906036+ ],+ "nig-k8|0.025|1000": [+ 1433,+ 718,+ 67463019+ ],+ "nig-k8|0.01|200": [+ 244,+ 115,+ 19959630+ ],+ "nig-k8|0.01|1000": [+ 513,+ 258,+ 69381569+ ],+ "nig-k8|0.005|200": [+ 109,+ 58,+ 19972652+ ],+ "nig-k8|0.005|1000": [+ 241,+ 130,+ 70005120+ ]+ }+ }+ ]+}diff --git a/benchmarks/results/gate-1265-ab-nig/h0-part3.json b/benchmarks/results/gate-1265-ab-nig/h0-part3.jsonnew file mode 100644index 00000000..31eb370b--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/h0-part3.json@@ -0,0 +1,627 @@+{+ "beta": 0.2,+ "effect_size": 0.1,+ "results": [+ {+ "ratio": 0.325,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 9318,+ 4731,+ 8280651+ ],+ "burn-in|0.1|1000": [+ 9551,+ 4841,+ 8357954+ ],+ "burn-in|0.05|200": [+ 4748,+ 2473,+ 8966345+ ],+ "burn-in|0.05|1000": [+ 5084,+ 2653,+ 9155635+ ],+ "burn-in|0.025|200": [+ 2185,+ 1083,+ 9333445+ ],+ "burn-in|0.025|1000": [+ 2540,+ 1278,+ 9651789+ ],+ "burn-in|0.01|200": [+ 823,+ 423,+ 9528804+ ],+ "burn-in|0.01|1000": [+ 1074,+ 550,+ 9978555+ ],+ "burn-in|0.005|200": [+ 361,+ 177,+ 9591923+ ],+ "burn-in|0.005|1000": [+ 558,+ 276,+ 10113805+ ],+ "nig-k3|0.1|200": [+ 4398,+ 2192,+ 18059353+ ],+ "nig-k3|0.1|1000": [+ 6466,+ 3246,+ 47077936+ ],+ "nig-k3|0.05|200": [+ 1945,+ 962,+ 18586307+ ],+ "nig-k3|0.05|1000": [+ 3120,+ 1552,+ 52510529+ ],+ "nig-k3|0.025|200": [+ 842,+ 416,+ 18811579+ ],+ "nig-k3|0.025|1000": [+ 1500,+ 756,+ 55198278+ ],+ "nig-k3|0.01|200": [+ 318,+ 154,+ 18926601+ ],+ "nig-k3|0.01|1000": [+ 611,+ 297,+ 56793459+ ],+ "nig-k3|0.005|200": [+ 152,+ 66,+ 18962808+ ],+ "nig-k3|0.005|1000": [+ 311,+ 138,+ 57321325+ ],+ "nig-k5|0.1|200": [+ 4320,+ 2159,+ 19056906+ ],+ "nig-k5|0.1|1000": [+ 6573,+ 3292,+ 49490359+ ],+ "nig-k5|0.05|200": [+ 1873,+ 937,+ 19480373+ ],+ "nig-k5|0.05|1000": [+ 3153,+ 1589,+ 55605812+ ],+ "nig-k5|0.025|200": [+ 827,+ 401,+ 19642606+ ],+ "nig-k5|0.025|1000": [+ 1504,+ 754,+ 58633814+ ],+ "nig-k5|0.01|200": [+ 288,+ 136,+ 19726340+ ],+ "nig-k5|0.01|1000": [+ 606,+ 294,+ 60427284+ ],+ "nig-k5|0.005|200": [+ 144,+ 63,+ 19748291+ ],+ "nig-k5|0.005|1000": [+ 303,+ 140,+ 61000368+ ],+ "nig-k8|0.1|200": [+ 4185,+ 2134,+ 19409571+ ],+ "nig-k8|0.1|1000": [+ 6575,+ 3319,+ 50720066+ ],+ "nig-k8|0.05|200": [+ 1889,+ 938,+ 19729360+ ],+ "nig-k8|0.05|1000": [+ 3227,+ 1615,+ 57131205+ ],+ "nig-k8|0.025|200": [+ 782,+ 389,+ 19867599+ ],+ "nig-k8|0.025|1000": [+ 1479,+ 737,+ 60409134+ ],+ "nig-k8|0.01|200": [+ 274,+ 128,+ 19928960+ ],+ "nig-k8|0.01|1000": [+ 596,+ 284,+ 62270176+ ],+ "nig-k8|0.005|200": [+ 132,+ 61,+ 19944930+ ],+ "nig-k8|0.005|1000": [+ 295,+ 135,+ 62894352+ ]+ }+ },+ {+ "ratio": 0.35,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 9317,+ 4523,+ 7253346+ ],+ "burn-in|0.1|1000": [+ 9429,+ 4569,+ 7288724+ ],+ "burn-in|0.05|200": [+ 4892,+ 2386,+ 7869460+ ],+ "burn-in|0.05|1000": [+ 5083,+ 2465,+ 7968318+ ],+ "burn-in|0.025|200": [+ 2353,+ 1153,+ 8223521+ ],+ "burn-in|0.025|1000": [+ 2548,+ 1241,+ 8400968+ ],+ "burn-in|0.01|200": [+ 939,+ 470,+ 8417437+ ],+ "burn-in|0.01|1000": [+ 1097,+ 548,+ 8679753+ ],+ "burn-in|0.005|200": [+ 416,+ 223,+ 8484821+ ],+ "burn-in|0.005|1000": [+ 526,+ 279,+ 8799074+ ],+ "nig-k3|0.1|200": [+ 4696,+ 2273,+ 17639313+ ],+ "nig-k3|0.1|1000": [+ 6552,+ 3197,+ 42246188+ ],+ "nig-k3|0.05|200": [+ 2100,+ 1006,+ 18236278+ ],+ "nig-k3|0.05|1000": [+ 3178,+ 1556,+ 47522192+ ],+ "nig-k3|0.025|200": [+ 958,+ 469,+ 18493066+ ],+ "nig-k3|0.025|1000": [+ 1553,+ 787,+ 50136379+ ],+ "nig-k3|0.01|200": [+ 342,+ 171,+ 18630352+ ],+ "nig-k3|0.01|1000": [+ 581,+ 296,+ 51728112+ ],+ "nig-k3|0.005|200": [+ 168,+ 85,+ 18670618+ ],+ "nig-k3|0.005|1000": [+ 302,+ 155,+ 52242165+ ],+ "nig-k5|0.1|200": [+ 4648,+ 2206,+ 18769829+ ],+ "nig-k5|0.1|1000": [+ 6659,+ 3209,+ 44170167+ ],+ "nig-k5|0.05|200": [+ 2061,+ 982,+ 19269696+ ],+ "nig-k5|0.05|1000": [+ 3210,+ 1568,+ 49992327+ ],+ "nig-k5|0.025|200": [+ 913,+ 450,+ 19474186+ ],+ "nig-k5|0.025|1000": [+ 1564,+ 782,+ 52925401+ ],+ "nig-k5|0.01|200": [+ 357,+ 178,+ 19573602+ ],+ "nig-k5|0.01|1000": [+ 621,+ 315,+ 54664886+ ],+ "nig-k5|0.005|200": [+ 175,+ 93,+ 19604578+ ],+ "nig-k5|0.005|1000": [+ 313,+ 160,+ 55237043+ ],+ "nig-k8|0.1|200": [+ 4559,+ 2206,+ 19244980+ ],+ "nig-k8|0.1|1000": [+ 6665,+ 3280,+ 45090012+ ],+ "nig-k8|0.05|200": [+ 1989,+ 973,+ 19642688+ ],+ "nig-k8|0.05|1000": [+ 3187,+ 1572,+ 51117368+ ],+ "nig-k8|0.025|200": [+ 915,+ 444,+ 19795487+ ],+ "nig-k8|0.025|1000": [+ 1562,+ 775,+ 54169645+ ],+ "nig-k8|0.01|200": [+ 327,+ 169,+ 19876195+ ],+ "nig-k8|0.01|1000": [+ 620,+ 320,+ 55984758+ ],+ "nig-k8|0.005|200": [+ 149,+ 77,+ 19897832+ ],+ "nig-k8|0.005|1000": [+ 305,+ 161,+ 56600396+ ]+ }+ },+ {+ "ratio": 0.375,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 8941,+ 4528,+ 6391628+ ],+ "burn-in|0.1|1000": [+ 8993,+ 4551,+ 6406018+ ],+ "burn-in|0.05|200": [+ 4762,+ 2409,+ 6929129+ ],+ "burn-in|0.05|1000": [+ 4859,+ 2458,+ 6973608+ ],+ "burn-in|0.025|200": [+ 2301,+ 1179,+ 7276156+ ],+ "burn-in|0.025|1000": [+ 2408,+ 1230,+ 7365789+ ],+ "burn-in|0.01|200": [+ 935,+ 473,+ 7459459+ ],+ "burn-in|0.01|1000": [+ 1031,+ 520,+ 7601725+ ],+ "burn-in|0.005|200": [+ 482,+ 240,+ 7519970+ ],+ "burn-in|0.005|1000": [+ 561,+ 282,+ 7693213+ ],+ "nig-k3|0.1|200": [+ 4716,+ 2376,+ 17209682+ ],+ "nig-k3|0.1|1000": [+ 6498,+ 3258,+ 37984372+ ],+ "nig-k3|0.05|200": [+ 2112,+ 1078,+ 17866062+ ],+ "nig-k3|0.05|1000": [+ 3154,+ 1599,+ 42995295+ ],+ "nig-k3|0.025|200": [+ 973,+ 483,+ 18149788+ ],+ "nig-k3|0.025|1000": [+ 1530,+ 764,+ 45510717+ ],+ "nig-k3|0.01|200": [+ 338,+ 159,+ 18305188+ ],+ "nig-k3|0.01|1000": [+ 578,+ 276,+ 47048163+ ],+ "nig-k3|0.005|200": [+ 141,+ 67,+ 18353928+ ],+ "nig-k3|0.005|1000": [+ 260,+ 131,+ 47558462+ ],+ "nig-k5|0.1|200": [+ 4679,+ 2361,+ 18477324+ ],+ "nig-k5|0.1|1000": [+ 6599,+ 3318,+ 39511295+ ],+ "nig-k5|0.05|200": [+ 2100,+ 1046,+ 19042839+ ],+ "nig-k5|0.05|1000": [+ 3236,+ 1614,+ 44925987+ ],+ "nig-k5|0.025|200": [+ 966,+ 499,+ 19278290+ ],+ "nig-k5|0.025|1000": [+ 1592,+ 815,+ 47737367+ ],+ "nig-k5|0.01|200": [+ 334,+ 166,+ 19402636+ ],+ "nig-k5|0.01|1000": [+ 585,+ 287,+ 49437407+ ],+ "nig-k5|0.005|200": [+ 135,+ 66,+ 19440775+ ],+ "nig-k5|0.005|1000": [+ 249,+ 123,+ 49993472+ ],+ "nig-k8|0.1|200": [+ 4634,+ 2327,+ 19050965+ ],+ "nig-k8|0.1|1000": [+ 6667,+ 3347,+ 40298128+ ],+ "nig-k8|0.05|200": [+ 2087,+ 1052,+ 19512924+ ],+ "nig-k8|0.05|1000": [+ 3249,+ 1643,+ 45915113+ ],+ "nig-k8|0.025|200": [+ 967,+ 494,+ 19699311+ ],+ "nig-k8|0.025|1000": [+ 1588,+ 817,+ 48783980+ ],+ "nig-k8|0.01|200": [+ 309,+ 163,+ 19797964+ ],+ "nig-k8|0.01|1000": [+ 578,+ 300,+ 50560801+ ],+ "nig-k8|0.005|200": [+ 141,+ 69,+ 19823044+ ],+ "nig-k8|0.005|1000": [+ 271,+ 135,+ 51151905+ ]+ }+ }+ ]+}diff --git a/benchmarks/results/gate-1265-ab-nig/h0-part4.json b/benchmarks/results/gate-1265-ab-nig/h0-part4.jsonnew file mode 100644index 00000000..6b7ff57d--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/h0-part4.json@@ -0,0 +1,627 @@+{+ "beta": 0.2,+ "effect_size": 0.1,+ "results": [+ {+ "ratio": 0.4,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 8959,+ 4523,+ 5703765+ ],+ "burn-in|0.1|1000": [+ 8979,+ 4530,+ 5710014+ ],+ "burn-in|0.05|200": [+ 4851,+ 2452,+ 6182872+ ],+ "burn-in|0.05|1000": [+ 4906,+ 2478,+ 6205880+ ],+ "burn-in|0.025|200": [+ 2374,+ 1216,+ 6574697+ ],+ "burn-in|0.025|1000": [+ 2452,+ 1260,+ 6623957+ ],+ "burn-in|0.01|200": [+ 980,+ 520,+ 6744822+ ],+ "burn-in|0.01|1000": [+ 1051,+ 565,+ 6830858+ ],+ "burn-in|0.005|200": [+ 493,+ 249,+ 6804614+ ],+ "burn-in|0.005|1000": [+ 540,+ 274,+ 6913291+ ],+ "nig-k3|0.1|200": [+ 5060,+ 2550,+ 16739864+ ],+ "nig-k3|0.1|1000": [+ 6722,+ 3394,+ 34366191+ ],+ "nig-k3|0.05|200": [+ 2261,+ 1105,+ 17477248+ ],+ "nig-k3|0.05|1000": [+ 3214,+ 1602,+ 39094452+ ],+ "nig-k3|0.025|200": [+ 1060,+ 542,+ 17787772+ ],+ "nig-k3|0.025|1000": [+ 1604,+ 817,+ 41448056+ ],+ "nig-k3|0.01|200": [+ 377,+ 187,+ 17964280+ ],+ "nig-k3|0.01|1000": [+ 607,+ 299,+ 42917013+ ],+ "nig-k3|0.005|200": [+ 185,+ 91,+ 18015977+ ],+ "nig-k3|0.005|1000": [+ 302,+ 153,+ 43397196+ ],+ "nig-k5|0.1|200": [+ 4927,+ 2486,+ 18065369+ ],+ "nig-k5|0.1|1000": [+ 6756,+ 3422,+ 35501029+ ],+ "nig-k5|0.05|200": [+ 2213,+ 1123,+ 18723157+ ],+ "nig-k5|0.05|1000": [+ 3234,+ 1655,+ 40607141+ ],+ "nig-k5|0.025|200": [+ 1015,+ 504,+ 19002105+ ],+ "nig-k5|0.025|1000": [+ 1582,+ 794,+ 43195016+ ],+ "nig-k5|0.01|200": [+ 385,+ 193,+ 19143094+ ],+ "nig-k5|0.01|1000": [+ 636,+ 313,+ 44738546+ ],+ "nig-k5|0.005|200": [+ 187,+ 104,+ 19188143+ ],+ "nig-k5|0.005|1000": [+ 303,+ 165,+ 45272721+ ],+ "nig-k8|0.1|200": [+ 4847,+ 2418,+ 18740053+ ],+ "nig-k8|0.1|1000": [+ 6759,+ 3419,+ 36226078+ ],+ "nig-k8|0.05|200": [+ 2199,+ 1107,+ 19302339+ ],+ "nig-k8|0.05|1000": [+ 3299,+ 1669,+ 41419789+ ],+ "nig-k8|0.025|200": [+ 1010,+ 508,+ 19530507+ ],+ "nig-k8|0.025|1000": [+ 1602,+ 811,+ 44070914+ ],+ "nig-k8|0.01|200": [+ 371,+ 179,+ 19647156+ ],+ "nig-k8|0.01|1000": [+ 628,+ 311,+ 45664232+ ],+ "nig-k8|0.005|200": [+ 185,+ 96,+ 19680615+ ],+ "nig-k8|0.005|1000": [+ 323,+ 165,+ 46200672+ ]+ }+ },+ {+ "ratio": 0.425,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 8454,+ 4303,+ 5131665+ ],+ "burn-in|0.1|1000": [+ 8465,+ 4309,+ 5133369+ ],+ "burn-in|0.05|200": [+ 4703,+ 2363,+ 5543677+ ],+ "burn-in|0.05|1000": [+ 4734,+ 2384,+ 5553269+ ],+ "burn-in|0.025|200": [+ 2358,+ 1169,+ 5999705+ ],+ "burn-in|0.025|1000": [+ 2395,+ 1194,+ 6023391+ ],+ "burn-in|0.01|200": [+ 1018,+ 505,+ 6150370+ ],+ "burn-in|0.01|1000": [+ 1069,+ 529,+ 6195024+ ],+ "burn-in|0.005|200": [+ 535,+ 265,+ 6205763+ ],+ "burn-in|0.005|1000": [+ 575,+ 280,+ 6267176+ ],+ "nig-k3|0.1|200": [+ 5006,+ 2423,+ 16269257+ ],+ "nig-k3|0.1|1000": [+ 6457,+ 3166,+ 31115130+ ],+ "nig-k3|0.05|200": [+ 2367,+ 1158,+ 17040677+ ],+ "nig-k3|0.05|1000": [+ 3214,+ 1597,+ 35532416+ ],+ "nig-k3|0.025|200": [+ 1099,+ 541,+ 17392432+ ],+ "nig-k3|0.025|1000": [+ 1560,+ 787,+ 37849705+ ],+ "nig-k3|0.01|200": [+ 433,+ 214,+ 17579628+ ],+ "nig-k3|0.01|1000": [+ 640,+ 311,+ 39226772+ ],+ "nig-k3|0.005|200": [+ 206,+ 102,+ 17640368+ ],+ "nig-k3|0.005|1000": [+ 321,+ 155,+ 39711332+ ],+ "nig-k5|0.1|200": [+ 5045,+ 2493,+ 17625068+ ],+ "nig-k5|0.1|1000": [+ 6624,+ 3283,+ 32005862+ ],+ "nig-k5|0.05|200": [+ 2277,+ 1111,+ 18375640+ ],+ "nig-k5|0.05|1000": [+ 3230,+ 1597,+ 36692909+ ],+ "nig-k5|0.025|200": [+ 1073,+ 523,+ 18687486+ ],+ "nig-k5|0.025|1000": [+ 1590,+ 795,+ 39179308+ ],+ "nig-k5|0.01|200": [+ 396,+ 187,+ 18859114+ ],+ "nig-k5|0.01|1000": [+ 625,+ 299,+ 40691697+ ],+ "nig-k5|0.005|200": [+ 185,+ 96,+ 18911882+ ],+ "nig-k5|0.005|1000": [+ 318,+ 155,+ 41193385+ ],+ "nig-k8|0.1|200": [+ 4901,+ 2429,+ 18378101+ ],+ "nig-k8|0.1|1000": [+ 6544,+ 3267,+ 32590258+ ],+ "nig-k8|0.05|200": [+ 2282,+ 1106,+ 19046700+ ],+ "nig-k8|0.05|1000": [+ 3296,+ 1634,+ 37380477+ ],+ "nig-k8|0.025|200": [+ 1027,+ 499,+ 19323886+ ],+ "nig-k8|0.025|1000": [+ 1566,+ 774,+ 39923960+ ],+ "nig-k8|0.01|200": [+ 385,+ 186,+ 19463797+ ],+ "nig-k8|0.01|1000": [+ 630,+ 305,+ 41449513+ ],+ "nig-k8|0.005|200": [+ 188,+ 90,+ 19506008+ ],+ "nig-k8|0.005|1000": [+ 327,+ 155,+ 41962338+ ]+ }+ },+ {+ "ratio": 0.45,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 8160,+ 4088,+ 4678215+ ],+ "burn-in|0.1|1000": [+ 8163,+ 4091,+ 4678853+ ],+ "burn-in|0.05|200": [+ 4627,+ 2311,+ 5028809+ ],+ "burn-in|0.05|1000": [+ 4642,+ 2319,+ 5033092+ ],+ "burn-in|0.025|200": [+ 2324,+ 1157,+ 5588960+ ],+ "burn-in|0.025|1000": [+ 2349,+ 1173,+ 5600822+ ],+ "burn-in|0.01|200": [+ 1047,+ 510,+ 5718621+ ],+ "burn-in|0.01|1000": [+ 1074,+ 527,+ 5744568+ ],+ "burn-in|0.005|200": [+ 551,+ 270,+ 5771388+ ],+ "burn-in|0.005|1000": [+ 576,+ 288,+ 5806712+ ],+ "nig-k3|0.1|200": [+ 5102,+ 2530,+ 15731313+ ],+ "nig-k3|0.1|1000": [+ 6494,+ 3241,+ 28329007+ ],+ "nig-k3|0.05|200": [+ 2290,+ 1125,+ 16579344+ ],+ "nig-k3|0.05|1000": [+ 3120,+ 1558,+ 32498050+ ],+ "nig-k3|0.025|200": [+ 1072,+ 549,+ 16946997+ ],+ "nig-k3|0.025|1000": [+ 1536,+ 796,+ 34611753+ ],+ "nig-k3|0.01|200": [+ 379,+ 203,+ 17152480+ ],+ "nig-k3|0.01|1000": [+ 583,+ 308,+ 35932421+ ],+ "nig-k3|0.005|200": [+ 192,+ 112,+ 17214809+ ],+ "nig-k3|0.005|1000": [+ 292,+ 165,+ 36374201+ ],+ "nig-k5|0.1|200": [+ 5129,+ 2593,+ 17108047+ ],+ "nig-k5|0.1|1000": [+ 6647,+ 3354,+ 29077820+ ],+ "nig-k5|0.05|200": [+ 2296,+ 1153,+ 17948875+ ],+ "nig-k5|0.05|1000": [+ 3182,+ 1604,+ 33452074+ ],+ "nig-k5|0.025|200": [+ 1035,+ 529,+ 18310057+ ],+ "nig-k5|0.025|1000": [+ 1548,+ 796,+ 35722890+ ],+ "nig-k5|0.01|200": [+ 372,+ 186,+ 18499529+ ],+ "nig-k5|0.01|1000": [+ 599,+ 305,+ 37130891+ ],+ "nig-k5|0.005|200": [+ 172,+ 93,+ 18559161+ ],+ "nig-k5|0.005|1000": [+ 282,+ 155,+ 37611752+ ],+ "nig-k8|0.1|200": [+ 5059,+ 2573,+ 17927565+ ],+ "nig-k8|0.1|1000": [+ 6631,+ 3346,+ 29614318+ ],+ "nig-k8|0.05|200": [+ 2297,+ 1155,+ 18713352+ ],+ "nig-k8|0.05|1000": [+ 3229,+ 1626,+ 34077670+ ],+ "nig-k8|0.025|200": [+ 1044,+ 531,+ 19041281+ ],+ "nig-k8|0.025|1000": [+ 1587,+ 821,+ 36423722+ ],+ "nig-k8|0.01|200": [+ 380,+ 191,+ 19206274+ ],+ "nig-k8|0.01|1000": [+ 612,+ 314,+ 37841377+ ],+ "nig-k8|0.005|200": [+ 180,+ 91,+ 19256114+ ],+ "nig-k8|0.005|1000": [+ 298,+ 155,+ 38340262+ ]+ }+ }+ ]+}diff --git a/benchmarks/results/gate-1265-ab-nig/h0-part5.json b/benchmarks/results/gate-1265-ab-nig/h0-part5.jsonnew file mode 100644index 00000000..e3186671--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/h0-part5.json@@ -0,0 +1,627 @@+{+ "beta": 0.2,+ "effect_size": 0.1,+ "results": [+ {+ "ratio": 0.5,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 7499,+ 3751,+ 4073407+ ],+ "burn-in|0.1|1000": [+ 7499,+ 3751,+ 4073542+ ],+ "burn-in|0.05|200": [+ 4396,+ 2207,+ 4311825+ ],+ "burn-in|0.05|1000": [+ 4398,+ 2208,+ 4312736+ ],+ "burn-in|0.025|200": [+ 2247,+ 1136,+ 5061633+ ],+ "burn-in|0.025|1000": [+ 2255,+ 1140,+ 5064791+ ],+ "burn-in|0.01|200": [+ 1022,+ 518,+ 5162368+ ],+ "burn-in|0.01|1000": [+ 1028,+ 523,+ 5169645+ ],+ "burn-in|0.005|200": [+ 554,+ 272,+ 5205425+ ],+ "burn-in|0.005|1000": [+ 561,+ 275,+ 5216664+ ],+ "nig-k3|0.1|200": [+ 5380,+ 2720,+ 14644412+ ],+ "nig-k3|0.1|1000": [+ 6567,+ 3292,+ 23684828+ ],+ "nig-k3|0.05|200": [+ 2471,+ 1242,+ 15575550+ ],+ "nig-k3|0.05|1000": [+ 3226,+ 1635,+ 27299460+ ],+ "nig-k3|0.025|200": [+ 1141,+ 602,+ 15998600+ ],+ "nig-k3|0.025|1000": [+ 1584,+ 833,+ 29222938+ ],+ "nig-k3|0.01|200": [+ 440,+ 223,+ 16232195+ ],+ "nig-k3|0.01|1000": [+ 638,+ 326,+ 30375993+ ],+ "nig-k3|0.005|200": [+ 200,+ 97,+ 16310726+ ],+ "nig-k3|0.005|1000": [+ 304,+ 160,+ 30778717+ ],+ "nig-k5|0.1|200": [+ 5430,+ 2772,+ 15977299+ ],+ "nig-k5|0.1|1000": [+ 6687,+ 3379,+ 24300124+ ],+ "nig-k5|0.05|200": [+ 2478,+ 1258,+ 16979964+ ],+ "nig-k5|0.05|1000": [+ 3280,+ 1666,+ 28071211+ ],+ "nig-k5|0.025|200": [+ 1167,+ 595,+ 17409315+ ],+ "nig-k5|0.025|1000": [+ 1639,+ 843,+ 30067399+ ],+ "nig-k5|0.01|200": [+ 433,+ 220,+ 17654443+ ],+ "nig-k5|0.01|1000": [+ 658,+ 343,+ 31302591+ ],+ "nig-k5|0.005|200": [+ 199,+ 93,+ 17730945+ ],+ "nig-k5|0.005|1000": [+ 303,+ 152,+ 31746262+ ],+ "nig-k8|0.1|200": [+ 5399,+ 2725,+ 16805647+ ],+ "nig-k8|0.1|1000": [+ 6720,+ 3372,+ 24700002+ ],+ "nig-k8|0.05|200": [+ 2507,+ 1288,+ 17811476+ ],+ "nig-k8|0.05|1000": [+ 3332,+ 1715,+ 28567114+ ],+ "nig-k8|0.025|200": [+ 1185,+ 615,+ 18240387+ ],+ "nig-k8|0.025|1000": [+ 1659,+ 858,+ 30599732+ ],+ "nig-k8|0.01|200": [+ 429,+ 216,+ 18475578+ ],+ "nig-k8|0.01|1000": [+ 650,+ 333,+ 31889478+ ],+ "nig-k8|0.005|200": [+ 219,+ 106,+ 18545626+ ],+ "nig-k8|0.005|1000": [+ 328,+ 164,+ 32333270+ ]+ }+ },+ {+ "ratio": 0.55,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 6974,+ 3507,+ 3731445+ ],+ "burn-in|0.1|1000": [+ 6975,+ 3508,+ 3731454+ ],+ "burn-in|0.05|200": [+ 4086,+ 2077,+ 3905003+ ],+ "burn-in|0.05|1000": [+ 4086,+ 2077,+ 3905120+ ],+ "burn-in|0.025|200": [+ 2036,+ 1005,+ 4739262+ ],+ "burn-in|0.025|1000": [+ 2036,+ 1005,+ 4739896+ ],+ "burn-in|0.01|200": [+ 985,+ 474,+ 4812715+ ],+ "burn-in|0.01|1000": [+ 986,+ 475,+ 4814580+ ],+ "burn-in|0.005|200": [+ 530,+ 260,+ 4846369+ ],+ "burn-in|0.005|1000": [+ 533,+ 261,+ 4849517+ ],+ "nig-k3|0.1|200": [+ 5489,+ 2768,+ 13494682+ ],+ "nig-k3|0.1|1000": [+ 6546,+ 3319,+ 19874987+ ],+ "nig-k3|0.05|200": [+ 2574,+ 1277,+ 14507910+ ],+ "nig-k3|0.05|1000": [+ 3209,+ 1590,+ 23069765+ ],+ "nig-k3|0.025|200": [+ 1260,+ 613,+ 14972906+ ],+ "nig-k3|0.025|1000": [+ 1631,+ 788,+ 24725273+ ],+ "nig-k3|0.01|200": [+ 455,+ 218,+ 15243755+ ],+ "nig-k3|0.01|1000": [+ 636,+ 307,+ 25798117+ ],+ "nig-k3|0.005|200": [+ 204,+ 104,+ 15331839+ ],+ "nig-k3|0.005|1000": [+ 300,+ 152,+ 26156648+ ],+ "nig-k5|0.1|200": [+ 5454,+ 2728,+ 14713453+ ],+ "nig-k5|0.1|1000": [+ 6542,+ 3284,+ 20366929+ ],+ "nig-k5|0.05|200": [+ 2526,+ 1222,+ 15822803+ ],+ "nig-k5|0.05|1000": [+ 3212,+ 1562,+ 23655148+ ],+ "nig-k5|0.025|200": [+ 1212,+ 591,+ 16331678+ ],+ "nig-k5|0.025|1000": [+ 1599,+ 770,+ 25392155+ ],+ "nig-k5|0.01|200": [+ 435,+ 211,+ 16616149+ ],+ "nig-k5|0.01|1000": [+ 630,+ 310,+ 26504377+ ],+ "nig-k5|0.005|200": [+ 211,+ 105,+ 16703820+ ],+ "nig-k5|0.005|1000": [+ 310,+ 151,+ 26890293+ ],+ "nig-k8|0.1|200": [+ 5422,+ 2664,+ 15468751+ ],+ "nig-k8|0.1|1000": [+ 6546,+ 3221,+ 20818926+ ],+ "nig-k8|0.05|200": [+ 2552,+ 1250,+ 16636771+ ],+ "nig-k8|0.05|1000": [+ 3262,+ 1605,+ 24166627+ ],+ "nig-k8|0.025|200": [+ 1201,+ 581,+ 17165610+ ],+ "nig-k8|0.025|1000": [+ 1630,+ 793,+ 25973838+ ],+ "nig-k8|0.01|200": [+ 447,+ 218,+ 17458833+ ],+ "nig-k8|0.01|1000": [+ 646,+ 314,+ 27110066+ ],+ "nig-k8|0.005|200": [+ 207,+ 98,+ 17551527+ ],+ "nig-k8|0.005|1000": [+ 305,+ 145,+ 27500595+ ]+ }+ },+ {+ "ratio": 0.6,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 6234,+ 3098,+ 3518776+ ],+ "burn-in|0.1|1000": [+ 6234,+ 3098,+ 3518776+ ],+ "burn-in|0.05|200": [+ 3854,+ 1880,+ 3640736+ ],+ "burn-in|0.05|1000": [+ 3855,+ 1881,+ 3640749+ ],+ "burn-in|0.025|200": [+ 1850,+ 907,+ 4518363+ ],+ "burn-in|0.025|1000": [+ 1852,+ 908,+ 4518531+ ],+ "burn-in|0.01|200": [+ 892,+ 440,+ 4574693+ ],+ "burn-in|0.01|1000": [+ 894,+ 441,+ 4575195+ ],+ "burn-in|0.005|200": [+ 513,+ 247,+ 4599875+ ],+ "burn-in|0.005|1000": [+ 514,+ 247,+ 4600669+ ],+ "nig-k3|0.1|200": [+ 5602,+ 2766,+ 12380332+ ],+ "nig-k3|0.1|1000": [+ 6455,+ 3191,+ 17066154+ ],+ "nig-k3|0.05|200": [+ 2668,+ 1312,+ 13423597+ ],+ "nig-k3|0.05|1000": [+ 3206,+ 1590,+ 19843137+ ],+ "nig-k3|0.025|200": [+ 1265,+ 594,+ 13919474+ ],+ "nig-k3|0.025|1000": [+ 1564,+ 747,+ 21347662+ ],+ "nig-k3|0.01|200": [+ 513,+ 236,+ 14196742+ ],+ "nig-k3|0.01|1000": [+ 663,+ 312,+ 22282104+ ],+ "nig-k3|0.005|200": [+ 251,+ 126,+ 14290722+ ],+ "nig-k3|0.005|1000": [+ 340,+ 174,+ 22617328+ ],+ "nig-k5|0.1|200": [+ 5643,+ 2783,+ 13389712+ ],+ "nig-k5|0.1|1000": [+ 6539,+ 3230,+ 17416294+ ],+ "nig-k5|0.05|200": [+ 2673,+ 1308,+ 14575897+ ],+ "nig-k5|0.05|1000": [+ 3240,+ 1597,+ 20269084+ ],+ "nig-k5|0.025|200": [+ 1252,+ 587,+ 15130171+ ],+ "nig-k5|0.025|1000": [+ 1586,+ 754,+ 21822011+ ],+ "nig-k5|0.01|200": [+ 473,+ 216,+ 15446594+ ],+ "nig-k5|0.01|1000": [+ 643,+ 299,+ 22799898+ ],+ "nig-k5|0.005|200": [+ 234,+ 117,+ 15547139+ ],+ "nig-k5|0.005|1000": [+ 342,+ 173,+ 23143555+ ],+ "nig-k8|0.1|200": [+ 5680,+ 2832,+ 14053547+ ],+ "nig-k8|0.1|1000": [+ 6603,+ 3293,+ 17836579+ ],+ "nig-k8|0.05|200": [+ 2634,+ 1296,+ 15315380+ ],+ "nig-k8|0.05|1000": [+ 3229,+ 1580,+ 20729029+ ],+ "nig-k8|0.025|200": [+ 1261,+ 599,+ 15896515+ ],+ "nig-k8|0.025|1000": [+ 1614,+ 770,+ 22287442+ ],+ "nig-k8|0.01|200": [+ 489,+ 232,+ 16229650+ ],+ "nig-k8|0.01|1000": [+ 669,+ 314,+ 23277254+ ],+ "nig-k8|0.005|200": [+ 248,+ 117,+ 16335473+ ],+ "nig-k8|0.005|1000": [+ 337,+ 161,+ 23633536+ ]+ }+ }+ ]+}diff --git a/benchmarks/results/gate-1265-ab-nig/h0-part6.json b/benchmarks/results/gate-1265-ab-nig/h0-part6.jsonnew file mode 100644index 00000000..a3247731--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/h0-part6.json@@ -0,0 +1,627 @@+{+ "beta": 0.2,+ "effect_size": 0.1,+ "results": [+ {+ "ratio": 0.7,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 4964,+ 2437,+ 3283481+ ],+ "burn-in|0.1|1000": [+ 4964,+ 2437,+ 3283481+ ],+ "burn-in|0.05|200": [+ 3072,+ 1492,+ 3352071+ ],+ "burn-in|0.05|1000": [+ 3072,+ 1492,+ 3352071+ ],+ "burn-in|0.025|200": [+ 1425,+ 697,+ 4262733+ ],+ "burn-in|0.025|1000": [+ 1425,+ 697,+ 4262733+ ],+ "burn-in|0.01|200": [+ 730,+ 386,+ 4293497+ ],+ "burn-in|0.01|1000": [+ 730,+ 386,+ 4293506+ ],+ "burn-in|0.005|200": [+ 430,+ 222,+ 4308302+ ],+ "burn-in|0.005|1000": [+ 430,+ 222,+ 4308311+ ],+ "nig-k3|0.1|200": [+ 5691,+ 2792,+ 10370786+ ],+ "nig-k3|0.1|1000": [+ 6296,+ 3105,+ 12905445+ ],+ "nig-k3|0.05|200": [+ 2732,+ 1334,+ 11425474+ ],+ "nig-k3|0.05|1000": [+ 3166,+ 1550,+ 15043101+ ],+ "nig-k3|0.025|200": [+ 1320,+ 650,+ 11936576+ ],+ "nig-k3|0.025|1000": [+ 1579,+ 773,+ 16232252+ ],+ "nig-k3|0.01|200": [+ 516,+ 242,+ 12231843+ ],+ "nig-k3|0.01|1000": [+ 653,+ 296,+ 16979260+ ],+ "nig-k3|0.005|200": [+ 248,+ 118,+ 12334638+ ],+ "nig-k3|0.005|1000": [+ 320,+ 145,+ 17255186+ ],+ "nig-k5|0.1|200": [+ 5756,+ 2857,+ 11067994+ ],+ "nig-k5|0.1|1000": [+ 6437,+ 3209,+ 13218077+ ],+ "nig-k5|0.05|200": [+ 2732,+ 1349,+ 12245302+ ],+ "nig-k5|0.05|1000": [+ 3190,+ 1574,+ 15448866+ ],+ "nig-k5|0.025|200": [+ 1282,+ 620,+ 12818623+ ],+ "nig-k5|0.025|1000": [+ 1569,+ 755,+ 16676282+ ],+ "nig-k5|0.01|200": [+ 498,+ 235,+ 13154732+ ],+ "nig-k5|0.01|1000": [+ 642,+ 292,+ 17460112+ ],+ "nig-k5|0.005|200": [+ 229,+ 107,+ 13266976+ ],+ "nig-k5|0.005|1000": [+ 312,+ 140,+ 17746115+ ],+ "nig-k8|0.1|200": [+ 5839,+ 2894,+ 11582181+ ],+ "nig-k8|0.1|1000": [+ 6505,+ 3229,+ 13583993+ ],+ "nig-k8|0.05|200": [+ 2759,+ 1374,+ 12824359+ ],+ "nig-k8|0.05|1000": [+ 3228,+ 1598,+ 15841019+ ],+ "nig-k8|0.025|200": [+ 1354,+ 684,+ 13422935+ ],+ "nig-k8|0.025|1000": [+ 1655,+ 821,+ 17081413+ ],+ "nig-k8|0.01|200": [+ 511,+ 246,+ 13783304+ ],+ "nig-k8|0.01|1000": [+ 668,+ 308,+ 17903279+ ],+ "nig-k8|0.005|200": [+ 237,+ 116,+ 13901775+ ],+ "nig-k8|0.005|1000": [+ 333,+ 151,+ 18181483+ ]+ }+ },+ {+ "ratio": 0.8,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 3638,+ 1846,+ 3155342+ ],+ "burn-in|0.1|1000": [+ 3638,+ 1846,+ 3155342+ ],+ "burn-in|0.05|200": [+ 2340,+ 1190,+ 3193283+ ],+ "burn-in|0.05|1000": [+ 2340,+ 1190,+ 3193283+ ],+ "burn-in|0.025|200": [+ 1001,+ 510,+ 4131318+ ],+ "burn-in|0.025|1000": [+ 1001,+ 510,+ 4131318+ ],+ "burn-in|0.01|200": [+ 504,+ 263,+ 4148533+ ],+ "burn-in|0.01|1000": [+ 504,+ 263,+ 4148533+ ],+ "burn-in|0.005|200": [+ 317,+ 162,+ 4155781+ ],+ "burn-in|0.005|1000": [+ 317,+ 162,+ 4155781+ ],+ "nig-k3|0.1|200": [+ 5693,+ 2929,+ 8698595+ ],+ "nig-k3|0.1|1000": [+ 6155,+ 3169,+ 10183308+ ],+ "nig-k3|0.05|200": [+ 2684,+ 1407,+ 9692008+ ],+ "nig-k3|0.05|1000": [+ 3003,+ 1577,+ 11929314+ ],+ "nig-k3|0.025|200": [+ 1307,+ 702,+ 10179260+ ],+ "nig-k3|0.025|1000": [+ 1507,+ 820,+ 12863013+ ],+ "nig-k3|0.01|200": [+ 493,+ 267,+ 10466371+ ],+ "nig-k3|0.01|1000": [+ 595,+ 326,+ 13499464+ ],+ "nig-k3|0.005|200": [+ 234,+ 129,+ 10561903+ ],+ "nig-k3|0.005|1000": [+ 305,+ 175,+ 13705230+ ],+ "nig-k5|0.1|200": [+ 5708,+ 2929,+ 9189953+ ],+ "nig-k5|0.1|1000": [+ 6176,+ 3176,+ 10430489+ ],+ "nig-k5|0.05|200": [+ 2754,+ 1441,+ 10263699+ ],+ "nig-k5|0.05|1000": [+ 3077,+ 1611,+ 12188548+ ],+ "nig-k5|0.025|200": [+ 1322,+ 715,+ 10799838+ ],+ "nig-k5|0.025|1000": [+ 1529,+ 829,+ 13167759+ ],+ "nig-k5|0.01|200": [+ 528,+ 280,+ 11120290+ ],+ "nig-k5|0.01|1000": [+ 634,+ 342,+ 13787588+ ],+ "nig-k5|0.005|200": [+ 250,+ 132,+ 11228854+ ],+ "nig-k5|0.005|1000": [+ 311,+ 173,+ 14022944+ ],+ "nig-k8|0.1|200": [+ 5924,+ 3016,+ 9593120+ ],+ "nig-k8|0.1|1000": [+ 6373,+ 3241,+ 10742065+ ],+ "nig-k8|0.05|200": [+ 2796,+ 1450,+ 10725972+ ],+ "nig-k8|0.05|1000": [+ 3159,+ 1634,+ 12560915+ ],+ "nig-k8|0.025|200": [+ 1345,+ 708,+ 11287022+ ],+ "nig-k8|0.025|1000": [+ 1557,+ 822,+ 13578753+ ],+ "nig-k8|0.01|200": [+ 531,+ 287,+ 11624406+ ],+ "nig-k8|0.01|1000": [+ 643,+ 352,+ 14229362+ ],+ "nig-k8|0.005|200": [+ 253,+ 132,+ 11738761+ ],+ "nig-k8|0.005|1000": [+ 320,+ 174,+ 14462917+ ]+ }+ },+ {+ "ratio": 1.0,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 1734,+ 857,+ 3047819+ ],+ "burn-in|0.1|1000": [+ 1734,+ 857,+ 3047819+ ],+ "burn-in|0.05|200": [+ 1148,+ 563,+ 3058693+ ],+ "burn-in|0.05|1000": [+ 1148,+ 563,+ 3058693+ ],+ "burn-in|0.025|200": [+ 392,+ 195,+ 4031248+ ],+ "burn-in|0.025|1000": [+ 392,+ 195,+ 4031248+ ],+ "burn-in|0.01|200": [+ 225,+ 118,+ 4035075+ ],+ "burn-in|0.01|1000": [+ 225,+ 118,+ 4035075+ ],+ "burn-in|0.005|200": [+ 149,+ 82,+ 4036963+ ],+ "burn-in|0.005|1000": [+ 149,+ 82,+ 4036963+ ],+ "nig-k3|0.1|200": [+ 5531,+ 2795,+ 6207180+ ],+ "nig-k3|0.1|1000": [+ 5769,+ 2917,+ 6779378+ ],+ "nig-k3|0.05|200": [+ 2759,+ 1390,+ 7003096+ ],+ "nig-k3|0.05|1000": [+ 2945,+ 1483,+ 7935078+ ],+ "nig-k3|0.025|200": [+ 1400,+ 695,+ 7409566+ ],+ "nig-k3|0.025|1000": [+ 1543,+ 759,+ 8565368+ ],+ "nig-k3|0.01|200": [+ 540,+ 278,+ 7669070+ ],+ "nig-k3|0.01|1000": [+ 617,+ 312,+ 9008915+ ],+ "nig-k3|0.005|200": [+ 260,+ 127,+ 7755348+ ],+ "nig-k3|0.005|1000": [+ 295,+ 143,+ 9171981+ ],+ "nig-k5|0.1|200": [+ 5691,+ 2871,+ 6549411+ ],+ "nig-k5|0.1|1000": [+ 5926,+ 2992,+ 7020572+ ],+ "nig-k5|0.05|200": [+ 2865,+ 1426,+ 7400872+ ],+ "nig-k5|0.05|1000": [+ 3066,+ 1523,+ 8215123+ ],+ "nig-k5|0.025|200": [+ 1380,+ 687,+ 7838894+ ],+ "nig-k5|0.025|1000": [+ 1524,+ 754,+ 8903410+ ],+ "nig-k5|0.01|200": [+ 536,+ 259,+ 8108870+ ],+ "nig-k5|0.01|1000": [+ 622,+ 296,+ 9345966+ ],+ "nig-k5|0.005|200": [+ 266,+ 124,+ 8196994+ ],+ "nig-k5|0.005|1000": [+ 304,+ 140,+ 9509947+ ],+ "nig-k8|0.1|200": [+ 5766,+ 2876,+ 6888503+ ],+ "nig-k8|0.1|1000": [+ 5990,+ 2994,+ 7328975+ ],+ "nig-k8|0.05|200": [+ 2846,+ 1405,+ 7749202+ ],+ "nig-k8|0.05|1000": [+ 3016,+ 1491,+ 8499751+ ],+ "nig-k8|0.025|200": [+ 1349,+ 669,+ 8200879+ ],+ "nig-k8|0.025|1000": [+ 1483,+ 730,+ 9180880+ ],+ "nig-k8|0.01|200": [+ 525,+ 248,+ 8480073+ ],+ "nig-k8|0.01|1000": [+ 605,+ 279,+ 9649691+ ],+ "nig-k8|0.005|200": [+ 254,+ 123,+ 8572580+ ],+ "nig-k8|0.005|1000": [+ 294,+ 142,+ 9818849+ ]+ }+ }+ ]+}diff --git a/benchmarks/results/gate-1265-ab-nig/h0-part7.json b/benchmarks/results/gate-1265-ab-nig/h0-part7.jsonnew file mode 100644index 00000000..4b52a238--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/h0-part7.json@@ -0,0 +1,420 @@+{+ "beta": 0.2,+ "effect_size": 0.1,+ "results": [+ {+ "ratio": 1.5,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 146,+ 56,+ 3002179+ ],+ "burn-in|0.1|1000": [+ 146,+ 56,+ 3002179+ ],+ "burn-in|0.05|200": [+ 106,+ 39,+ 3002658+ ],+ "burn-in|0.05|1000": [+ 106,+ 39,+ 3002658+ ],+ "burn-in|0.025|200": [+ 18,+ 8,+ 4000773+ ],+ "burn-in|0.025|1000": [+ 18,+ 8,+ 4000773+ ],+ "burn-in|0.01|200": [+ 11,+ 5,+ 4000882+ ],+ "burn-in|0.01|1000": [+ 11,+ 5,+ 4000882+ ],+ "burn-in|0.005|200": [+ 7,+ 5,+ 4000941+ ],+ "burn-in|0.005|1000": [+ 7,+ 5,+ 4000941+ ],+ "nig-k3|0.1|200": [+ 5293,+ 2651,+ 3256879+ ],+ "nig-k3|0.1|1000": [+ 5346,+ 2681,+ 3350860+ ],+ "nig-k3|0.05|200": [+ 2629,+ 1302,+ 3709223+ ],+ "nig-k3|0.05|1000": [+ 2684,+ 1332,+ 3891633+ ],+ "nig-k3|0.025|200": [+ 1331,+ 642,+ 3954358+ ],+ "nig-k3|0.025|1000": [+ 1372,+ 663,+ 4214746+ ],+ "nig-k3|0.01|200": [+ 541,+ 257,+ 4111322+ ],+ "nig-k3|0.01|1000": [+ 566,+ 271,+ 4435851+ ],+ "nig-k3|0.005|200": [+ 255,+ 118,+ 4168262+ ],+ "nig-k3|0.005|1000": [+ 269,+ 125,+ 4523567+ ],+ "nig-k5|0.1|200": [+ 5397,+ 2682,+ 3493855+ ],+ "nig-k5|0.1|1000": [+ 5450,+ 2712,+ 3564422+ ],+ "nig-k5|0.05|200": [+ 2743,+ 1352,+ 3956990+ ],+ "nig-k5|0.05|1000": [+ 2802,+ 1379,+ 4106940+ ],+ "nig-k5|0.025|200": [+ 1386,+ 679,+ 4214937+ ],+ "nig-k5|0.025|1000": [+ 1429,+ 696,+ 4436183+ ],+ "nig-k5|0.01|200": [+ 547,+ 259,+ 4380772+ ],+ "nig-k5|0.01|1000": [+ 571,+ 270,+ 4667146+ ],+ "nig-k5|0.005|200": [+ 263,+ 116,+ 4435888+ ],+ "nig-k5|0.005|1000": [+ 276,+ 124,+ 4752608+ ],+ "nig-k8|0.1|200": [+ 5488,+ 2723,+ 3805587+ ],+ "nig-k8|0.1|1000": [+ 5546,+ 2751,+ 3877036+ ],+ "nig-k8|0.05|200": [+ 2751,+ 1364,+ 4284381+ ],+ "nig-k8|0.05|1000": [+ 2815,+ 1396,+ 4433366+ ],+ "nig-k8|0.025|200": [+ 1338,+ 668,+ 4543588+ ],+ "nig-k8|0.025|1000": [+ 1381,+ 688,+ 4769732+ ],+ "nig-k8|0.01|200": [+ 552,+ 286,+ 4704393+ ],+ "nig-k8|0.01|1000": [+ 570,+ 296,+ 4990776+ ],+ "nig-k8|0.005|200": [+ 273,+ 140,+ 4763752+ ],+ "nig-k8|0.005|1000": [+ 283,+ 146,+ 5077589+ ]+ }+ },+ {+ "ratio": 2.0,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 0,+ 0,+ 3000057+ ],+ "burn-in|0.1|1000": [+ 0,+ 0,+ 3000057+ ],+ "burn-in|0.05|200": [+ 0,+ 0,+ 3000057+ ],+ "burn-in|0.05|1000": [+ 0,+ 0,+ 3000057+ ],+ "burn-in|0.025|200": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.025|1000": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.01|200": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.01|1000": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.005|200": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.005|1000": [+ 0,+ 0,+ 4000000+ ],+ "nig-k3|0.1|200": [+ 4876,+ 2463,+ 2091113+ ],+ "nig-k3|0.1|1000": [+ 4894,+ 2471,+ 2116536+ ],+ "nig-k3|0.05|200": [+ 2387,+ 1181,+ 2362368+ ],+ "nig-k3|0.05|1000": [+ 2402,+ 1188,+ 2410093+ ],+ "nig-k3|0.025|200": [+ 1200,+ 588,+ 2519169+ ],+ "nig-k3|0.025|1000": [+ 1211,+ 592,+ 2592301+ ],+ "nig-k3|0.01|200": [+ 483,+ 238,+ 2617494+ ],+ "nig-k3|0.01|1000": [+ 486,+ 239,+ 2717344+ ],+ "nig-k3|0.005|200": [+ 239,+ 124,+ 2652003+ ],+ "nig-k3|0.005|1000": [+ 241,+ 125,+ 2760049+ ],+ "nig-k5|0.1|200": [+ 4996,+ 2426,+ 2294096+ ],+ "nig-k5|0.1|1000": [+ 5004,+ 2432,+ 2314158+ ],+ "nig-k5|0.05|200": [+ 2522,+ 1208,+ 2577781+ ],+ "nig-k5|0.05|1000": [+ 2531,+ 1213,+ 2616904+ ],+ "nig-k5|0.025|200": [+ 1255,+ 607,+ 2738695+ ],+ "nig-k5|0.025|1000": [+ 1267,+ 613,+ 2803261+ ],+ "nig-k5|0.01|200": [+ 484,+ 237,+ 2841158+ ],+ "nig-k5|0.01|1000": [+ 492,+ 240,+ 2925975+ ],+ "nig-k5|0.005|200": [+ 240,+ 113,+ 2876283+ ],+ "nig-k5|0.005|1000": [+ 245,+ 115,+ 2970473+ ],+ "nig-k8|0.1|200": [+ 5014,+ 2486,+ 2604796+ ],+ "nig-k8|0.1|1000": [+ 5026,+ 2492,+ 2620917+ ],+ "nig-k8|0.05|200": [+ 2498,+ 1237,+ 2896299+ ],+ "nig-k8|0.05|1000": [+ 2512,+ 1242,+ 2937203+ ],+ "nig-k8|0.025|200": [+ 1255,+ 640,+ 3056595+ ],+ "nig-k8|0.025|1000": [+ 1274,+ 647,+ 3116663+ ],+ "nig-k8|0.01|200": [+ 493,+ 248,+ 3160171+ ],+ "nig-k8|0.01|1000": [+ 503,+ 253,+ 3245545+ ],+ "nig-k8|0.005|200": [+ 226,+ 117,+ 3199534+ ],+ "nig-k8|0.005|1000": [+ 233,+ 121,+ 3296490+ ]+ }+ }+ ]+}diff --git a/benchmarks/results/gate-1265-ab-nig/h0-part8.json b/benchmarks/results/gate-1265-ab-nig/h0-part8.jsonnew file mode 100644index 00000000..3968bf6d--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/h0-part8.json@@ -0,0 +1,420 @@+{+ "beta": 0.2,+ "effect_size": 0.1,+ "results": [+ {+ "ratio": 3.0,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 0,+ 0,+ 3000000+ ],+ "burn-in|0.1|1000": [+ 0,+ 0,+ 3000000+ ],+ "burn-in|0.05|200": [+ 0,+ 0,+ 3000000+ ],+ "burn-in|0.05|1000": [+ 0,+ 0,+ 3000000+ ],+ "burn-in|0.025|200": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.025|1000": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.01|200": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.01|1000": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.005|200": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.005|1000": [+ 0,+ 0,+ 4000000+ ],+ "nig-k3|0.1|200": [+ 4385,+ 2183,+ 1210392+ ],+ "nig-k3|0.1|1000": [+ 4388,+ 2183,+ 1213199+ ],+ "nig-k3|0.05|200": [+ 2132,+ 1040,+ 1344717+ ],+ "nig-k3|0.05|1000": [+ 2137,+ 1040,+ 1352666+ ],+ "nig-k3|0.025|200": [+ 1055,+ 518,+ 1425613+ ],+ "nig-k3|0.025|1000": [+ 1063,+ 521,+ 1443810+ ],+ "nig-k3|0.01|200": [+ 419,+ 216,+ 1477558+ ],+ "nig-k3|0.01|1000": [+ 423,+ 218,+ 1503538+ ],+ "nig-k3|0.005|200": [+ 215,+ 111,+ 1495796+ ],+ "nig-k3|0.005|1000": [+ 218,+ 112,+ 1523293+ ],+ "nig-k5|0.1|200": [+ 4453,+ 2218,+ 1407382+ ],+ "nig-k5|0.1|1000": [+ 4454,+ 2218,+ 1408904+ ],+ "nig-k5|0.05|200": [+ 2205,+ 1089,+ 1543408+ ],+ "nig-k5|0.05|1000": [+ 2208,+ 1090,+ 1549247+ ],+ "nig-k5|0.025|200": [+ 1115,+ 551,+ 1623342+ ],+ "nig-k5|0.025|1000": [+ 1119,+ 552,+ 1634365+ ],+ "nig-k5|0.01|200": [+ 451,+ 231,+ 1676701+ ],+ "nig-k5|0.01|1000": [+ 456,+ 234,+ 1693129+ ],+ "nig-k5|0.005|200": [+ 236,+ 126,+ 1697562+ ],+ "nig-k5|0.005|1000": [+ 240,+ 128,+ 1716602+ ],+ "nig-k8|0.1|200": [+ 4358,+ 2184,+ 1709211+ ],+ "nig-k8|0.1|1000": [+ 4359,+ 2184,+ 1709630+ ],+ "nig-k8|0.05|200": [+ 2245,+ 1127,+ 1842885+ ],+ "nig-k8|0.05|1000": [+ 2252,+ 1129,+ 1845788+ ],+ "nig-k8|0.025|200": [+ 1141,+ 550,+ 1924840+ ],+ "nig-k8|0.025|1000": [+ 1144,+ 551,+ 1933889+ ],+ "nig-k8|0.01|200": [+ 469,+ 224,+ 1978018+ ],+ "nig-k8|0.01|1000": [+ 471,+ 225,+ 1991984+ ],+ "nig-k8|0.005|200": [+ 233,+ 113,+ 1997247+ ],+ "nig-k8|0.005|1000": [+ 236,+ 115,+ 2014432+ ]+ }+ },+ {+ "ratio": 5.0,+ "mode": "h0",+ "runs": 100000,+ "counts": {+ "burn-in|0.1|200": [+ 0,+ 0,+ 3000000+ ],+ "burn-in|0.1|1000": [+ 0,+ 0,+ 3000000+ ],+ "burn-in|0.05|200": [+ 0,+ 0,+ 3000000+ ],+ "burn-in|0.05|1000": [+ 0,+ 0,+ 3000000+ ],+ "burn-in|0.025|200": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.025|1000": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.01|200": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.01|1000": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.005|200": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.005|1000": [+ 0,+ 0,+ 4000000+ ],+ "nig-k3|0.1|200": [+ 4020,+ 2023,+ 744751+ ],+ "nig-k3|0.1|1000": [+ 4020,+ 2023,+ 744902+ ],+ "nig-k3|0.05|200": [+ 1967,+ 999,+ 797109+ ],+ "nig-k3|0.05|1000": [+ 1968,+ 999,+ 797820+ ],+ "nig-k3|0.025|200": [+ 920,+ 471,+ 828033+ ],+ "nig-k3|0.025|1000": [+ 921,+ 471,+ 830884+ ],+ "nig-k3|0.01|200": [+ 358,+ 178,+ 848171+ ],+ "nig-k3|0.01|1000": [+ 359,+ 178,+ 852310+ ],+ "nig-k3|0.005|200": [+ 172,+ 90,+ 855878+ ],+ "nig-k3|0.005|1000": [+ 173,+ 90,+ 860418+ ],+ "nig-k5|0.1|200": [+ 4048,+ 2020,+ 940410+ ],+ "nig-k5|0.1|1000": [+ 4048,+ 2020,+ 940471+ ],+ "nig-k5|0.05|200": [+ 1935,+ 937,+ 992770+ ],+ "nig-k5|0.05|1000": [+ 1937,+ 938,+ 993662+ ],+ "nig-k5|0.025|200": [+ 932,+ 445,+ 1023393+ ],+ "nig-k5|0.025|1000": [+ 934,+ 446,+ 1025234+ ],+ "nig-k5|0.01|200": [+ 405,+ 194,+ 1043860+ ],+ "nig-k5|0.01|1000": [+ 407,+ 195,+ 1046882+ ],+ "nig-k5|0.005|200": [+ 217,+ 102,+ 1051016+ ],+ "nig-k5|0.005|1000": [+ 218,+ 102,+ 1054814+ ],+ "nig-k8|0.1|200": [+ 4219,+ 2070,+ 1237242+ ],+ "nig-k8|0.1|1000": [+ 4220,+ 2071,+ 1237319+ ],+ "nig-k8|0.05|200": [+ 1983,+ 959,+ 1289475+ ],+ "nig-k8|0.05|1000": [+ 1985,+ 961,+ 1289944+ ],+ "nig-k8|0.025|200": [+ 917,+ 453,+ 1319617+ ],+ "nig-k8|0.025|1000": [+ 918,+ 454,+ 1322229+ ],+ "nig-k8|0.01|200": [+ 404,+ 203,+ 1340211+ ],+ "nig-k8|0.01|1000": [+ 404,+ 203,+ 1344296+ ],+ "nig-k8|0.005|200": [+ 203,+ 98,+ 1347518+ ],+ "nig-k8|0.005|1000": [+ 204,+ 99,+ 1352016+ ]+ }+ }+ ]+}diff --git a/benchmarks/results/gate-1265-ab-nig/h1-part1.json b/benchmarks/results/gate-1265-ab-nig/h1-part1.jsonnew file mode 100644index 00000000..9abe2d9c--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/h1-part1.json@@ -0,0 +1,1248 @@+{+ "beta": 0.2,+ "effect_size": 0.1,+ "results": [+ {+ "ratio": 0.1,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 401,+ 401,+ 3984911+ ],+ "burn-in|0.1|1000": [+ 11685,+ 11681,+ 13969715+ ],+ "burn-in|0.05|200": [+ 69,+ 69,+ 3998059+ ],+ "burn-in|0.05|1000": [+ 8917,+ 8917,+ 16007564+ ],+ "burn-in|0.025|200": [+ 8,+ 8,+ 3999757+ ],+ "burn-in|0.025|1000": [+ 6383,+ 6383,+ 17368911+ ],+ "burn-in|0.01|200": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.01|1000": [+ 3518,+ 3518,+ 18438444+ ],+ "burn-in|0.005|200": [+ 0,+ 0,+ 4000000+ ],+ "burn-in|0.005|1000": [+ 2045,+ 2045,+ 18867411+ ],+ "nig-k3|0.1|200": [+ 708,+ 703,+ 3952931+ ],+ "nig-k3|0.1|1000": [+ 8420,+ 8415,+ 16219586+ ],+ "nig-k3|0.05|200": [+ 308,+ 306,+ 3978518+ ],+ "nig-k3|0.05|1000": [+ 6147,+ 6145,+ 17524472+ ],+ "nig-k3|0.025|200": [+ 144,+ 144,+ 3989300+ ],+ "nig-k3|0.025|1000": [+ 4335,+ 4335,+ 18385004+ ],+ "nig-k3|0.01|200": [+ 60,+ 60,+ 3994647+ ],+ "nig-k3|0.01|1000": [+ 2589,+ 2589,+ 19072004+ ],+ "nig-k3|0.005|200": [+ 28,+ 28,+ 3996298+ ],+ "nig-k3|0.005|1000": [+ 1720,+ 1720,+ 19372080+ ],+ "nig-k5|0.1|200": [+ 567,+ 566,+ 3971224+ ],+ "nig-k5|0.1|1000": [+ 8507,+ 8506,+ 16388718+ ],+ "nig-k5|0.05|200": [+ 219,+ 219,+ 3989338+ ],+ "nig-k5|0.05|1000": [+ 6218,+ 6218,+ 17693459+ ],+ "nig-k5|0.025|200": [+ 94,+ 94,+ 3996082+ ],+ "nig-k5|0.025|1000": [+ 4332,+ 4332,+ 18548868+ ],+ "nig-k5|0.01|200": [+ 25,+ 25,+ 3998868+ ],+ "nig-k5|0.01|1000": [+ 2607,+ 2607,+ 19207259+ ],+ "nig-k5|0.005|200": [+ 13,+ 13,+ 3999460+ ],+ "nig-k5|0.005|1000": [+ 1706,+ 1706,+ 19505988+ ],+ "nig-k8|0.1|200": [+ 467,+ 467,+ 3978597+ ],+ "nig-k8|0.1|1000": [+ 8532,+ 8532,+ 16428199+ ],+ "nig-k8|0.05|200": [+ 176,+ 176,+ 3992891+ ],+ "nig-k8|0.05|1000": [+ 6208,+ 6208,+ 17726270+ ],+ "nig-k8|0.025|200": [+ 59,+ 59,+ 3997646+ ],+ "nig-k8|0.025|1000": [+ 4336,+ 4336,+ 18583716+ ],+ "nig-k8|0.01|200": [+ 17,+ 17,+ 3999420+ ],+ "nig-k8|0.01|1000": [+ 2591,+ 2591,+ 19238775+ ],+ "nig-k8|0.005|200": [+ 8,+ 8,+ 3999691+ ],+ "nig-k8|0.005|1000": [+ 1694,+ 1694,+ 19533506+ ]+ }+ },+ {+ "ratio": 0.15,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 4103,+ 4095,+ 3764348+ ],+ "burn-in|0.1|1000": [+ 15941,+ 15932,+ 7190355+ ],+ "burn-in|0.05|200": [+ 1844,+ 1844,+ 3918340+ ],+ "burn-in|0.05|1000": [+ 15363,+ 15363,+ 9006242+ ],+ "burn-in|0.025|200": [+ 705,+ 705,+ 3974311+ ],+ "burn-in|0.025|1000": [+ 14380,+ 14380,+ 10682156+ ],+ "burn-in|0.01|200": [+ 170,+ 170,+ 3995035+ ],+ "burn-in|0.01|1000": [+ 12734,+ 12734,+ 12565858+ ],+ "burn-in|0.005|200": [+ 40,+ 40,+ 3998835+ ],+ "burn-in|0.005|1000": [+ 11235,+ 11235,+ 13784981+ ],+ "nig-k3|0.1|200": [+ 2862,+ 2849,+ 3792685+ ],+ "nig-k3|0.1|1000": [+ 16017,+ 16004,+ 11061872+ ],+ "nig-k3|0.05|200": [+ 1556,+ 1552,+ 3892262+ ],+ "nig-k3|0.05|1000": [+ 14274,+ 14270,+ 12867367+ ],+ "nig-k3|0.025|200": [+ 880,+ 879,+ 3939680+ ],+ "nig-k3|0.025|1000": [+ 12521,+ 12520,+ 14329927+ ],+ "nig-k3|0.01|200": [+ 390,+ 390,+ 3971228+ ],+ "nig-k3|0.01|1000": [+ 10134,+ 10134,+ 15908888+ ],+ "nig-k3|0.005|200": [+ 224,+ 224,+ 3981838+ ],+ "nig-k3|0.005|1000": [+ 8468,+ 8468,+ 16819687+ ],+ "nig-k5|0.1|200": [+ 2744,+ 2736,+ 3824584+ ],+ "nig-k5|0.1|1000": [+ 16257,+ 16249,+ 11252788+ ],+ "nig-k5|0.05|200": [+ 1478,+ 1478,+ 3915672+ ],+ "nig-k5|0.05|1000": [+ 14472,+ 14472,+ 13042650+ ],+ "nig-k5|0.025|200": [+ 750,+ 750,+ 3961110+ ],+ "nig-k5|0.025|1000": [+ 12682,+ 12682,+ 14508589+ ],+ "nig-k5|0.01|200": [+ 349,+ 349,+ 3984538+ ],+ "nig-k5|0.01|1000": [+ 10261,+ 10261,+ 16096630+ ],+ "nig-k5|0.005|200": [+ 183,+ 183,+ 3992406+ ],+ "nig-k5|0.005|1000": [+ 8570,+ 8570,+ 16995383+ ],+ "nig-k8|0.1|200": [+ 2622,+ 2619,+ 3840354+ ],+ "nig-k8|0.1|1000": [+ 16275,+ 16272,+ 11337799+ ],+ "nig-k8|0.05|200": [+ 1409,+ 1409,+ 3924892+ ],+ "nig-k8|0.05|1000": [+ 14523,+ 14523,+ 13075096+ ],+ "nig-k8|0.025|200": [+ 710,+ 710,+ 3965053+ ],+ "nig-k8|0.025|1000": [+ 12692,+ 12692,+ 14552133+ ],+ "nig-k8|0.01|200": [+ 308,+ 308,+ 3987513+ ],+ "nig-k8|0.01|1000": [+ 10301,+ 10301,+ 16134380+ ],+ "nig-k8|0.005|200": [+ 154,+ 154,+ 3994534+ ],+ "nig-k8|0.005|1000": [+ 8556,+ 8556,+ 17045877+ ]+ }+ },+ {+ "ratio": 0.2,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 9536,+ 9527,+ 3173062+ ],+ "burn-in|0.1|1000": [+ 16263,+ 16252,+ 4081803+ ],+ "burn-in|0.05|200": [+ 6462,+ 6461,+ 3522679+ ],+ "burn-in|0.05|1000": [+ 16213,+ 16212,+ 5213861+ ],+ "burn-in|0.025|200": [+ 4036,+ 4035,+ 3729897+ ],+ "burn-in|0.025|1000": [+ 16086,+ 16085,+ 6330524+ ],+ "burn-in|0.01|200": [+ 1823,+ 1823,+ 3869837+ ],+ "burn-in|0.01|1000": [+ 15801,+ 15801,+ 7778076+ ],+ "burn-in|0.005|200": [+ 922,+ 922,+ 3913571+ ],+ "burn-in|0.005|1000": [+ 15459,+ 15459,+ 8831296+ ],+ "nig-k3|0.1|200": [+ 6274,+ 6266,+ 3473282+ ],+ "nig-k3|0.1|1000": [+ 19033,+ 19025,+ 6976787+ ],+ "nig-k3|0.05|200": [+ 4200,+ 4198,+ 3684391+ ],+ "nig-k3|0.05|1000": [+ 18658,+ 18656,+ 8462965+ ],+ "nig-k3|0.025|200": [+ 2692,+ 2691,+ 3811567+ ],+ "nig-k3|0.025|1000": [+ 18045,+ 18044,+ 9829733+ ],+ "nig-k3|0.01|200": [+ 1496,+ 1496,+ 3899467+ ],+ "nig-k3|0.01|1000": [+ 16955,+ 16955,+ 11492145+ ],+ "nig-k3|0.005|200": [+ 922,+ 922,+ 3935208+ ],+ "nig-k3|0.005|1000": [+ 15987,+ 15987,+ 12632350+ ],+ "nig-k5|0.1|200": [+ 6239,+ 6233,+ 3519832+ ],+ "nig-k5|0.1|1000": [+ 19361,+ 19354,+ 7144413+ ],+ "nig-k5|0.05|200": [+ 4149,+ 4148,+ 3722540+ ],+ "nig-k5|0.05|1000": [+ 18918,+ 18917,+ 8621371+ ],+ "nig-k5|0.025|200": [+ 2650,+ 2649,+ 3840807+ ],+ "nig-k5|0.025|1000": [+ 18293,+ 18292,+ 9997683+ ],+ "nig-k5|0.01|200": [+ 1445,+ 1445,+ 3923036+ ],+ "nig-k5|0.01|1000": [+ 17182,+ 17182,+ 11656893+ ],+ "nig-k5|0.005|200": [+ 894,+ 894,+ 3956046+ ],+ "nig-k5|0.005|1000": [+ 16199,+ 16199,+ 12803944+ ],+ "nig-k8|0.1|200": [+ 6127,+ 6123,+ 3546079+ ],+ "nig-k8|0.1|1000": [+ 19423,+ 19418,+ 7226481+ ],+ "nig-k8|0.05|200": [+ 4040,+ 4039,+ 3740510+ ],+ "nig-k8|0.05|1000": [+ 18970,+ 18969,+ 8693431+ ],+ "nig-k8|0.025|200": [+ 2596,+ 2595,+ 3852110+ ],+ "nig-k8|0.025|1000": [+ 18329,+ 18328,+ 10036839+ ],+ "nig-k8|0.01|200": [+ 1375,+ 1375,+ 3930697+ ],+ "nig-k8|0.01|1000": [+ 17223,+ 17223,+ 11703174+ ],+ "nig-k8|0.005|200": [+ 819,+ 819,+ 3961988+ ],+ "nig-k8|0.005|1000": [+ 16238,+ 16238,+ 12851705+ ]+ }+ },+ {+ "ratio": 0.25,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 13515,+ 13507,+ 2439880+ ],+ "burn-in|0.1|1000": [+ 16266,+ 16258,+ 2665132+ ],+ "burn-in|0.05|200": [+ 11173,+ 11170,+ 2861542+ ],+ "burn-in|0.05|1000": [+ 16307,+ 16304,+ 3382705+ ],+ "burn-in|0.025|200": [+ 8797,+ 8797,+ 3178662+ ],+ "burn-in|0.025|1000": [+ 16317,+ 16317,+ 4099373+ ],+ "burn-in|0.01|200": [+ 5811,+ 5811,+ 3463807+ ],+ "burn-in|0.01|1000": [+ 16300,+ 16300,+ 5036029+ ],+ "burn-in|0.005|200": [+ 3954,+ 3954,+ 3599347+ ],+ "burn-in|0.005|1000": [+ 16261,+ 16261,+ 5767576+ ],+ "nig-k3|0.1|200": [+ 10059,+ 10051,+ 3083906+ ],+ "nig-k3|0.1|1000": [+ 19468,+ 19460,+ 4579959+ ],+ "nig-k3|0.05|200": [+ 7668,+ 7666,+ 3371541+ ],+ "nig-k3|0.05|1000": [+ 19521,+ 19519,+ 5556649+ ],+ "nig-k3|0.025|200": [+ 5697,+ 5696,+ 3569100+ ],+ "nig-k3|0.025|1000": [+ 19478,+ 19477,+ 6509159+ ],+ "nig-k3|0.01|200": [+ 3706,+ 3706,+ 3738648+ ],+ "nig-k3|0.01|1000": [+ 19349,+ 19349,+ 7751700+ ],+ "nig-k3|0.005|200": [+ 2629,+ 2629,+ 3819614+ ],+ "nig-k3|0.005|1000": [+ 19167,+ 19167,+ 8674999+ ],+ "nig-k5|0.1|200": [+ 10082,+ 10078,+ 3138338+ ],+ "nig-k5|0.1|1000": [+ 19854,+ 19850,+ 4704116+ ],+ "nig-k5|0.05|200": [+ 7694,+ 7693,+ 3419204+ ],+ "nig-k5|0.05|1000": [+ 19837,+ 19836,+ 5669722+ ],+ "nig-k5|0.025|200": [+ 5707,+ 5706,+ 3612031+ ],+ "nig-k5|0.025|1000": [+ 19766,+ 19765,+ 6622470+ ],+ "nig-k5|0.01|200": [+ 3719,+ 3719,+ 3777247+ ],+ "nig-k5|0.01|1000": [+ 19622,+ 19622,+ 7871793+ ],+ "nig-k5|0.005|200": [+ 2601,+ 2601,+ 3854923+ ],+ "nig-k5|0.005|1000": [+ 19431,+ 19431,+ 8809898+ ],+ "nig-k8|0.1|200": [+ 10003,+ 10001,+ 3167898+ ],+ "nig-k8|0.1|1000": [+ 19940,+ 19938,+ 4758477+ ],+ "nig-k8|0.05|200": [+ 7585,+ 7584,+ 3446358+ ],+ "nig-k8|0.05|1000": [+ 19909,+ 19908,+ 5737228+ ],+ "nig-k8|0.025|200": [+ 5585,+ 5584,+ 3635511+ ],+ "nig-k8|0.025|1000": [+ 19835,+ 19834,+ 6693058+ ],+ "nig-k8|0.01|200": [+ 3605,+ 3605,+ 3794910+ ],+ "nig-k8|0.01|1000": [+ 19678,+ 19678,+ 7945724+ ],+ "nig-k8|0.005|200": [+ 2510,+ 2510,+ 3868063+ ],+ "nig-k8|0.005|1000": [+ 19479,+ 19479,+ 8875468+ ]+ }+ },+ {+ "ratio": 0.3,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 15442,+ 15437,+ 1835661+ ],+ "burn-in|0.1|1000": [+ 16297,+ 16292,+ 1883523+ ],+ "burn-in|0.05|200": [+ 14242,+ 14239,+ 2228275+ ],+ "burn-in|0.05|1000": [+ 16340,+ 16337,+ 2370087+ ],+ "burn-in|0.025|200": [+ 12752,+ 12752,+ 2570377+ ],+ "burn-in|0.025|1000": [+ 16359,+ 16359,+ 2866917+ ],+ "burn-in|0.01|200": [+ 10297,+ 10297,+ 2937503+ ],+ "burn-in|0.01|1000": [+ 16367,+ 16367,+ 3541067+ ],+ "burn-in|0.005|200": [+ 8361,+ 8361,+ 3147583+ ],+ "burn-in|0.005|1000": [+ 16363,+ 16363,+ 4038298+ ],+ "nig-k3|0.1|200": [+ 13677,+ 13669,+ 2635697+ ],+ "nig-k3|0.1|1000": [+ 19531,+ 19523,+ 3237126+ ],+ "nig-k3|0.05|200": [+ 11547,+ 11546,+ 2972425+ ],+ "nig-k3|0.05|1000": [+ 19597,+ 19596,+ 3923609+ ],+ "nig-k3|0.025|200": [+ 9469,+ 9469,+ 3235002+ ],+ "nig-k3|0.025|1000": [+ 19626,+ 19626,+ 4602436+ ],+ "nig-k3|0.01|200": [+ 7017,+ 7017,+ 3489912+ ],+ "nig-k3|0.01|1000": [+ 19641,+ 19641,+ 5478200+ ],+ "nig-k3|0.005|200": [+ 5445,+ 5445,+ 3625132+ ],+ "nig-k3|0.005|1000": [+ 19628,+ 19628,+ 6132860+ ],+ "nig-k5|0.1|200": [+ 13781,+ 13781,+ 2696905+ ],+ "nig-k5|0.1|1000": [+ 19895,+ 19895,+ 3340037+ ],+ "nig-k5|0.05|200": [+ 11629,+ 11629,+ 3023453+ ],+ "nig-k5|0.05|1000": [+ 19928,+ 19928,+ 4024103+ ],+ "nig-k5|0.025|200": [+ 9533,+ 9533,+ 3278105+ ],+ "nig-k5|0.025|1000": [+ 19937,+ 19937,+ 4691316+ ],+ "nig-k5|0.01|200": [+ 6981,+ 6981,+ 3531730+ ],+ "nig-k5|0.01|1000": [+ 19937,+ 19937,+ 5589072+ ],+ "nig-k5|0.005|200": [+ 5409,+ 5409,+ 3666968+ ],+ "nig-k5|0.005|1000": [+ 19924,+ 19924,+ 6247597+ ],+ "nig-k8|0.1|200": [+ 13710,+ 13707,+ 2733657+ ],+ "nig-k8|0.1|1000": [+ 19983,+ 19980,+ 3398776+ ],+ "nig-k8|0.05|200": [+ 11521,+ 11521,+ 3057475+ ],+ "nig-k8|0.05|1000": [+ 19993,+ 19993,+ 4087732+ ],+ "nig-k8|0.025|200": [+ 9378,+ 9378,+ 3310514+ ],+ "nig-k8|0.025|1000": [+ 19992,+ 19992,+ 4759000+ ],+ "nig-k8|0.01|200": [+ 6876,+ 6876,+ 3554832+ ],+ "nig-k8|0.01|1000": [+ 19983,+ 19983,+ 5645328+ ],+ "nig-k8|0.005|200": [+ 5361,+ 5361,+ 3682022+ ],+ "nig-k8|0.005|1000": [+ 19966,+ 19966,+ 6299779+ ]+ }+ },+ {+ "ratio": 0.35,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 16100,+ 16096,+ 1413169+ ],+ "burn-in|0.1|1000": [+ 16304,+ 16300,+ 1422069+ ],+ "burn-in|0.05|200": [+ 15684,+ 15682,+ 1729123+ ],+ "burn-in|0.05|1000": [+ 16351,+ 16349,+ 1765150+ ],+ "burn-in|0.025|200": [+ 14934,+ 14934,+ 2049051+ ],+ "burn-in|0.025|1000": [+ 16362,+ 16362,+ 2133520+ ],+ "burn-in|0.01|200": [+ 13504,+ 13504,+ 2408735+ ],+ "burn-in|0.01|1000": [+ 16354,+ 16354,+ 2611735+ ],+ "burn-in|0.005|200": [+ 12120,+ 12120,+ 2646380+ ],+ "burn-in|0.005|1000": [+ 16337,+ 16337,+ 2973790+ ],+ "nig-k3|0.1|200": [+ 16425,+ 16415,+ 2205863+ ],+ "nig-k3|0.1|1000": [+ 19551,+ 19541,+ 2432221+ ],+ "nig-k3|0.05|200": [+ 14792,+ 14791,+ 2555721+ ],+ "nig-k3|0.05|1000": [+ 19621,+ 19620,+ 2948422+ ],+ "nig-k3|0.025|200": [+ 13061,+ 13061,+ 2853485+ ],+ "nig-k3|0.025|1000": [+ 19653,+ 19653,+ 3449666+ ],+ "nig-k3|0.01|200": [+ 10737,+ 10737,+ 3163241+ ],+ "nig-k3|0.01|1000": [+ 19669,+ 19669,+ 4095076+ ],+ "nig-k3|0.005|200": [+ 8988,+ 8988,+ 3350894+ ],+ "nig-k3|0.005|1000": [+ 19675,+ 19675,+ 4581739+ ],+ "nig-k5|0.1|200": [+ 16593,+ 16591,+ 2272477+ ],+ "nig-k5|0.1|1000": [+ 19911,+ 19909,+ 2516279+ ],+ "nig-k5|0.05|200": [+ 14926,+ 14924,+ 2618105+ ],+ "nig-k5|0.05|1000": [+ 19935,+ 19933,+ 3027320+ ],+ "nig-k5|0.025|200": [+ 13199,+ 13197,+ 2900224+ ],+ "nig-k5|0.025|1000": [+ 19947,+ 19945,+ 3517278+ ],+ "nig-k5|0.01|200": [+ 10745,+ 10745,+ 3212479+ ],+ "nig-k5|0.01|1000": [+ 19953,+ 19953,+ 4181729+ ],+ "nig-k5|0.005|200": [+ 8996,+ 8996,+ 3400440+ ],+ "nig-k5|0.005|1000": [+ 19953,+ 19953,+ 4675357+ ],+ "nig-k8|0.1|200": [+ 16490,+ 16485,+ 2324031+ ],+ "nig-k8|0.1|1000": [+ 19977,+ 19972,+ 2580893+ ],+ "nig-k8|0.05|200": [+ 14853,+ 14852,+ 2661882+ ],+ "nig-k8|0.05|1000": [+ 19984,+ 19983,+ 3086163+ ],+ "nig-k8|0.025|200": [+ 13078,+ 13078,+ 2942477+ ],+ "nig-k8|0.025|1000": [+ 19985,+ 19985,+ 3576604+ ],+ "nig-k8|0.01|200": [+ 10561,+ 10561,+ 3248525+ ],+ "nig-k8|0.01|1000": [+ 19988,+ 19988,+ 4240379+ ],+ "nig-k8|0.005|200": [+ 8834,+ 8834,+ 3424998+ ],+ "nig-k8|0.005|1000": [+ 19989,+ 19989,+ 4722015+ ]+ }+ }+ ]+}diff --git a/benchmarks/results/gate-1265-ab-nig/h1-part2.json b/benchmarks/results/gate-1265-ab-nig/h1-part2.jsonnew file mode 100644index 00000000..ac7a27f0--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/h1-part2.json@@ -0,0 +1,1248 @@+{+ "beta": 0.2,+ "effect_size": 0.1,+ "results": [+ {+ "ratio": 0.4,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 16530,+ 16530,+ 1130258+ ],+ "burn-in|0.1|1000": [+ 16571,+ 16571,+ 1131783+ ],+ "burn-in|0.05|200": [+ 16430,+ 16430,+ 1374054+ ],+ "burn-in|0.05|1000": [+ 16595,+ 16595,+ 1380808+ ],+ "burn-in|0.025|200": [+ 16192,+ 16192,+ 1659919+ ],+ "burn-in|0.025|1000": [+ 16666,+ 16666,+ 1681951+ ],+ "burn-in|0.01|200": [+ 15474,+ 15474,+ 1980426+ ],+ "burn-in|0.01|1000": [+ 16670,+ 16670,+ 2045166+ ],+ "burn-in|0.005|200": [+ 14771,+ 14771,+ 2208701+ ],+ "burn-in|0.005|1000": [+ 16671,+ 16671,+ 2323043+ ],+ "nig-k3|0.1|200": [+ 18219,+ 18217,+ 1808257+ ],+ "nig-k3|0.1|1000": [+ 19543,+ 19541,+ 1877757+ ],+ "nig-k3|0.05|200": [+ 17288,+ 17288,+ 2137300+ ],+ "nig-k3|0.05|1000": [+ 19622,+ 19622,+ 2272986+ ],+ "nig-k3|0.025|200": [+ 16172,+ 16172,+ 2433702+ ],+ "nig-k3|0.025|1000": [+ 19647,+ 19647,+ 2657856+ ],+ "nig-k3|0.01|200": [+ 14351,+ 14351,+ 2777500+ ],+ "nig-k3|0.01|1000": [+ 19661,+ 19661,+ 3159664+ ],+ "nig-k3|0.005|200": [+ 12795,+ 12795,+ 2998957+ ],+ "nig-k3|0.005|1000": [+ 19665,+ 19665,+ 3533749+ ],+ "nig-k5|0.1|200": [+ 18433,+ 18432,+ 1868702+ ],+ "nig-k5|0.1|1000": [+ 19910,+ 19909,+ 1947106+ ],+ "nig-k5|0.05|200": [+ 17455,+ 17455,+ 2197604+ ],+ "nig-k5|0.05|1000": [+ 19936,+ 19936,+ 2344729+ ],+ "nig-k5|0.025|200": [+ 16289,+ 16289,+ 2492646+ ],+ "nig-k5|0.025|1000": [+ 19951,+ 19951,+ 2728384+ ],+ "nig-k5|0.01|200": [+ 14375,+ 14375,+ 2835362+ ],+ "nig-k5|0.01|1000": [+ 19955,+ 19955,+ 3237048+ ],+ "nig-k5|0.005|200": [+ 12866,+ 12866,+ 3052822+ ],+ "nig-k5|0.005|1000": [+ 19956,+ 19956,+ 3615740+ ],+ "nig-k8|0.1|200": [+ 18405,+ 18403,+ 1929765+ ],+ "nig-k8|0.1|1000": [+ 19977,+ 19975,+ 2015735+ ],+ "nig-k8|0.05|200": [+ 17396,+ 17396,+ 2248194+ ],+ "nig-k8|0.05|1000": [+ 19987,+ 19987,+ 2403304+ ],+ "nig-k8|0.025|200": [+ 16186,+ 16186,+ 2538580+ ],+ "nig-k8|0.025|1000": [+ 19989,+ 19989,+ 2785285+ ],+ "nig-k8|0.01|200": [+ 14230,+ 14230,+ 2872775+ ],+ "nig-k8|0.01|1000": [+ 19991,+ 19991,+ 3290637+ ],+ "nig-k8|0.005|200": [+ 12703,+ 12703,+ 3087657+ ],+ "nig-k8|0.005|1000": [+ 19992,+ 19992,+ 3667663+ ]+ }+ },+ {+ "ratio": 0.45,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 16514,+ 16512,+ 955998+ ],+ "burn-in|0.1|1000": [+ 16522,+ 16520,+ 956236+ ],+ "burn-in|0.05|200": [+ 16487,+ 16487,+ 1132891+ ],+ "burn-in|0.05|1000": [+ 16540,+ 16540,+ 1134730+ ],+ "burn-in|0.025|200": [+ 16707,+ 16707,+ 1395011+ ],+ "burn-in|0.025|1000": [+ 16853,+ 16853,+ 1400096+ ],+ "burn-in|0.01|200": [+ 16424,+ 16424,+ 1648281+ ],+ "burn-in|0.01|1000": [+ 16848,+ 16848,+ 1665595+ ],+ "burn-in|0.005|200": [+ 16094,+ 16094,+ 1845178+ ],+ "burn-in|0.005|1000": [+ 16846,+ 16846,+ 1878796+ ],+ "nig-k3|0.1|200": [+ 18977,+ 18972,+ 1498998+ ],+ "nig-k3|0.1|1000": [+ 19517,+ 19512,+ 1521099+ ],+ "nig-k3|0.05|200": [+ 18572,+ 18570,+ 1786380+ ],+ "nig-k3|0.05|1000": [+ 19587,+ 19585,+ 1830582+ ],+ "nig-k3|0.025|200": [+ 18020,+ 18019,+ 2053221+ ],+ "nig-k3|0.025|1000": [+ 19618,+ 19617,+ 2129347+ ],+ "nig-k3|0.01|200": [+ 16933,+ 16933,+ 2383390+ ],+ "nig-k3|0.01|1000": [+ 19636,+ 19636,+ 2526375+ ],+ "nig-k3|0.005|200": [+ 15854,+ 15854,+ 2611328+ ],+ "nig-k3|0.005|1000": [+ 19642,+ 19642,+ 2824076+ ],+ "nig-k5|0.1|200": [+ 19262,+ 19259,+ 1564846+ ],+ "nig-k5|0.1|1000": [+ 19867,+ 19864,+ 1589254+ ],+ "nig-k5|0.05|200": [+ 18805,+ 18805,+ 1844382+ ],+ "nig-k5|0.05|1000": [+ 19908,+ 19908,+ 1891893+ ],+ "nig-k5|0.025|200": [+ 18192,+ 18192,+ 2114396+ ],+ "nig-k5|0.025|1000": [+ 19921,+ 19921,+ 2197117+ ],+ "nig-k5|0.01|200": [+ 17053,+ 17053,+ 2443980+ ],+ "nig-k5|0.01|1000": [+ 19931,+ 19931,+ 2596961+ ],+ "nig-k5|0.005|200": [+ 15956,+ 15956,+ 2668190+ ],+ "nig-k5|0.005|1000": [+ 19933,+ 19933,+ 2893472+ ],+ "nig-k8|0.1|200": [+ 19313,+ 19310,+ 1623519+ ],+ "nig-k8|0.1|1000": [+ 19968,+ 19965,+ 1650567+ ],+ "nig-k8|0.05|200": [+ 18802,+ 18802,+ 1904340+ ],+ "nig-k8|0.05|1000": [+ 19980,+ 19980,+ 1955971+ ],+ "nig-k8|0.025|200": [+ 18139,+ 18139,+ 2172306+ ],+ "nig-k8|0.025|1000": [+ 19982,+ 19982,+ 2262035+ ],+ "nig-k8|0.01|200": [+ 16916,+ 16916,+ 2497332+ ],+ "nig-k8|0.01|1000": [+ 19984,+ 19984,+ 2660981+ ],+ "nig-k8|0.005|200": [+ 15781,+ 15781,+ 2718513+ ],+ "nig-k8|0.005|1000": [+ 19985,+ 19985,+ 2957949+ ]+ }+ },+ {+ "ratio": 0.5,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 16793,+ 16793,+ 841754+ ],+ "burn-in|0.1|1000": [+ 16796,+ 16796,+ 841785+ ],+ "burn-in|0.05|200": [+ 16782,+ 16782,+ 975602+ ],+ "burn-in|0.05|1000": [+ 16801,+ 16801,+ 976033+ ],+ "burn-in|0.025|200": [+ 17248,+ 17248,+ 1224016+ ],+ "burn-in|0.025|1000": [+ 17299,+ 17299,+ 1225719+ ],+ "burn-in|0.01|200": [+ 17148,+ 17148,+ 1420170+ ],+ "burn-in|0.01|1000": [+ 17278,+ 17278,+ 1424806+ ],+ "burn-in|0.005|200": [+ 17014,+ 17014,+ 1579151+ ],+ "burn-in|0.005|1000": [+ 17273,+ 17273,+ 1589770+ ],+ "nig-k3|0.1|200": [+ 19389,+ 19381,+ 1254866+ ],+ "nig-k3|0.1|1000": [+ 19550,+ 19542,+ 1260354+ ],+ "nig-k3|0.05|200": [+ 19288,+ 19287,+ 1502037+ ],+ "nig-k3|0.05|1000": [+ 19633,+ 19632,+ 1513824+ ],+ "nig-k3|0.025|200": [+ 19036,+ 19036,+ 1737144+ ],+ "nig-k3|0.025|1000": [+ 19656,+ 19656,+ 1759705+ ],+ "nig-k3|0.01|200": [+ 18504,+ 18504,+ 2033115+ ],+ "nig-k3|0.01|1000": [+ 19671,+ 19671,+ 2080521+ ],+ "nig-k3|0.005|200": [+ 17929,+ 17929,+ 2244354+ ],+ "nig-k3|0.005|1000": [+ 19676,+ 19676,+ 2319690+ ],+ "nig-k5|0.1|200": [+ 19696,+ 19695,+ 1316690+ ],+ "nig-k5|0.1|1000": [+ 19895,+ 19894,+ 1323770+ ],+ "nig-k5|0.05|200": [+ 19531,+ 19531,+ 1558204+ ],+ "nig-k5|0.05|1000": [+ 19923,+ 19923,+ 1572225+ ],+ "nig-k5|0.025|200": [+ 19253,+ 19253,+ 1788564+ ],+ "nig-k5|0.025|1000": [+ 19927,+ 19927,+ 1813888+ ],+ "nig-k5|0.01|200": [+ 18665,+ 18665,+ 2087175+ ],+ "nig-k5|0.01|1000": [+ 19937,+ 19937,+ 2139390+ ],+ "nig-k5|0.005|200": [+ 18071,+ 18071,+ 2300870+ ],+ "nig-k5|0.005|1000": [+ 19938,+ 19938,+ 2382528+ ],+ "nig-k8|0.1|200": [+ 19744,+ 19743,+ 1376132+ ],+ "nig-k8|0.1|1000": [+ 19967,+ 19966,+ 1383333+ ],+ "nig-k8|0.05|200": [+ 19539,+ 19539,+ 1616672+ ],+ "nig-k8|0.05|1000": [+ 19971,+ 19971,+ 1631983+ ],+ "nig-k8|0.025|200": [+ 19231,+ 19231,+ 1846242+ ],+ "nig-k8|0.025|1000": [+ 19974,+ 19974,+ 1874527+ ],+ "nig-k8|0.01|200": [+ 18652,+ 18652,+ 2141970+ ],+ "nig-k8|0.01|1000": [+ 19979,+ 19979,+ 2197208+ ],+ "nig-k8|0.005|200": [+ 17982,+ 17982,+ 2355852+ ],+ "nig-k8|0.005|1000": [+ 19981,+ 19981,+ 2443300+ ]+ }+ },+ {+ "ratio": 0.6,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 17558,+ 17558,+ 724233+ ],+ "burn-in|0.1|1000": [+ 17558,+ 17558,+ 724233+ ],+ "burn-in|0.05|200": [+ 17553,+ 17553,+ 799331+ ],+ "burn-in|0.05|1000": [+ 17553,+ 17553,+ 799331+ ],+ "burn-in|0.025|200": [+ 18159,+ 18159,+ 1022031+ ],+ "burn-in|0.025|1000": [+ 18161,+ 18161,+ 1022058+ ],+ "burn-in|0.01|200": [+ 18140,+ 18140,+ 1140734+ ],+ "burn-in|0.01|1000": [+ 18151,+ 18151,+ 1140908+ ],+ "burn-in|0.005|200": [+ 18106,+ 18106,+ 1245051+ ],+ "burn-in|0.005|1000": [+ 18144,+ 18144,+ 1245956+ ],+ "nig-k3|0.1|200": [+ 19578,+ 19572,+ 925519+ ],+ "nig-k3|0.1|1000": [+ 19590,+ 19584,+ 925704+ ],+ "nig-k3|0.05|200": [+ 19624,+ 19623,+ 1104714+ ],+ "nig-k3|0.05|1000": [+ 19651,+ 19650,+ 1105502+ ],+ "nig-k3|0.025|200": [+ 19630,+ 19630,+ 1278302+ ],+ "nig-k3|0.025|1000": [+ 19679,+ 19679,+ 1279696+ ],+ "nig-k3|0.01|200": [+ 19549,+ 19549,+ 1499761+ ],+ "nig-k3|0.01|1000": [+ 19690,+ 19690,+ 1503035+ ],+ "nig-k3|0.005|200": [+ 19438,+ 19438,+ 1666087+ ],+ "nig-k3|0.005|1000": [+ 19697,+ 19697,+ 1672680+ ],+ "nig-k5|0.1|200": [+ 19896,+ 19895,+ 976458+ ],+ "nig-k5|0.1|1000": [+ 19906,+ 19905,+ 976656+ ],+ "nig-k5|0.05|200": [+ 19910,+ 19910,+ 1154166+ ],+ "nig-k5|0.05|1000": [+ 19936,+ 19936,+ 1154842+ ],+ "nig-k5|0.025|200": [+ 19888,+ 19888,+ 1325418+ ],+ "nig-k5|0.025|1000": [+ 19944,+ 19944,+ 1326945+ ],+ "nig-k5|0.01|200": [+ 19805,+ 19805,+ 1550321+ ],+ "nig-k5|0.01|1000": [+ 19948,+ 19948,+ 1553798+ ],+ "nig-k5|0.005|200": [+ 19686,+ 19686,+ 1719598+ ],+ "nig-k5|0.005|1000": [+ 19950,+ 19950,+ 1726472+ ],+ "nig-k8|0.1|200": [+ 19955,+ 19951,+ 1032659+ ],+ "nig-k8|0.1|1000": [+ 19968,+ 19964,+ 1032956+ ],+ "nig-k8|0.05|200": [+ 19945,+ 19945,+ 1210653+ ],+ "nig-k8|0.05|1000": [+ 19976,+ 19976,+ 1211339+ ],+ "nig-k8|0.025|200": [+ 19915,+ 19915,+ 1383472+ ],+ "nig-k8|0.025|1000": [+ 19982,+ 19982,+ 1385207+ ],+ "nig-k8|0.01|200": [+ 19823,+ 19823,+ 1608804+ ],+ "nig-k8|0.01|1000": [+ 19985,+ 19985,+ 1612932+ ],+ "nig-k8|0.005|200": [+ 19683,+ 19683,+ 1776639+ ],+ "nig-k8|0.005|1000": [+ 19985,+ 19985,+ 1784296+ ]+ }+ },+ {+ "ratio": 0.7,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 18352,+ 18352,+ 669124+ ],+ "burn-in|0.1|1000": [+ 18352,+ 18352,+ 669124+ ],+ "burn-in|0.05|200": [+ 18362,+ 18362,+ 711804+ ],+ "burn-in|0.05|1000": [+ 18362,+ 18362,+ 711804+ ],+ "burn-in|0.025|200": [+ 18867,+ 18867,+ 913256+ ],+ "burn-in|0.025|1000": [+ 18867,+ 18867,+ 913256+ ],+ "burn-in|0.01|200": [+ 18857,+ 18857,+ 979036+ ],+ "burn-in|0.01|1000": [+ 18858,+ 18858,+ 979039+ ],+ "burn-in|0.005|200": [+ 18854,+ 18854,+ 1040839+ ],+ "burn-in|0.005|1000": [+ 18856,+ 18856,+ 1040850+ ],+ "nig-k3|0.1|200": [+ 19558,+ 19557,+ 707242+ ],+ "nig-k3|0.1|1000": [+ 19558,+ 19557,+ 707242+ ],+ "nig-k3|0.05|200": [+ 19625,+ 19625,+ 838767+ ],+ "nig-k3|0.05|1000": [+ 19626,+ 19626,+ 838771+ ],+ "nig-k3|0.025|200": [+ 19662,+ 19662,+ 966571+ ],+ "nig-k3|0.025|1000": [+ 19663,+ 19663,+ 966580+ ],+ "nig-k3|0.01|200": [+ 19679,+ 19679,+ 1136594+ ],+ "nig-k3|0.01|1000": [+ 19681,+ 19681,+ 1136652+ ],+ "nig-k3|0.005|200": [+ 19682,+ 19682,+ 1264308+ ],+ "nig-k3|0.005|1000": [+ 19686,+ 19686,+ 1264381+ ],+ "nig-k5|0.1|200": [+ 19908,+ 19907,+ 755504+ ],+ "nig-k5|0.1|1000": [+ 19909,+ 19908,+ 755507+ ],+ "nig-k5|0.05|200": [+ 19943,+ 19942,+ 886840+ ],+ "nig-k5|0.05|1000": [+ 19944,+ 19943,+ 886847+ ],+ "nig-k5|0.025|200": [+ 19947,+ 19947,+ 1014950+ ],+ "nig-k5|0.025|1000": [+ 19948,+ 19948,+ 1014972+ ],+ "nig-k5|0.01|200": [+ 19953,+ 19953,+ 1187560+ ],+ "nig-k5|0.01|1000": [+ 19955,+ 19955,+ 1187599+ ],+ "nig-k5|0.005|200": [+ 19949,+ 19949,+ 1314902+ ],+ "nig-k5|0.005|1000": [+ 19955,+ 19955,+ 1314990+ ],+ "nig-k8|0.1|200": [+ 19974,+ 19972,+ 816548+ ],+ "nig-k8|0.1|1000": [+ 19974,+ 19972,+ 816548+ ],+ "nig-k8|0.05|200": [+ 19983,+ 19983,+ 947191+ ],+ "nig-k8|0.05|1000": [+ 19984,+ 19984,+ 947194+ ],+ "nig-k8|0.025|200": [+ 19983,+ 19983,+ 1075747+ ],+ "nig-k8|0.025|1000": [+ 19984,+ 19984,+ 1075756+ ],+ "nig-k8|0.01|200": [+ 19981,+ 19981,+ 1247180+ ],+ "nig-k8|0.01|1000": [+ 19987,+ 19987,+ 1247277+ ],+ "nig-k8|0.005|200": [+ 19975,+ 19975,+ 1377076+ ],+ "nig-k8|0.005|1000": [+ 19987,+ 19987,+ 1377291+ ]+ }+ },+ {+ "ratio": 0.8,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 18880,+ 18880,+ 636123+ ],+ "burn-in|0.1|1000": [+ 18880,+ 18880,+ 636123+ ],+ "burn-in|0.05|200": [+ 18876,+ 18876,+ 659822+ ],+ "burn-in|0.05|1000": [+ 18876,+ 18876,+ 659822+ ],+ "burn-in|0.025|200": [+ 19292,+ 19292,+ 855201+ ],+ "burn-in|0.025|1000": [+ 19292,+ 19292,+ 855201+ ],+ "burn-in|0.01|200": [+ 19290,+ 19290,+ 891405+ ],+ "burn-in|0.01|1000": [+ 19290,+ 19290,+ 891405+ ],+ "burn-in|0.005|200": [+ 19287,+ 19287,+ 925164+ ],+ "burn-in|0.005|1000": [+ 19287,+ 19287,+ 925164+ ],+ "nig-k3|0.1|200": [+ 19598,+ 19594,+ 564264+ ],+ "nig-k3|0.1|1000": [+ 19598,+ 19594,+ 564264+ ],+ "nig-k3|0.05|200": [+ 19675,+ 19675,+ 667877+ ],+ "nig-k3|0.05|1000": [+ 19675,+ 19675,+ 667877+ ],+ "nig-k3|0.025|200": [+ 19708,+ 19708,+ 771275+ ],+ "nig-k3|0.025|1000": [+ 19708,+ 19708,+ 771275+ ],+ "nig-k3|0.01|200": [+ 19725,+ 19725,+ 903454+ ],+ "nig-k3|0.01|1000": [+ 19725,+ 19725,+ 903454+ ],+ "nig-k3|0.005|200": [+ 19731,+ 19731,+ 1004452+ ],+ "nig-k3|0.005|1000": [+ 19731,+ 19731,+ 1004452+ ],+ "nig-k5|0.1|200": [+ 19918,+ 19916,+ 609913+ ],+ "nig-k5|0.1|1000": [+ 19918,+ 19916,+ 609913+ ],+ "nig-k5|0.05|200": [+ 19937,+ 19937,+ 715296+ ],+ "nig-k5|0.05|1000": [+ 19937,+ 19937,+ 715296+ ],+ "nig-k5|0.025|200": [+ 19947,+ 19947,+ 817323+ ],+ "nig-k5|0.025|1000": [+ 19947,+ 19947,+ 817323+ ],+ "nig-k5|0.01|200": [+ 19956,+ 19956,+ 949231+ ],+ "nig-k5|0.01|1000": [+ 19956,+ 19956,+ 949231+ ],+ "nig-k5|0.005|200": [+ 19956,+ 19956,+ 1048420+ ],+ "nig-k5|0.005|1000": [+ 19957,+ 19957,+ 1048421+ ],+ "nig-k8|0.1|200": [+ 19976,+ 19974,+ 671631+ ],+ "nig-k8|0.1|1000": [+ 19976,+ 19974,+ 671631+ ],+ "nig-k8|0.05|200": [+ 19985,+ 19984,+ 776571+ ],+ "nig-k8|0.05|1000": [+ 19985,+ 19984,+ 776571+ ],+ "nig-k8|0.025|200": [+ 19988,+ 19988,+ 877952+ ],+ "nig-k8|0.025|1000": [+ 19988,+ 19988,+ 877952+ ],+ "nig-k8|0.01|200": [+ 19990,+ 19990,+ 1009106+ ],+ "nig-k8|0.01|1000": [+ 19991,+ 19991,+ 1009107+ ],+ "nig-k8|0.005|200": [+ 19990,+ 19990,+ 1108979+ ],+ "nig-k8|0.005|1000": [+ 19991,+ 19991,+ 1108988+ ]+ }+ }+ ]+}diff --git a/benchmarks/results/gate-1265-ab-nig/h1-part3.json b/benchmarks/results/gate-1265-ab-nig/h1-part3.jsonnew file mode 100644index 00000000..e8d45f69--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/h1-part3.json@@ -0,0 +1,1041 @@+{+ "beta": 0.2,+ "effect_size": 0.1,+ "results": [+ {+ "ratio": 1.0,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 19546,+ 19546,+ 610264+ ],+ "burn-in|0.1|1000": [+ 19546,+ 19546,+ 610264+ ],+ "burn-in|0.05|200": [+ 19545,+ 19545,+ 617798+ ],+ "burn-in|0.05|1000": [+ 19545,+ 19545,+ 617798+ ],+ "burn-in|0.025|200": [+ 19771,+ 19771,+ 813244+ ],+ "burn-in|0.025|1000": [+ 19771,+ 19771,+ 813244+ ],+ "burn-in|0.01|200": [+ 19770,+ 19770,+ 822211+ ],+ "burn-in|0.01|1000": [+ 19770,+ 19770,+ 822211+ ],+ "burn-in|0.005|200": [+ 19769,+ 19769,+ 831615+ ],+ "burn-in|0.005|1000": [+ 19769,+ 19769,+ 831615+ ],+ "nig-k3|0.1|200": [+ 19589,+ 19585,+ 402159+ ],+ "nig-k3|0.1|1000": [+ 19589,+ 19585,+ 402159+ ],+ "nig-k3|0.05|200": [+ 19647,+ 19645,+ 470817+ ],+ "nig-k3|0.05|1000": [+ 19647,+ 19645,+ 470817+ ],+ "nig-k3|0.025|200": [+ 19668,+ 19667,+ 539139+ ],+ "nig-k3|0.025|1000": [+ 19668,+ 19667,+ 539139+ ],+ "nig-k3|0.01|200": [+ 19683,+ 19683,+ 625823+ ],+ "nig-k3|0.01|1000": [+ 19683,+ 19683,+ 625823+ ],+ "nig-k3|0.005|200": [+ 19688,+ 19688,+ 691182+ ],+ "nig-k3|0.005|1000": [+ 19688,+ 19688,+ 691182+ ],+ "nig-k5|0.1|200": [+ 19910,+ 19907,+ 445681+ ],+ "nig-k5|0.1|1000": [+ 19910,+ 19907,+ 445681+ ],+ "nig-k5|0.05|200": [+ 19933,+ 19932,+ 515549+ ],+ "nig-k5|0.05|1000": [+ 19933,+ 19932,+ 515549+ ],+ "nig-k5|0.025|200": [+ 19942,+ 19942,+ 583384+ ],+ "nig-k5|0.025|1000": [+ 19942,+ 19942,+ 583384+ ],+ "nig-k5|0.01|200": [+ 19947,+ 19947,+ 669819+ ],+ "nig-k5|0.01|1000": [+ 19947,+ 19947,+ 669819+ ],+ "nig-k5|0.005|200": [+ 19949,+ 19949,+ 736438+ ],+ "nig-k5|0.005|1000": [+ 19949,+ 19949,+ 736438+ ],+ "nig-k8|0.1|200": [+ 19977,+ 19975,+ 506874+ ],+ "nig-k8|0.1|1000": [+ 19977,+ 19975,+ 506874+ ],+ "nig-k8|0.05|200": [+ 19985,+ 19985,+ 575065+ ],+ "nig-k8|0.05|1000": [+ 19985,+ 19985,+ 575065+ ],+ "nig-k8|0.025|200": [+ 19988,+ 19988,+ 643382+ ],+ "nig-k8|0.025|1000": [+ 19988,+ 19988,+ 643382+ ],+ "nig-k8|0.01|200": [+ 19988,+ 19988,+ 732186+ ],+ "nig-k8|0.01|1000": [+ 19988,+ 19988,+ 732186+ ],+ "nig-k8|0.005|200": [+ 19988,+ 19988,+ 796413+ ],+ "nig-k8|0.005|1000": [+ 19988,+ 19988,+ 796413+ ]+ }+ },+ {+ "ratio": 1.5,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 19972,+ 19972,+ 600287+ ],+ "burn-in|0.1|1000": [+ 19972,+ 19972,+ 600287+ ],+ "burn-in|0.05|200": [+ 19973,+ 19973,+ 600525+ ],+ "burn-in|0.05|1000": [+ 19973,+ 19973,+ 600525+ ],+ "burn-in|0.025|200": [+ 19996,+ 19996,+ 800225+ ],+ "burn-in|0.025|1000": [+ 19996,+ 19996,+ 800225+ ],+ "burn-in|0.01|200": [+ 19996,+ 19996,+ 800357+ ],+ "burn-in|0.01|1000": [+ 19996,+ 19996,+ 800357+ ],+ "burn-in|0.005|200": [+ 19996,+ 19996,+ 800550+ ],+ "burn-in|0.005|1000": [+ 19996,+ 19996,+ 800550+ ],+ "nig-k3|0.1|200": [+ 19717,+ 19716,+ 241102+ ],+ "nig-k3|0.1|1000": [+ 19717,+ 19716,+ 241102+ ],+ "nig-k3|0.05|200": [+ 19762,+ 19762,+ 275545+ ],+ "nig-k3|0.05|1000": [+ 19762,+ 19762,+ 275545+ ],+ "nig-k3|0.025|200": [+ 19793,+ 19793,+ 309427+ ],+ "nig-k3|0.025|1000": [+ 19793,+ 19793,+ 309427+ ],+ "nig-k3|0.01|200": [+ 19808,+ 19808,+ 353384+ ],+ "nig-k3|0.01|1000": [+ 19808,+ 19808,+ 353384+ ],+ "nig-k3|0.005|200": [+ 19811,+ 19811,+ 386428+ ],+ "nig-k3|0.005|1000": [+ 19811,+ 19811,+ 386428+ ],+ "nig-k5|0.1|200": [+ 19934,+ 19933,+ 281193+ ],+ "nig-k5|0.1|1000": [+ 19934,+ 19933,+ 281193+ ],+ "nig-k5|0.05|200": [+ 19948,+ 19948,+ 315812+ ],+ "nig-k5|0.05|1000": [+ 19948,+ 19948,+ 315812+ ],+ "nig-k5|0.025|200": [+ 19954,+ 19954,+ 349685+ ],+ "nig-k5|0.025|1000": [+ 19954,+ 19954,+ 349685+ ],+ "nig-k5|0.01|200": [+ 19958,+ 19958,+ 393637+ ],+ "nig-k5|0.01|1000": [+ 19958,+ 19958,+ 393637+ ],+ "nig-k5|0.005|200": [+ 19958,+ 19958,+ 426366+ ],+ "nig-k5|0.005|1000": [+ 19958,+ 19958,+ 426366+ ],+ "nig-k8|0.1|200": [+ 19985,+ 19983,+ 342093+ ],+ "nig-k8|0.1|1000": [+ 19985,+ 19983,+ 342093+ ],+ "nig-k8|0.05|200": [+ 19988,+ 19986,+ 376202+ ],+ "nig-k8|0.05|1000": [+ 19988,+ 19986,+ 376202+ ],+ "nig-k8|0.025|200": [+ 19992,+ 19992,+ 409718+ ],+ "nig-k8|0.025|1000": [+ 19992,+ 19992,+ 409718+ ],+ "nig-k8|0.01|200": [+ 19992,+ 19992,+ 453678+ ],+ "nig-k8|0.01|1000": [+ 19992,+ 19992,+ 453678+ ],+ "nig-k8|0.005|200": [+ 19992,+ 19992,+ 486893+ ],+ "nig-k8|0.005|1000": [+ 19992,+ 19992,+ 486893+ ]+ }+ },+ {+ "ratio": 2.0,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 20000,+ 20000,+ 600003+ ],+ "burn-in|0.1|1000": [+ 20000,+ 20000,+ 600003+ ],+ "burn-in|0.05|200": [+ 20000,+ 20000,+ 600011+ ],+ "burn-in|0.05|1000": [+ 20000,+ 20000,+ 600011+ ],+ "burn-in|0.025|200": [+ 20000,+ 20000,+ 800010+ ],+ "burn-in|0.025|1000": [+ 20000,+ 20000,+ 800010+ ],+ "burn-in|0.01|200": [+ 20000,+ 20000,+ 800014+ ],+ "burn-in|0.01|1000": [+ 20000,+ 20000,+ 800014+ ],+ "burn-in|0.005|200": [+ 20000,+ 20000,+ 800019+ ],+ "burn-in|0.005|1000": [+ 20000,+ 20000,+ 800019+ ],+ "nig-k3|0.1|200": [+ 19773,+ 19773,+ 183079+ ],+ "nig-k3|0.1|1000": [+ 19773,+ 19773,+ 183079+ ],+ "nig-k3|0.05|200": [+ 19822,+ 19822,+ 205391+ ],+ "nig-k3|0.05|1000": [+ 19822,+ 19822,+ 205391+ ],+ "nig-k3|0.025|200": [+ 19839,+ 19839,+ 226920+ ],+ "nig-k3|0.025|1000": [+ 19839,+ 19839,+ 226920+ ],+ "nig-k3|0.01|200": [+ 19848,+ 19848,+ 255240+ ],+ "nig-k3|0.01|1000": [+ 19848,+ 19848,+ 255240+ ],+ "nig-k3|0.005|200": [+ 19850,+ 19850,+ 276268+ ],+ "nig-k3|0.005|1000": [+ 19850,+ 19850,+ 276268+ ],+ "nig-k5|0.1|200": [+ 19947,+ 19947,+ 223688+ ],+ "nig-k5|0.1|1000": [+ 19947,+ 19947,+ 223688+ ],+ "nig-k5|0.05|200": [+ 19967,+ 19967,+ 245475+ ],+ "nig-k5|0.05|1000": [+ 19967,+ 19967,+ 245475+ ],+ "nig-k5|0.025|200": [+ 19973,+ 19973,+ 267199+ ],+ "nig-k5|0.025|1000": [+ 19973,+ 19973,+ 267199+ ],+ "nig-k5|0.01|200": [+ 19975,+ 19975,+ 295314+ ],+ "nig-k5|0.01|1000": [+ 19975,+ 19975,+ 295314+ ],+ "nig-k5|0.005|200": [+ 19975,+ 19975,+ 316041+ ],+ "nig-k5|0.005|1000": [+ 19975,+ 19975,+ 316041+ ],+ "nig-k8|0.1|200": [+ 19985,+ 19985,+ 283251+ ],+ "nig-k8|0.1|1000": [+ 19985,+ 19985,+ 283251+ ],+ "nig-k8|0.05|200": [+ 19992,+ 19992,+ 304868+ ],+ "nig-k8|0.05|1000": [+ 19992,+ 19992,+ 304868+ ],+ "nig-k8|0.025|200": [+ 19993,+ 19993,+ 326543+ ],+ "nig-k8|0.025|1000": [+ 19993,+ 19993,+ 326543+ ],+ "nig-k8|0.01|200": [+ 19995,+ 19995,+ 354578+ ],+ "nig-k8|0.01|1000": [+ 19995,+ 19995,+ 354578+ ],+ "nig-k8|0.005|200": [+ 19995,+ 19995,+ 376027+ ],+ "nig-k8|0.005|1000": [+ 19995,+ 19995,+ 376027+ ]+ }+ },+ {+ "ratio": 3.0,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 20000,+ 20000,+ 600000+ ],+ "burn-in|0.1|1000": [+ 20000,+ 20000,+ 600000+ ],+ "burn-in|0.05|200": [+ 20000,+ 20000,+ 600000+ ],+ "burn-in|0.05|1000": [+ 20000,+ 20000,+ 600000+ ],+ "burn-in|0.025|200": [+ 20000,+ 20000,+ 800000+ ],+ "burn-in|0.025|1000": [+ 20000,+ 20000,+ 800000+ ],+ "burn-in|0.01|200": [+ 20000,+ 20000,+ 800000+ ],+ "burn-in|0.01|1000": [+ 20000,+ 20000,+ 800000+ ],+ "burn-in|0.005|200": [+ 20000,+ 20000,+ 800000+ ],+ "burn-in|0.005|1000": [+ 20000,+ 20000,+ 800000+ ],+ "nig-k3|0.1|200": [+ 19907,+ 19907,+ 140602+ ],+ "nig-k3|0.1|1000": [+ 19907,+ 19907,+ 140602+ ],+ "nig-k3|0.05|200": [+ 19918,+ 19918,+ 153713+ ],+ "nig-k3|0.05|1000": [+ 19918,+ 19918,+ 153713+ ],+ "nig-k3|0.025|200": [+ 19932,+ 19932,+ 166391+ ],+ "nig-k3|0.025|1000": [+ 19932,+ 19932,+ 166391+ ],+ "nig-k3|0.01|200": [+ 19932,+ 19932,+ 183177+ ],+ "nig-k3|0.01|1000": [+ 19932,+ 19932,+ 183177+ ],+ "nig-k3|0.005|200": [+ 19933,+ 19933,+ 195521+ ],+ "nig-k3|0.005|1000": [+ 19933,+ 19933,+ 195521+ ],+ "nig-k5|0.1|200": [+ 19982,+ 19982,+ 180802+ ],+ "nig-k5|0.1|1000": [+ 19982,+ 19982,+ 180802+ ],+ "nig-k5|0.05|200": [+ 19985,+ 19985,+ 193114+ ],+ "nig-k5|0.05|1000": [+ 19985,+ 19985,+ 193114+ ],+ "nig-k5|0.025|200": [+ 19986,+ 19986,+ 205597+ ],+ "nig-k5|0.025|1000": [+ 19986,+ 19986,+ 205597+ ],+ "nig-k5|0.01|200": [+ 19988,+ 19988,+ 222159+ ],+ "nig-k5|0.01|1000": [+ 19988,+ 19988,+ 222159+ ],+ "nig-k5|0.005|200": [+ 19989,+ 19989,+ 234629+ ],+ "nig-k5|0.005|1000": [+ 19989,+ 19989,+ 234629+ ],+ "nig-k8|0.1|200": [+ 19995,+ 19995,+ 240794+ ],+ "nig-k8|0.1|1000": [+ 19995,+ 19995,+ 240794+ ],+ "nig-k8|0.05|200": [+ 19998,+ 19998,+ 252969+ ],+ "nig-k8|0.05|1000": [+ 19998,+ 19998,+ 252969+ ],+ "nig-k8|0.025|200": [+ 19998,+ 19998,+ 265393+ ],+ "nig-k8|0.025|1000": [+ 19998,+ 19998,+ 265393+ ],+ "nig-k8|0.01|200": [+ 19998,+ 19998,+ 282009+ ],+ "nig-k8|0.01|1000": [+ 19998,+ 19998,+ 282009+ ],+ "nig-k8|0.005|200": [+ 19998,+ 19998,+ 294493+ ],+ "nig-k8|0.005|1000": [+ 19998,+ 19998,+ 294493+ ]+ }+ },+ {+ "ratio": 5.0,+ "mode": "h1",+ "runs": 20000,+ "counts": {+ "burn-in|0.1|200": [+ 20000,+ 20000,+ 600000+ ],+ "burn-in|0.1|1000": [+ 20000,+ 20000,+ 600000+ ],+ "burn-in|0.05|200": [+ 20000,+ 20000,+ 600000+ ],+ "burn-in|0.05|1000": [+ 20000,+ 20000,+ 600000+ ],+ "burn-in|0.025|200": [+ 20000,+ 20000,+ 800000+ ],+ "burn-in|0.025|1000": [+ 20000,+ 20000,+ 800000+ ],+ "burn-in|0.01|200": [+ 20000,+ 20000,+ 800000+ ],+ "burn-in|0.01|1000": [+ 20000,+ 20000,+ 800000+ ],+ "burn-in|0.005|200": [+ 20000,+ 20000,+ 800000+ ],+ "burn-in|0.005|1000": [+ 20000,+ 20000,+ 800000+ ],+ "nig-k3|0.1|200": [+ 19995,+ 19995,+ 116663+ ],+ "nig-k3|0.1|1000": [+ 19995,+ 19995,+ 116663+ ],+ "nig-k3|0.05|200": [+ 19996,+ 19996,+ 125057+ ],+ "nig-k3|0.05|1000": [+ 19996,+ 19996,+ 125057+ ],+ "nig-k3|0.025|200": [+ 19997,+ 19997,+ 132542+ ],+ "nig-k3|0.025|1000": [+ 19997,+ 19997,+ 132542+ ],+ "nig-k3|0.01|200": [+ 19997,+ 19997,+ 141897+ ],+ "nig-k3|0.01|1000": [+ 19997,+ 19997,+ 141897+ ],+ "nig-k3|0.005|200": [+ 19997,+ 19997,+ 149330+ ],+ "nig-k3|0.005|1000": [+ 19997,+ 19997,+ 149330+ ],+ "nig-k5|0.1|200": [+ 19998,+ 19998,+ 155986+ ],+ "nig-k5|0.1|1000": [+ 19998,+ 19998,+ 155986+ ],+ "nig-k5|0.05|200": [+ 19998,+ 19998,+ 164728+ ],+ "nig-k5|0.05|1000": [+ 19998,+ 19998,+ 164728+ ],+ "nig-k5|0.025|200": [+ 19998,+ 19998,+ 172333+ ],+ "nig-k5|0.025|1000": [+ 19998,+ 19998,+ 172333+ ],+ "nig-k5|0.01|200": [+ 19998,+ 19998,+ 181497+ ],+ "nig-k5|0.01|1000": [+ 19998,+ 19998,+ 181497+ ],+ "nig-k5|0.005|200": [+ 19998,+ 19998,+ 188947+ ],+ "nig-k5|0.005|1000": [+ 19998,+ 19998,+ 188947+ ],+ "nig-k8|0.1|200": [+ 20000,+ 20000,+ 215713+ ],+ "nig-k8|0.1|1000": [+ 20000,+ 20000,+ 215713+ ],+ "nig-k8|0.05|200": [+ 20000,+ 20000,+ 224838+ ],+ "nig-k8|0.05|1000": [+ 20000,+ 20000,+ 224838+ ],+ "nig-k8|0.025|200": [+ 20000,+ 20000,+ 232188+ ],+ "nig-k8|0.025|1000": [+ 20000,+ 20000,+ 232188+ ],+ "nig-k8|0.01|200": [+ 20000,+ 20000,+ 241055+ ],+ "nig-k8|0.01|1000": [+ 20000,+ 20000,+ 241055+ ],+ "nig-k8|0.005|200": [+ 20000,+ 20000,+ 248522+ ],+ "nig-k8|0.005|1000": [+ 20000,+ 20000,+ 248522+ ]+ }+ }+ ]+}diff --git a/benchmarks/results/gate-1265-ab-nig/report.txt b/benchmarks/results/gate-1265-ab-nig/report.txtnew file mode 100644index 00000000..96c75f9d--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/report.txt@@ -0,0 +1,445 @@+H0: Type-I rate (first verdict reject_h0), 100000 runs per ratio; bound = alpha + 3 SE, * = above it++alpha 0.1, horizon 1000 (bound 0.10285)+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.07113 0.03503 0.03281 0.03194+ 0.150 0.09471 0.04947 0.04784 0.04735+ 0.200 0.09881 0.05775 0.05719 0.05764+ 0.250 0.09986 0.06219 0.06267 0.06183+ 0.275 0.09858 0.06292 0.06289 0.06236+ 0.300 0.09643 0.06398 0.06445 0.06369+ 0.325 0.09551 0.06466 0.06573 0.06575+ 0.350 0.09429 0.06552 0.06659 0.06665+ 0.375 0.08993 0.06498 0.06599 0.06667+ 0.400 0.08979 0.06722 0.06756 0.06759+ 0.425 0.08465 0.06457 0.06624 0.06544+ 0.450 0.08163 0.06494 0.06647 0.06631+ 0.500 0.07499 0.06567 0.06687 0.06720+ 0.550 0.06975 0.06546 0.06542 0.06546+ 0.600 0.06234 0.06455 0.06539 0.06603+ 0.700 0.04964 0.06296 0.06437 0.06505+ 0.800 0.03638 0.06155 0.06176 0.06373+ 1.000 0.01734 0.05769 0.05926 0.05990+ 1.500 0.00146 0.05346 0.05450 0.05546+ 2.000 0.00000 0.04894 0.05004 0.05026+ 3.000 0.00000 0.04388 0.04454 0.04359+ 5.000 0.00000 0.04020 0.04048 0.04220+ worst 0.09986 0.06722 0.06756 0.06759 at 0.25, 0.4, 0.4, 0.4++alpha 0.05, horizon 1000 (bound 0.05207)+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.02720 0.01451 0.01343 0.01263+ 0.150 0.04626 0.02207 0.02116 0.02088+ 0.200 0.04993 0.02667 0.02606 0.02584+ 0.250 0.05016 0.02945 0.02877 0.02937+ 0.275 0.05105 0.03014 0.03021 0.03008+ 0.300 0.04958 0.03102 0.03090 0.03055+ 0.325 0.05084 0.03120 0.03153 0.03227+ 0.350 0.05083 0.03178 0.03210 0.03187+ 0.375 0.04859 0.03154 0.03236 0.03249+ 0.400 0.04906 0.03214 0.03234 0.03299+ 0.425 0.04734 0.03214 0.03230 0.03296+ 0.450 0.04642 0.03120 0.03182 0.03229+ 0.500 0.04398 0.03226 0.03280 0.03332+ 0.550 0.04086 0.03209 0.03212 0.03262+ 0.600 0.03855 0.03206 0.03240 0.03229+ 0.700 0.03072 0.03166 0.03190 0.03228+ 0.800 0.02340 0.03003 0.03077 0.03159+ 1.000 0.01148 0.02945 0.03066 0.03016+ 1.500 0.00106 0.02684 0.02802 0.02815+ 2.000 0.00000 0.02402 0.02531 0.02512+ 3.000 0.00000 0.02137 0.02208 0.02252+ 5.000 0.00000 0.01968 0.01937 0.01985+ worst 0.05105 0.03226 0.03280 0.03332 at 0.275, 0.5, 0.5, 0.5++alpha 0.025, horizon 1000 (bound 0.02648)+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.00940 0.00619 0.00554 0.00531+ 0.150 0.02202 0.01033 0.00986 0.00971+ 0.200 0.02475 0.01239 0.01226 0.01189+ 0.250 0.02499 0.01392 0.01404 0.01399+ 0.275 0.02543 0.01483 0.01473 0.01445+ 0.300 0.02569 0.01460 0.01450 0.01433+ 0.325 0.02540 0.01500 0.01504 0.01479+ 0.350 0.02548 0.01553 0.01564 0.01562+ 0.375 0.02408 0.01530 0.01592 0.01588+ 0.400 0.02452 0.01604 0.01582 0.01602+ 0.425 0.02395 0.01560 0.01590 0.01566+ 0.450 0.02349 0.01536 0.01548 0.01587+ 0.500 0.02255 0.01584 0.01639 0.01659+ 0.550 0.02036 0.01631 0.01599 0.01630+ 0.600 0.01852 0.01564 0.01586 0.01614+ 0.700 0.01425 0.01579 0.01569 0.01655+ 0.800 0.01001 0.01507 0.01529 0.01557+ 1.000 0.00392 0.01543 0.01524 0.01483+ 1.500 0.00018 0.01372 0.01429 0.01381+ 2.000 0.00000 0.01211 0.01267 0.01274+ 3.000 0.00000 0.01063 0.01119 0.01144+ 5.000 0.00000 0.00921 0.00934 0.00918+ worst 0.02569 0.01631 0.01639 0.01659 at 0.3, 0.55, 0.5, 0.5++alpha 0.01, horizon 1000 (bound 0.01094)+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.00216 0.00202 0.00183 0.00167+ 0.150 0.00813 0.00338 0.00342 0.00329+ 0.200 0.00953 0.00453 0.00426 0.00420+ 0.250 0.01031 0.00517 0.00543 0.00556+ 0.275 0.01055 0.00591 0.00563 0.00573+ 0.300 0.01040 0.00558 0.00544 0.00513+ 0.325 0.01074 0.00611 0.00606 0.00596+ 0.350 0.01097* 0.00581 0.00621 0.00620+ 0.375 0.01031 0.00578 0.00585 0.00578+ 0.400 0.01051 0.00607 0.00636 0.00628+ 0.425 0.01069 0.00640 0.00625 0.00630+ 0.450 0.01074 0.00583 0.00599 0.00612+ 0.500 0.01028 0.00638 0.00658 0.00650+ 0.550 0.00986 0.00636 0.00630 0.00646+ 0.600 0.00894 0.00663 0.00643 0.00669+ 0.700 0.00730 0.00653 0.00642 0.00668+ 0.800 0.00504 0.00595 0.00634 0.00643+ 1.000 0.00225 0.00617 0.00622 0.00605+ 1.500 0.00011 0.00566 0.00571 0.00570+ 2.000 0.00000 0.00486 0.00492 0.00503+ 3.000 0.00000 0.00423 0.00456 0.00471+ 5.000 0.00000 0.00359 0.00407 0.00404+ worst 0.01097 0.00663 0.00658 0.00669 at 0.35, 0.6, 0.5, 0.6++alpha 0.005, horizon 1000 (bound 0.00567)+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.00062 0.00094 0.00075 0.00070+ 0.150 0.00363 0.00159 0.00154 0.00151+ 0.200 0.00481 0.00220 0.00207 0.00198+ 0.250 0.00545 0.00268 0.00254 0.00261+ 0.275 0.00518 0.00273 0.00272 0.00275+ 0.300 0.00491 0.00256 0.00257 0.00241+ 0.325 0.00558 0.00311 0.00303 0.00295+ 0.350 0.00526 0.00302 0.00313 0.00305+ 0.375 0.00561 0.00260 0.00249 0.00271+ 0.400 0.00540 0.00302 0.00303 0.00323+ 0.425 0.00575* 0.00321 0.00318 0.00327+ 0.450 0.00576* 0.00292 0.00282 0.00298+ 0.500 0.00561 0.00304 0.00303 0.00328+ 0.550 0.00533 0.00300 0.00310 0.00305+ 0.600 0.00514 0.00340 0.00342 0.00337+ 0.700 0.00430 0.00320 0.00312 0.00333+ 0.800 0.00317 0.00305 0.00311 0.00320+ 1.000 0.00149 0.00295 0.00304 0.00294+ 1.500 0.00007 0.00269 0.00276 0.00283+ 2.000 0.00000 0.00241 0.00245 0.00233+ 3.000 0.00000 0.00218 0.00240 0.00236+ 5.000 0.00000 0.00173 0.00218 0.00204+ worst 0.00576 0.00340 0.00342 0.00337 at 0.45, 0.6, 0.6, 0.6++alpha 0.1, horizon 200 (bound 0.10285)+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.00259 0.00832 0.00542 0.00413+ 0.150 0.02551 0.01900 0.01567 0.01424+ 0.200 0.05997 0.02927 0.02675 0.02563+ 0.250 0.08418 0.03681 0.03550 0.03393+ 0.275 0.09015 0.03922 0.03790 0.03665+ 0.300 0.09182 0.04158 0.04066 0.03951+ 0.325 0.09318 0.04398 0.04320 0.04185+ 0.350 0.09317 0.04696 0.04648 0.04559+ 0.375 0.08941 0.04716 0.04679 0.04634+ 0.400 0.08959 0.05060 0.04927 0.04847+ 0.425 0.08454 0.05006 0.05045 0.04901+ 0.450 0.08160 0.05102 0.05129 0.05059+ 0.500 0.07499 0.05380 0.05430 0.05399+ 0.550 0.06974 0.05489 0.05454 0.05422+ 0.600 0.06234 0.05602 0.05643 0.05680+ 0.700 0.04964 0.05691 0.05756 0.05839+ 0.800 0.03638 0.05693 0.05708 0.05924+ 1.000 0.01734 0.05531 0.05691 0.05766+ 1.500 0.00146 0.05293 0.05397 0.05488+ 2.000 0.00000 0.04876 0.04996 0.05014+ 3.000 0.00000 0.04385 0.04453 0.04358+ 5.000 0.00000 0.04020 0.04048 0.04219+ worst 0.09318 0.05693 0.05756 0.05924 at 0.325, 0.8, 0.7, 0.8++alpha 0.05, horizon 200 (bound 0.05207)+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.00030 0.00289 0.00157 0.00105+ 0.150 0.00617 0.00704 0.00536 0.00476+ 0.200 0.02156 0.01174 0.01034 0.00972+ 0.250 0.03591 0.01596 0.01447 0.01449+ 0.275 0.04138 0.01717 0.01644 0.01568+ 0.300 0.04373 0.01876 0.01795 0.01712+ 0.325 0.04748 0.01945 0.01873 0.01889+ 0.350 0.04892 0.02100 0.02061 0.01989+ 0.375 0.04762 0.02112 0.02100 0.02087+ 0.400 0.04851 0.02261 0.02213 0.02199+ 0.425 0.04703 0.02367 0.02277 0.02282+ 0.450 0.04627 0.02290 0.02296 0.02297+ 0.500 0.04396 0.02471 0.02478 0.02507+ 0.550 0.04086 0.02574 0.02526 0.02552+ 0.600 0.03854 0.02668 0.02673 0.02634+ 0.700 0.03072 0.02732 0.02732 0.02759+ 0.800 0.02340 0.02684 0.02754 0.02796+ 1.000 0.01148 0.02759 0.02865 0.02846+ 1.500 0.00106 0.02629 0.02743 0.02751+ 2.000 0.00000 0.02387 0.02522 0.02498+ 3.000 0.00000 0.02132 0.02205 0.02245+ 5.000 0.00000 0.01967 0.01935 0.01983+ worst 0.04892 0.02759 0.02865 0.02846 at 0.35, 1, 1, 1++alpha 0.025, horizon 200 (bound 0.02648)+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.00001 0.00108 0.00044 0.00032+ 0.150 0.00126 0.00289 0.00200 0.00170+ 0.200 0.00675 0.00483 0.00401 0.00362+ 0.250 0.01448 0.00705 0.00656 0.00620+ 0.275 0.01740 0.00774 0.00730 0.00675+ 0.300 0.02025 0.00802 0.00772 0.00732+ 0.325 0.02185 0.00842 0.00827 0.00782+ 0.350 0.02353 0.00958 0.00913 0.00915+ 0.375 0.02301 0.00973 0.00966 0.00967+ 0.400 0.02374 0.01060 0.01015 0.01010+ 0.425 0.02358 0.01099 0.01073 0.01027+ 0.450 0.02324 0.01072 0.01035 0.01044+ 0.500 0.02247 0.01141 0.01167 0.01185+ 0.550 0.02036 0.01260 0.01212 0.01201+ 0.600 0.01850 0.01265 0.01252 0.01261+ 0.700 0.01425 0.01320 0.01282 0.01354+ 0.800 0.01001 0.01307 0.01322 0.01345+ 1.000 0.00392 0.01400 0.01380 0.01349+ 1.500 0.00018 0.01331 0.01386 0.01338+ 2.000 0.00000 0.01200 0.01255 0.01255+ 3.000 0.00000 0.01055 0.01115 0.01141+ 5.000 0.00000 0.00920 0.00932 0.00917+ worst 0.02374 0.01400 0.01386 0.01354 at 0.4, 1, 1.5, 0.7++alpha 0.01, horizon 200 (bound 0.01094)+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.00000 0.00031 0.00015 0.00005+ 0.150 0.00013 0.00078 0.00057 0.00047+ 0.200 0.00124 0.00155 0.00113 0.00095+ 0.250 0.00442 0.00233 0.00225 0.00233+ 0.275 0.00550 0.00299 0.00254 0.00240+ 0.300 0.00675 0.00305 0.00273 0.00244+ 0.325 0.00823 0.00318 0.00288 0.00274+ 0.350 0.00939 0.00342 0.00357 0.00327+ 0.375 0.00935 0.00338 0.00334 0.00309+ 0.400 0.00980 0.00377 0.00385 0.00371+ 0.425 0.01018 0.00433 0.00396 0.00385+ 0.450 0.01047 0.00379 0.00372 0.00380+ 0.500 0.01022 0.00440 0.00433 0.00429+ 0.550 0.00985 0.00455 0.00435 0.00447+ 0.600 0.00892 0.00513 0.00473 0.00489+ 0.700 0.00730 0.00516 0.00498 0.00511+ 0.800 0.00504 0.00493 0.00528 0.00531+ 1.000 0.00225 0.00540 0.00536 0.00525+ 1.500 0.00011 0.00541 0.00547 0.00552+ 2.000 0.00000 0.00483 0.00484 0.00493+ 3.000 0.00000 0.00419 0.00451 0.00469+ 5.000 0.00000 0.00358 0.00405 0.00404+ worst 0.01047 0.00541 0.00547 0.00552 at 0.45, 1.5, 1.5, 1.5++alpha 0.005, horizon 200 (bound 0.00567)+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.00000 0.00017 0.00005 0.00002+ 0.150 0.00004 0.00030 0.00020 0.00019+ 0.200 0.00039 0.00067 0.00049 0.00040+ 0.250 0.00167 0.00111 0.00094 0.00091+ 0.275 0.00210 0.00135 0.00117 0.00111+ 0.300 0.00273 0.00134 0.00129 0.00109+ 0.325 0.00361 0.00152 0.00144 0.00132+ 0.350 0.00416 0.00168 0.00175 0.00149+ 0.375 0.00482 0.00141 0.00135 0.00141+ 0.400 0.00493 0.00185 0.00187 0.00185+ 0.425 0.00535 0.00206 0.00185 0.00188+ 0.450 0.00551 0.00192 0.00172 0.00180+ 0.500 0.00554 0.00200 0.00199 0.00219+ 0.550 0.00530 0.00204 0.00211 0.00207+ 0.600 0.00513 0.00251 0.00234 0.00248+ 0.700 0.00430 0.00248 0.00229 0.00237+ 0.800 0.00317 0.00234 0.00250 0.00253+ 1.000 0.00149 0.00260 0.00266 0.00254+ 1.500 0.00007 0.00255 0.00263 0.00273+ 2.000 0.00000 0.00239 0.00240 0.00226+ 3.000 0.00000 0.00215 0.00236 0.00233+ 5.000 0.00000 0.00172 0.00217 0.00203+ worst 0.00554 0.00260 0.00266 0.00273 at 0.5, 1, 1, 1.5++H0: time to accept_h0 (mean pairs at stop), 100000 runs per ratio++alpha 0.05, horizon 1000+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 796.6 974.7 991.9 994.1+ 0.150 409.3 915.6 965.9 982.0+ 0.200 235.2 819.8 889.1 926.2+ 0.250 152.4 701.5 761.4 794.3+ 0.275 126.5 636.4 687.1 714.3+ 0.300 107.0 582.0 620.5 641.6+ 0.325 91.6 525.1 556.1 571.3+ 0.350 79.7 475.2 499.9 511.2+ 0.375 69.7 430.0 449.3 459.2+ 0.400 62.1 390.9 406.1 414.2+ 0.425 55.5 355.3 366.9 373.8+ 0.450 50.3 325.0 334.5 340.8+ 0.500 43.1 273.0 280.7 285.7+ 0.550 39.1 230.7 236.6 241.7+ 0.600 36.4 198.4 202.7 207.3+ 0.700 33.5 150.4 154.5 158.4+ 0.800 31.9 119.3 121.9 125.6+ 1.000 30.6 79.4 82.2 85.0+ 1.500 30.0 38.9 41.1 44.3+ 2.000 30.0 24.1 26.2 29.4+ 3.000 30.0 13.5 15.5 18.5+ 5.000 30.0 8.0 9.9 12.9++alpha 0.01, horizon 1000+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 818.8 983.8 998.1 999.3+ 0.150 437.3 935.7 981.3 994.3+ 0.200 256.1 850.9 919.8 954.4+ 0.250 166.2 741.2 805.2 841.0+ 0.275 137.9 678.2 734.7 765.6+ 0.300 116.8 625.1 670.0 693.8+ 0.325 99.8 567.9 604.3 622.7+ 0.350 86.8 517.3 546.6 559.8+ 0.375 76.0 470.5 494.4 505.6+ 0.400 68.3 429.2 447.4 456.6+ 0.425 62.0 392.3 406.9 414.5+ 0.450 57.4 359.3 371.3 378.4+ 0.500 51.7 303.8 313.0 318.9+ 0.550 48.1 258.0 265.0 271.1+ 0.600 45.8 222.8 228.0 232.8+ 0.700 42.9 169.8 174.6 179.0+ 0.800 41.5 135.0 137.9 142.3+ 1.000 40.4 90.1 93.5 96.5+ 1.500 40.0 44.4 46.7 49.9+ 2.000 40.0 27.2 29.3 32.5+ 3.000 40.0 15.0 16.9 19.9+ 5.000 40.0 8.5 10.5 13.4++alpha 0.05, horizon 200+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 200.0 199.6 199.9 199.9+ 0.150 199.7 198.6 199.6 199.7+ 0.200 182.9 196.6 199.0 199.2+ 0.250 137.9 193.5 198.0 198.6+ 0.275 119.0 191.3 197.2 198.3+ 0.300 103.2 188.8 196.1 197.9+ 0.325 89.7 185.9 194.8 197.3+ 0.350 78.7 182.4 192.7 196.4+ 0.375 69.3 178.7 190.4 195.1+ 0.400 61.8 174.8 187.2 193.0+ 0.425 55.4 170.4 183.8 190.5+ 0.450 50.3 165.8 179.5 187.1+ 0.500 43.1 155.8 169.8 178.1+ 0.550 39.1 145.1 158.2 166.4+ 0.600 36.4 134.2 145.8 153.2+ 0.700 33.5 114.3 122.5 128.2+ 0.800 31.9 96.9 102.6 107.3+ 1.000 30.6 70.0 74.0 77.5+ 1.500 30.0 37.1 39.6 42.8+ 2.000 30.0 23.6 25.8 29.0+ 3.000 30.0 13.4 15.4 18.4+ 5.000 30.0 8.0 9.9 12.9++alpha 0.01, horizon 200+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 200.0 199.8 200.0 200.0+ 0.150 200.0 199.3 200.0 200.0+ 0.200 186.5 198.0 199.8 199.9+ 0.250 143.1 195.6 199.4 199.8+ 0.275 124.6 193.8 198.9 199.7+ 0.300 108.8 191.8 198.2 199.6+ 0.325 95.3 189.3 197.3 199.3+ 0.350 84.2 186.3 195.7 198.8+ 0.375 74.6 183.1 194.0 198.0+ 0.400 67.4 179.6 191.4 196.5+ 0.425 61.5 175.8 188.6 194.6+ 0.450 57.2 171.5 185.0 192.1+ 0.500 51.6 162.3 176.5 184.8+ 0.550 48.1 152.4 166.2 174.6+ 0.600 45.7 142.0 154.5 162.3+ 0.700 42.9 122.3 131.5 137.8+ 0.800 41.5 104.7 111.2 116.2+ 1.000 40.4 76.7 81.1 84.8+ 1.500 40.0 41.1 43.8 47.0+ 2.000 40.0 26.2 28.4 31.6+ 3.000 40.0 14.8 16.8 19.8+ 5.000 40.0 8.5 10.4 13.4++H1 (true difference = +effect_size): power (reject_h0, direction right) / wrong-direction rejections / mean pairs at stop, 20000 runs per ratio++alpha 0.05, horizon 1000+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.4459 0.00000 800.4 0.3073 0.00010 876.2 0.3109 0.00000 884.7 0.3104 0.00000 886.3+ 0.150 0.7681 0.00000 450.3 0.7135 0.00020 643.4 0.7236 0.00000 652.1 0.7261 0.00000 653.8+ 0.200 0.8106 0.00005 260.7 0.9328 0.00010 423.1 0.9458 0.00005 431.1 0.9485 0.00005 434.7+ 0.250 0.8152 0.00015 169.1 0.9759 0.00010 277.8 0.9918 0.00005 283.5 0.9954 0.00005 286.9+ 0.300 0.8168 0.00015 118.5 0.9798 0.00005 196.2 0.9964 0.00000 201.2 0.9997 0.00000 204.4+ 0.350 0.8175 0.00010 88.3 0.9810 0.00005 147.4 0.9967 0.00010 151.4 0.9991 0.00005 154.3+ 0.400 0.8297 0.00000 69.0 0.9811 0.00000 113.6 0.9968 0.00000 117.2 0.9993 0.00000 120.2+ 0.450 0.8270 0.00000 56.7 0.9792 0.00010 91.5 0.9954 0.00000 94.6 0.9990 0.00000 97.8+ 0.500 0.8400 0.00000 48.8 0.9816 0.00005 75.7 0.9961 0.00000 78.6 0.9986 0.00000 81.6+ 0.600 0.8777 0.00000 40.0 0.9825 0.00005 55.3 0.9968 0.00000 57.7 0.9988 0.00000 60.6+ 0.700 0.9181 0.00000 35.6 0.9813 0.00000 41.9 0.9971 0.00005 44.3 0.9992 0.00000 47.4+ 0.800 0.9438 0.00000 33.0 0.9838 0.00000 33.4 0.9969 0.00000 35.8 0.9992 0.00005 38.8+ 1.000 0.9772 0.00000 30.9 0.9822 0.00010 23.5 0.9966 0.00005 25.8 0.9992 0.00000 28.8+ 1.500 0.9987 0.00000 30.0 0.9881 0.00000 13.8 0.9974 0.00000 15.8 0.9993 0.00010 18.8+ 2.000 1.0000 0.00000 30.0 0.9911 0.00000 10.3 0.9983 0.00000 12.3 0.9996 0.00000 15.2+ 3.000 1.0000 0.00000 30.0 0.9959 0.00000 7.7 0.9992 0.00000 9.7 0.9999 0.00000 12.6+ 5.000 1.0000 0.00000 30.0 0.9998 0.00000 6.3 0.9999 0.00000 8.2 1.0000 0.00000 11.2++alpha 0.01, horizon 1000+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.1759 0.00000 921.9 0.1295 0.00000 953.6 0.1303 0.00000 960.4 0.1295 0.00000 961.9+ 0.150 0.6367 0.00000 628.3 0.5067 0.00000 795.4 0.5131 0.00000 804.8 0.5151 0.00000 806.7+ 0.200 0.7901 0.00000 388.9 0.8478 0.00000 574.6 0.8591 0.00000 582.8 0.8611 0.00000 585.2+ 0.250 0.8150 0.00000 251.8 0.9675 0.00000 387.6 0.9811 0.00000 393.6 0.9839 0.00000 397.3+ 0.300 0.8184 0.00000 177.1 0.9820 0.00000 273.9 0.9969 0.00000 279.5 0.9991 0.00000 282.3+ 0.350 0.8177 0.00000 130.6 0.9835 0.00000 204.8 0.9977 0.00000 209.1 0.9994 0.00000 212.0+ 0.400 0.8335 0.00000 102.3 0.9830 0.00000 158.0 0.9978 0.00000 161.9 0.9996 0.00000 164.5+ 0.450 0.8424 0.00000 83.3 0.9818 0.00000 126.3 0.9966 0.00000 129.8 0.9992 0.00000 133.0+ 0.500 0.8639 0.00000 71.2 0.9836 0.00000 104.0 0.9969 0.00000 107.0 0.9990 0.00000 109.9+ 0.600 0.9075 0.00000 57.0 0.9845 0.00000 75.2 0.9974 0.00000 77.7 0.9992 0.00000 80.6+ 0.700 0.9429 0.00000 49.0 0.9840 0.00000 56.8 0.9978 0.00000 59.4 0.9993 0.00000 62.4+ 0.800 0.9645 0.00000 44.6 0.9862 0.00000 45.2 0.9978 0.00000 47.5 0.9996 0.00000 50.5+ 1.000 0.9885 0.00000 41.1 0.9841 0.00000 31.3 0.9973 0.00000 33.5 0.9994 0.00000 36.6+ 1.500 0.9998 0.00000 40.0 0.9904 0.00000 17.7 0.9979 0.00000 19.7 0.9996 0.00000 22.7+ 2.000 1.0000 0.00000 40.0 0.9924 0.00000 12.8 0.9988 0.00000 14.8 0.9998 0.00000 17.7+ 3.000 1.0000 0.00000 40.0 0.9966 0.00000 9.2 0.9994 0.00000 11.1 0.9999 0.00000 14.1+ 5.000 1.0000 0.00000 40.0 0.9999 0.00000 7.1 0.9999 0.00000 9.1 1.0000 0.00000 12.1++alpha 0.05, horizon 200+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.0034 0.00000 199.9 0.0153 0.00010 198.9 0.0109 0.00000 199.5 0.0088 0.00000 199.6+ 0.150 0.0922 0.00000 195.9 0.0776 0.00020 194.6 0.0739 0.00000 195.8 0.0704 0.00000 196.2+ 0.200 0.3231 0.00005 176.1 0.2099 0.00010 184.2 0.2074 0.00005 186.1 0.2019 0.00005 187.0+ 0.250 0.5585 0.00015 143.1 0.3833 0.00010 168.6 0.3846 0.00005 171.0 0.3792 0.00005 172.3+ 0.300 0.7119 0.00015 111.4 0.5773 0.00005 148.6 0.5815 0.00000 151.2 0.5760 0.00000 152.9+ 0.350 0.7841 0.00010 86.5 0.7396 0.00005 127.8 0.7462 0.00010 130.9 0.7426 0.00005 133.1+ 0.400 0.8215 0.00000 68.7 0.8644 0.00000 106.9 0.8728 0.00000 109.9 0.8698 0.00000 112.4+ 0.450 0.8244 0.00000 56.6 0.9285 0.00010 89.3 0.9403 0.00000 92.2 0.9401 0.00000 95.2+ 0.500 0.8391 0.00000 48.8 0.9644 0.00005 75.1 0.9766 0.00000 77.9 0.9769 0.00000 80.8+ 0.600 0.8777 0.00000 40.0 0.9811 0.00005 55.2 0.9955 0.00000 57.7 0.9972 0.00000 60.5+ 0.700 0.9181 0.00000 35.6 0.9812 0.00000 41.9 0.9971 0.00005 44.3 0.9991 0.00000 47.4+ 0.800 0.9438 0.00000 33.0 0.9838 0.00000 33.4 0.9969 0.00000 35.8 0.9992 0.00005 38.8+ 1.000 0.9772 0.00000 30.9 0.9822 0.00010 23.5 0.9966 0.00005 25.8 0.9992 0.00000 28.8+ 1.500 0.9987 0.00000 30.0 0.9881 0.00000 13.8 0.9974 0.00000 15.8 0.9993 0.00010 18.8+ 2.000 1.0000 0.00000 30.0 0.9911 0.00000 10.3 0.9983 0.00000 12.3 0.9996 0.00000 15.2+ 3.000 1.0000 0.00000 30.0 0.9959 0.00000 7.7 0.9992 0.00000 9.7 0.9999 0.00000 12.6+ 5.000 1.0000 0.00000 30.0 0.9998 0.00000 6.3 0.9999 0.00000 8.2 1.0000 0.00000 11.2++alpha 0.01, horizon 200+ ratio burn-in nig-k3 nig-k5 nig-k8+ 0.100 0.0000 0.00000 200.0 0.0030 0.00000 199.7 0.0013 0.00000 199.9 0.0008 0.00000 200.0+ 0.150 0.0085 0.00000 199.8 0.0195 0.00000 198.6 0.0175 0.00000 199.2 0.0154 0.00000 199.4+ 0.200 0.0911 0.00000 193.5 0.0748 0.00000 195.0 0.0722 0.00000 196.2 0.0688 0.00000 196.5+ 0.250 0.2905 0.00000 173.2 0.1853 0.00000 186.9 0.1860 0.00000 188.9 0.1802 0.00000 189.7+ 0.300 0.5149 0.00000 146.9 0.3508 0.00000 174.5 0.3491 0.00000 176.6 0.3438 0.00000 177.7+ 0.350 0.6752 0.00000 120.4 0.5369 0.00000 158.2 0.5373 0.00000 160.6 0.5281 0.00000 162.4+ 0.400 0.7737 0.00000 99.0 0.7176 0.00000 138.9 0.7188 0.00000 141.8 0.7115 0.00000 143.6+ 0.450 0.8212 0.00000 82.4 0.8467 0.00000 119.2 0.8527 0.00000 122.2 0.8458 0.00000 124.9+ 0.500 0.8574 0.00000 71.0 0.9252 0.00000 101.7 0.9333 0.00000 104.4 0.9326 0.00000 107.1+ 0.600 0.9070 0.00000 57.0 0.9775 0.00000 75.0 0.9902 0.00000 77.5 0.9911 0.00000 80.4+ 0.700 0.9428 0.00000 49.0 0.9839 0.00000 56.8 0.9977 0.00000 59.4 0.9990 0.00000 62.4+ 0.800 0.9645 0.00000 44.6 0.9862 0.00000 45.2 0.9978 0.00000 47.5 0.9995 0.00000 50.5+ 1.000 0.9885 0.00000 41.1 0.9841 0.00000 31.3 0.9973 0.00000 33.5 0.9994 0.00000 36.6+ 1.500 0.9998 0.00000 40.0 0.9904 0.00000 17.7 0.9979 0.00000 19.7 0.9996 0.00000 22.7+ 2.000 1.0000 0.00000 40.0 0.9924 0.00000 12.8 0.9988 0.00000 14.8 0.9998 0.00000 17.7+ 3.000 1.0000 0.00000 40.0 0.9966 0.00000 9.2 0.9994 0.00000 11.1 0.9999 0.00000 14.1+ 5.000 1.0000 0.00000 40.0 0.9999 0.00000 7.1 0.9999 0.00000 9.1 1.0000 0.00000 12.1diff --git a/benchmarks/results/gate-1265-ab-nig/sweep.log b/benchmarks/results/gate-1265-ab-nig/sweep.lognew file mode 100644index 00000000..e97f82e2--- /dev/null+++ b/benchmarks/results/gate-1265-ab-nig/sweep.log@@ -0,0 +1,72 @@+== h0-part1+self-check: max rel diff 0.0e+00 over 150 points vs _nig_log_bayes_factor; 0 of 64 msprt_step peeks differ+h0 ratio 0.1: 352 s+h0 ratio 0.15: 353 s+h0 ratio 0.2: 361 s+wrote benchmarks/results/gate-1265-ab-nig/h0-part1.json+== h0-part2+self-check: max rel diff 0.0e+00 over 150 points vs _nig_log_bayes_factor; 0 of 64 msprt_step peeks differ+h0 ratio 0.25: 353 s+h0 ratio 0.275: 350 s+h0 ratio 0.3: 361 s+wrote benchmarks/results/gate-1265-ab-nig/h0-part2.json+== h0-part3+self-check: max rel diff 0.0e+00 over 150 points vs _nig_log_bayes_factor; 0 of 64 msprt_step peeks differ+h0 ratio 0.325: 354 s+h0 ratio 0.35: 351 s+h0 ratio 0.375: 362 s+wrote benchmarks/results/gate-1265-ab-nig/h0-part3.json+== h0-part4+self-check: max rel diff 0.0e+00 over 150 points vs _nig_log_bayes_factor; 0 of 64 msprt_step peeks differ+h0 ratio 0.4: 353 s+h0 ratio 0.425: 350 s+h0 ratio 0.45: 360 s+wrote benchmarks/results/gate-1265-ab-nig/h0-part4.json+== h0-part5+self-check: max rel diff 0.0e+00 over 150 points vs _nig_log_bayes_factor; 0 of 64 msprt_step peeks differ+h0 ratio 0.5: 355 s+h0 ratio 0.55: 351 s+h0 ratio 0.6: 360 s+wrote benchmarks/results/gate-1265-ab-nig/h0-part5.json+== h0-part6+self-check: max rel diff 0.0e+00 over 150 points vs _nig_log_bayes_factor; 0 of 64 msprt_step peeks differ+h0 ratio 0.7: 351 s+h0 ratio 0.8: 350 s+h0 ratio 1.0: 362 s+wrote benchmarks/results/gate-1265-ab-nig/h0-part6.json+== h0-part7+self-check: max rel diff 0.0e+00 over 150 points vs _nig_log_bayes_factor; 0 of 64 msprt_step peeks differ+h0 ratio 1.5: 353 s+h0 ratio 2.0: 349 s+wrote benchmarks/results/gate-1265-ab-nig/h0-part7.json+== h0-part8+self-check: max rel diff 0.0e+00 over 150 points vs _nig_log_bayes_factor; 0 of 64 msprt_step peeks differ+h0 ratio 3.0: 351 s+h0 ratio 5.0: 350 s+wrote benchmarks/results/gate-1265-ab-nig/h0-part8.json+== h1-part1+self-check: max rel diff 0.0e+00 over 150 points vs _nig_log_bayes_factor; 0 of 64 msprt_step peeks differ+h1 ratio 0.1: 71 s+h1 ratio 0.15: 74 s+h1 ratio 0.2: 73 s+h1 ratio 0.25: 71 s+h1 ratio 0.3: 71 s+h1 ratio 0.35: 45 s+wrote benchmarks/results/gate-1265-ab-nig/h1-part1.json+== h1-part2+self-check: max rel diff 0.0e+00 over 150 points vs _nig_log_bayes_factor; 0 of 64 msprt_step peeks differ+h1 ratio 0.4: 72 s+h1 ratio 0.45: 73 s+h1 ratio 0.5: 72 s+h1 ratio 0.6: 72 s+h1 ratio 0.7: 72 s+h1 ratio 0.8: 45 s+wrote benchmarks/results/gate-1265-ab-nig/h1-part2.json+== h1-part3+self-check: max rel diff 0.0e+00 over 150 points vs _nig_log_bayes_factor; 0 of 64 msprt_step peeks differ+h1 ratio 1.0: 45 s+h1 ratio 1.5: 36 s+h1 ratio 2.0: 33 s+h1 ratio 3.0: 36 s+h1 ratio 5.0: 34 s+wrote benchmarks/results/gate-1265-ab-nig/h1-part3.jsondiff --git a/changelog.d/0.75.1/1419.changed.md b/changelog.d/0.75.1/1419.changed.mdnew file mode 100644index 00000000..59b3c812--- /dev/null+++ b/changelog.d/0.75.1/1419.changed.md@@ -0,0 +1 @@+- **`soup ab` now decides with a variance-robust statistic, with no burn-in, and `accept_h0` can take longer to reach when there is no difference (#1265 by @abdulwaarith0 in #1419).** The two-sided mSPRT from #1227 estimated the variance from the rows, so it needed a burn-in of 30 or 40 rows per arm, was calibrated only up to 1000 rows and down to `--alpha 0.01`, and still sat near 0.011 at 0.01. The normal-inverse-gamma Bayes factor that replaces it depends on the rows only through the t statistic, so its false-positive rate stays at most `--alpha` however often you re-run it, from 7 rows per arm and at any number of rows: the worst simulated rate is 0.033 at `--alpha 0.05` and 0.0066 at 0.01. The first 5 rows per arm set the scale for `--effect-size` and show in the table as `prior_scale`; the burn-in table, the 1000-row limit and both calibration warnings are gone. This is not a pure speed-up. When the arms are the same, `accept_h0` takes several times as many rows as before (about 281 pairs against 43 at an `--effect-size` of 0.5 standard deviations), and at small effect sizes it may not arrive within 1000; `docs/evaluation.md` has the full table, and a faster accept rule is #1418. Part of the old speed was wrong answers: under a real difference of 0.3 standard deviations, the old test ended about 18% of runs in `accept_h0`, against under 0.4% now on simulated Gaussian rows. When the first rows barely vary (a warm cache, or a judge that gives 1.0 early), `accept_h0` waits as `continue` while the tested rows spread more than 3 times as much as the held-out ones, since that start made nearly every run accept H0 with or without a difference; a `reject_h0` is never held back, so the false-positive bound is unchanged. The `--alpha` + `--beta` < 1 check from #1339 stays, with its reason restated for the new accept boundary, and the #1339 and #1384 refusals of values a float cannot carry cover the new statistic too: it is never compared with the boundaries unless it is finite.diff --git a/docs/commands.md b/docs/commands.mdindex 4602819d..c1ee912c 100644--- a/docs/commands.md+++ b/docs/commands.md@@ -303,7 +303,7 @@ soup ingest --source langfuse --pull [--since 7d --max-pages 100 --allow-privatesoup prune-prompt --input <jsonl> --output <jsonl> --min-frequency 0.95 Detect + strip shared system-prompt prefixsoup prune-prompt ... --tokenizer <id-or-path> Tokenizer-aware prefix detection (decodes remaining ids, boundary-safe)soup data active-sample --input <jsonl> --output <jsonl> --budget N Top-N uncertain prod traces for human review-soup ab --input <jsonl> --metric latency|judge_score|retry_rate Two-sided mSPRT sequential A/B (decision: continue / reject_h0 / accept_h0; a reject_h0 reports direction better / worse; continue until 30 rows per arm, 40 when --alpha < 0.05)+soup ab --input <jsonl> --metric latency|judge_score|retry_rate Two-sided mSPRT sequential A/B (decision: continue / reject_h0 / accept_h0; a reject_h0 reports direction better / worse; valid when re-run after every new row; the first 5 rows per arm set the --effect-size scale)soup ingest|prune-prompt|ab|data active-sample ... --slack-url <https> | --discord-url <https> Shared SSRF-validated webhook on completionsoup drift-alarm --reference <jsonl> --live <jsonl> --threshold 0.2 Rolling-KL drift alarm (exit 3 on drift)soup drift-alarm ... --slack-url <https> | --discord-url <https> Optional SSRF-validated webhook on drift detecteddiff --git a/docs/evaluation.md b/docs/evaluation.mdindex c7db1e8d..e35d630b 100644--- a/docs/evaluation.md+++ b/docs/evaluation.md@@ -263,24 +263,20 @@ Baselines may be a registry reference (`registry://<name-or-id>`), a file path,## Sequential A/B Harness (`soup ab`)-Proper sequential testing with early-stop guarantees on `latency` / `judge_score` / `retry_rate`. The test is two-sided: the statistic averages Wald's likelihood ratios for a treatment-minus-control difference of `+effect-size` and of `-effect-size` (a symmetric two-point mixture). Under H0 each ratio has expectation 1 at every step, and so does their average. With a known variance, a simulation of peeking after every new pair keeps the false-positive rate below `--alpha`, unlike a naive repeated t-test, which inflates it.+Proper sequential testing with early-stop guarantees on `latency` / `judge_score` / `retry_rate`. You can re-run `soup ab` after every new row and stop at the first `reject_h0` or `accept_h0`: the chance of a false `reject_h0` stays at most `--alpha` however often you look and however many rows you collect, unlike a naive repeated t-test, which inflates it. The guarantee assumes roughly Gaussian rows: for a 0/1 metric such as a per-request `retry_rate`, pre-aggregate it into per-prompt rates first.-`soup ab` estimates the variance from the rows, and from a handful of rows that estimate is too noisy. Without a burn-in, re-running after every new pair, the two-sided test would reject a true H0 up to 16% of the time at `--alpha 0.05` (the one-sided test it replaces: 11%) when `--effect-size` is close to the metric's row-to-row standard deviation. So `soup ab` gives no verdict, only `continue`, until each arm has enough rows. That burn-in depends on `--alpha`, and the verdict table shows the value in use:+The statistic is a Bayes factor that averages over both the size of the difference and the unknown row-to-row spread (a normal-inverse-gamma mixture). It depends on the rows only through the two-sample t statistic, so its false-positive guarantee does not rely on estimating the spread well, and there is no burn-in: a clear difference can be decided from 7 rows per arm. The test is two-sided, and a difference of either sign is equal evidence. It rejects H0 once the Bayes factor reaches `1 / --alpha`, and accepts H0 once it falls to `--beta / (1 - --alpha)`.-| `--alpha` | rows per arm before a verdict | worst simulated false-positive rate, up to 1000 rows per arm |-|---|---|---|-| 0.05 and above | 30 | 0.051 at `--alpha 0.05` |-| from 0.01 to below 0.05 | 40 | 0.011 at `--alpha 0.01` |-| below 0.01 | 40, **not calibrated** | 0.0058 at `--alpha 0.005` |+`--effect-size` is in the metric's units, but the statistic needs it in standard deviations. So the first 5 rows of each arm set that scale (their pooled standard deviation) and are not otherwise tested; the verdict table shows this as `prior_scale`, and the reported means and row counts still cover every row. If an arm's first rows are all identical, more rows are held out until one differs. If they barely vary (a warm cache, or a judge that gives 1.0 early), `accept_h0` waits as `continue` while the tested rows' standard deviation is more than 3 times theirs: that start makes the prior far too wide, and an `accept_h0` would come out whether or not there is a difference. A `reject_h0` is never held back.-The values come from a simulation of that re-run-after-every-pair procedure: beta 0.20, `--effect-size` from 0.1 to 5 standard deviations, and runs followed up to 1000 rows per arm (200 checked too). Each value is the smallest that keeps the false-positive rate within Monte-Carlo error of `--alpha` at every effect size, at every alpha the simulation checked in its range (0.05 and 0.10; 0.01 and 0.025). The record, script and results are in [`benchmarks/gate-1227-ab-burn-in.md`](../benchmarks/gate-1227-ab-burn-in.md).+A simulation of the re-run-after-every-pair procedure (`--effect-size` from 0.1 to 5 standard deviations, 100,000 runs each, up to 1000 rows per arm) gives a worst false-positive rate of 0.033 at `--alpha 0.05` and 0.0066 at `--alpha 0.01`. The burn-in design this replaced (#1227) sat at 0.051 and 0.011. Against a true difference of exactly `--effect-size`, the test finds it with probability above 0.99 when `--effect-size` is at least 0.3 standard deviations (1000 rows per arm). There are two costs. When `--effect-size` is below about 0.2 standard deviations, 1000 rows are too few for either design to be reliable, and this one detects less often (0.31 against 0.45 at 0.1 standard deviations, `--alpha 0.05`). And when there is no difference, reaching `accept_h0` takes longer. Mean pairs at stop when the two arms are the same, `--alpha 0.05`, runs of up to 1000 rows per arm, by `--effect-size` in standard deviations:-The calibration has two limits, and `soup ab` prints a warning past either:+| `--effect-size` / sd | 0.2 | 0.3 | 0.4 | 0.5 | 0.7 | 1 | 1.5 | 2 | 5 |+|---|---|---|---|---|---|---|---|---|---|+| this statistic | 889 | 621 | 406 | 281 | 155 | 82 | 41 | 26 | 10 |+| the burn-in design it replaced | 235 | 107 | 62 | 43 | 34 | 31 | 30 | 30 | 30 |-- **Below `--alpha 0.01` it is not calibrated.** At `--alpha 0.005`, 40 rows leave a simulated rate slightly above the level asked for.-- **It holds up to 1000 rows per arm.** Past that, a test that keeps being re-run has not been measured.--**At `--alpha 0.01` itself the rate sits slightly above the level asked for**, near 0.011 across seeds, because the variance is estimated from the rows; more rows do not lower it, and `soup ab` prints no warning for it. A variance-robust statistic, which would remove that floor and need no burn-in, is tracked in [#1265](https://github.com/MakazhanAlpamys/Soup/issues/1265).+So a test that is waiting to hear "no difference" can take several times as many rows as before, and at small effect sizes may not get there within 1000. Part of the old design's speed was not free: when there was a real difference of 0.3 standard deviations, it wrongly ended about 18% of runs in `accept_h0`, against under 0.4% here (on simulated Gaussian rows). The record, script and results are in [`benchmarks/gate-1265-ab-nig.md`](../benchmarks/gate-1265-ab-nig.md).```bashsoup ab --input ab.jsonl --metric latency --effect-size 0.5@@ -288,15 +284,15 @@ soup ab --input ab.jsonl --metric latency --effect-size 0.5soup ab --input ab.jsonl --metric judge_score --alpha 0.01 --beta 0.10 --effect-size 0.1```-`--alpha` and `--beta` are each in (0, 1), and their sum must stay below 1. At or above 1 the reject boundary `log((1 - beta) / alpha)` is no longer above the accept boundary `log(beta / (1 - alpha))`, so there is no `continue` band left and any verdict between them rejects — two identical arms included. `soup ab` exits `2` naming both values. `--beta` is the Type-II error rate, not the power: a power of 0.95 is `--beta 0.05`, not `--beta 0.95`.+`--alpha` and `--beta` are each in (0, 1), and their sum must stay below 1. At or above 1 the accept boundary `beta / (1 - alpha)` is a Bayes factor of 1 or more, so the test accepts H0 when the rows show no evidence either way, and even when they point to a difference: at `--alpha 0.05 --beta 0.95`, a true difference of `--effect-size` ends in `accept_h0` in 96% of simulated runs at 0.3 standard deviations, and still 36% at 2. `soup ab` exits `2` naming both values. `--beta` is the Type-II error rate, not the power: a power of 0.95 is `--beta 0.05`, not `--beta 0.95`.-A `--effect-size` that is more than about 1.3e154 pooled standard errors overflows the test statistic; `soup ab` exits `1` naming the flag and the standard error it measured. Because it is the ratio that overflows, a near-constant metric column reaches it at the default `--effect-size` too.+A `--effect-size` that is more than about 1.9e151 standard deviations of the rows that set the prior scale overflows the test statistic at the largest input `soup ab` accepts (1,000,000 rows per arm), so it is refused at every row count; `soup ab` exits `1` naming the flag and the standard deviation it measured, from the first run (before those rows are all in, it checks the rows so far). Because it is the ratio that overflows, a near-constant metric column reaches it at the default `--effect-size` too.Input rows look like `{"arm": "control", "latency": 1.23}` or `{"arm": "treatment", "judge_score": 0.91}`. Decision is one of `continue` (keep collecting samples), `reject_h0` (real difference detected, in either direction), `accept_h0` (no significant difference). A `reject_h0` also reports a `direction`, `better` or `worse`, read through the metric's polarity: `judge_score` is higher-is-better, `latency` and `retry_rate` are lower-is-better. Composes with `soup loop canary` (v0.58): the panel recommends promoting a `better` treatment and a rollback only for a `worse` one.`soup ab` exits `0` on every decision, including a `worse` one; to gate a pipeline on a regression, read `direction` from the output or the webhook payload.-`soup ab` exits `1`, naming the metric column, when its values are outside what a float can carry: so close together that the standard error of the difference underflows to 0 (a column of `0` and `1e-161`), so far apart that their variance overflows (a column of `0` and `1e200`), or so large that an arm's sum overflows (an arm of `1e308` values). Rescale the metric and re-run.+`soup ab` exits `1`, naming the metric column, when its values are outside what a float can carry: rows that set the prior scale so close together that their variance underflows to 0, or is below the smallest normal float at the default `--effect-size` (a column of `0` and `1e-161`), values so far apart that their variance overflows (a column of `0` and `1e200`), values so large that an arm's sum overflows (an arm of `1e308` values), or tested rows whose t statistic overflows (a near-constant tested arm, or arm means about `1e154` apart). The message says how to rescale the metric where rescaling helps; a near-constant arm needs its column checked instead.`soup ab` accepts `--slack-url` / `--discord-url` (v0.71.5) and pings the webhook **only when the test actually decides** (`reject_h0` / `accept_h0`) — a still-running `continue` stays quiet so you're not paged on every peek. The payload carries `decision` and `direction` (`null` on `accept_h0`). Same SSRF-hardened validator as `soup drift-alarm`.diff --git a/src/soup_cli/cli.py b/src/soup_cli/cli.pyindex e9c18a35..bed388c3 100644--- a/src/soup_cli/cli.py+++ b/src/soup_cli/cli.py@@ -356,8 +356,8 @@ app.command(name="ab",help=("Two-sided mSPRT sequential A/B harness on latency / judge_score / retry_rate: "- "reports whether the treatment is better or worse, after an alpha-dependent "- "burn-in (v0.63.0)."+ "reports whether the treatment is better or worse, valid under re-running after "+ "every new row (v0.63.0)."),)(_ab_cmd.ab)diff --git a/src/soup_cli/commands/ab.py b/src/soup_cli/commands/ab.pyindex 757dcede..1f99e13c 100644--- a/src/soup_cli/commands/ab.py+++ b/src/soup_cli/commands/ab.py@@ -12,11 +12,9 @@ from rich.table import Tablefrom soup_cli.commands._webhook_cli import emit_webhooks, validate_webhook_flagsfrom soup_cli.utils.ab_test import (- CALIBRATED_HORIZON_ROWS,HIGHER_IS_BETTER,+ PRIOR_SCALE_ROWS,MsprtConfig,- burn_in_is_calibrated,- min_rows_per_arm,run_msprt,validate_metric_name,)@@ -35,9 +33,8 @@ def ab(alpha: float = typer.Option(0.05, "--alpha",help=(- "Type-I error (false positive) rate (0, 1) of the two-sided test. Also sets "- "the burn-in: no verdict before 30 rows per arm at 0.05 and above, 40 below "- "(not calibrated below 0.01)."+ "Type-I error (false positive) rate (0, 1) of the two-sided test, kept for a "+ "test re-run after every new row, at any number of rows."),),beta: float = typer.Option(@@ -45,7 +42,7 @@ def ab(help=("Type-II error (false negative) rate (0, 1). Not the power: a power ""of 0.95 is --beta 0.05. alpha + beta must stay below 1, or the "- "reject and accept boundaries cross and every verdict rejects."+ "test accepts H0 on no evidence either way."),),effect_size: float = typer.Option(@@ -95,32 +92,6 @@ def ab(console.print(f"[red]{escape(str(exc))}[/]")raise typer.Exit(1) from exc- # The burn-in depends on alpha, and its calibration stops below alpha 0.01- # and past CALIBRATED_HORIZON_ROWS rows per arm (#1227): say so before the- # verdict, and show the rows actually required.- rows_needed = min_rows_per_arm(cfg.alpha)- if not burn_in_is_calibrated(cfg.alpha):- console.print(- Panel(- f"[yellow]Warning: Type-I control under peeking is not calibrated below "- f"alpha 0.01. At --alpha {cfg.alpha:g} the burn-in is {rows_needed} rows "- "per arm, the value calibrated for alpha 0.01, and a test re-run after "- "every new row may reject a true H0 more often than --alpha.[/]",- border_style="yellow",- )- )- largest_arm = max(verdict.n_control, verdict.n_treatment)- if largest_arm > CALIBRATED_HORIZON_ROWS:- console.print(- Panel(- f"[yellow]Warning: Type-I control under peeking is calibrated up to "- f"{CALIBRATED_HORIZON_ROWS} rows per arm. This input has {largest_arm} rows "- "in an arm; a test re-run after every new row past that point may reject "- "a true H0 more often than --alpha.[/]",- border_style="yellow",- )- )-# The test is two-sided (#1227): a reject_h0 carries the direction, read# through the metric's polarity, and only a worse treatment is a rollback.worse = verdict.direction == "worse"@@ -136,7 +107,7 @@ def ab(table.add_column("Value")table.add_row("decision", f"[bold]{verdict.decision}[/]")table.add_row("direction", verdict.direction or "n/a")- table.add_row("burn_in", f"{rows_needed} rows per arm (alpha {cfg.alpha:g})")+ table.add_row("prior_scale", f"first {PRIOR_SCALE_ROWS} rows per arm")table.add_row("log_likelihood_ratio", f"{verdict.log_likelihood_ratio:.4f}")table.add_row("n_control", str(verdict.n_control))table.add_row("n_treatment", str(verdict.n_treatment))@@ -170,14 +141,13 @@ def ab(border_style="yellow",))- elif min(verdict.n_control, verdict.n_treatment) < rows_needed:+ elif min(verdict.n_control, verdict.n_treatment) < PRIOR_SCALE_ROWS + 2:console.print(Panel(- f"[cyan]Burn-in: no verdict before {rows_needed} rows per arm at alpha "- f"{cfg.alpha:g} (control has {verdict.n_control}, treatment "- f"{verdict.n_treatment}); with fewer rows the variance estimate is too "- "noisy for the test's false-positive guarantee. Collect more samples "- "and re-run.[/]",+ f"[cyan]Not enough rows yet: the first {PRIOR_SCALE_ROWS} rows of each arm "+ "set the scale of --effect-size, and the test needs 2 more per arm after "+ f"them (control has {verdict.n_control}, treatment {verdict.n_treatment}). "+ "Collect more samples and re-run.[/]",border_style="cyan",))diff --git a/src/soup_cli/utils/ab_test.py b/src/soup_cli/utils/ab_test.pyindex 5753fd0a..50677220 100644--- a/src/soup_cli/utils/ab_test.py+++ b/src/soup_cli/utils/ab_test.py@@ -11,29 +11,30 @@ Why mSPRT and not a t-test:errors *for any stopping time*. You can monitor live and stop as soon asthe log-likelihood ratio crosses either decision boundary.-The test is two-sided (#1227). The statistic is a symmetric two-point-mixture: the average of Wald's likelihood ratios for a treatment-minus-control-difference of `+effect_size` and of `-effect_size`, averaged as ratios (in log-space, via logsumexp), never as log-ratios and never via `|z|`. Averaging keeps-what each ratio has: E[LR_n] = 1 under H0 at every n. The boundaries are-`log(beta/(1-alpha))` (accept H0) and `log((1-beta)/alpha)` (reject H0); with a-known variance the simulated Type-I rate of this test under peeking stays below-alpha (benchmarks/gate-1227-ab-burn-in.md). A `reject_h0` reports its direction,-`better` or `worse`, from the metric's polarity in `HIGHER_IS_BETTER`.--Three known limitations:+The test is two-sided (#1227). Since #1265 the statistic is a Bayes factor+that mixes over the variance as well as the mean: the normal-inverse-gamma+mixture in its right-Haar limit (a flat prior on the common mean, 1/sigma on+the standard deviation) with a N(0, g) prior on the standardised difference+delta / sigma. It depends on the rows only through the two-sample t statistic,+so it is scale-invariant, and under H0 it is a test martingale whatever sigma+is. Ville's inequality then bounds the chance that it EVER reaches 1/alpha by+alpha, from the first rows on and at any horizon, with no burn-in.++`effect_size` is in the metric's units, but the prior needs it in standard+deviations. So the first `PRIOR_SCALE_ROWS` rows of each arm are held out:+their pooled standard deviation s0 sets g = (effect_size / s0) ** 2, and the+Bayes factor runs on the rows after them. The prior is fixed before those rows+are seen, which is what keeps the guarantee exact. The boundaries are+`log(1/alpha)` (reject H0) and `log(beta/(1-alpha))` (accept H0). A+`reject_h0` reports its direction, `better` or `worse`, from the metric's+polarity in `HIGHER_IS_BETTER`. Record: benchmarks/gate-1265-ab-nig.md.++Two known limitations:1. Single metric per pass — multi-metric correction (Bonferroni / Holm)is operator-controlled. The CLI accepts one metric at a time.2. Assumes Gaussian-like data. For binary metrics (e.g. retry_rate asa boolean), the operator should pre-aggregate per-prompt rates so theresulting per-prompt averages are approximately Gaussian.-3. The variance is estimated from the rows, not known, and from a handful of- rows the estimate is too noisy. So no verdict is given (`continue`) until- each arm has `min_rows_per_arm(alpha)` rows; `BURN_IN_ROWS_BY_ALPHA` says- how those were chosen and what Type-I rate remains. The calibration holds- up to `CALIBRATED_HORIZON_ROWS` rows per arm and for alpha >= 0.01- (`burn_in_is_calibrated`). A variance-robust statistic that would need no- burn-in is #1265."""from __future__ import annotations@@ -56,46 +57,33 @@ SUPPORTED_METRICS: frozenset[str] = frozenset(HIGHER_IS_BETTER: Mapping[str, bool] = MappingProxyType({"judge_score": True, "latency": False, "retry_rate": False})-# Burn-in (#1227): rows per arm required before any verdict, by the Type-I level-# alpha. While either arm has fewer, the verdict is `continue` whatever the-# log-likelihood ratio says. The pooled variance is estimated from the rows, and-# from a handful of them it can come out far too small, so without a burn-in an-# operator who re-runs after every new pair would reject a true H0 up to 0.164-# of the time at alpha 0.05. Calibrated by a Monte-Carlo sweep of that peeking-# procedure: H0, a look after every pair, the first verdict stops the run,-# beta 0.20, 22 values of effect_size / sigma from 0.1 to 5, 100,000 runs per-# ratio, and a horizon of 1000 rows per arm (200 checked too). Each value is the-# smallest candidate in {20, 30, 40, 50, 60} whose Type-I rate stays within-# alpha + 3 binomial standard errors at every ratio, at both horizons, at every-# alpha measured in its range.-# alpha >= 0.05 -> 30 rows. Alpha 0.05: worst 0.0512 at ratio 0.35-# (bound 0.0521); 20 rows reach 0.0534. Alpha 0.10:-# worst 0.0994 (bound 0.1029).-# 0.01 <= alpha < 0.05 -> 40 rows. Alpha 0.01: worst 0.01088 at ratio 0.4-# (bound 0.01094) in this sweep, but up to 0.0116 on-# other seeds: a floor near 0.0108 set by the-# estimated variance, which 50/60 rows do not lower-# (#1265); 30 rows reach 0.0114. Alpha 0.025:-# worst 0.0261 (bound 0.0265); 30 rows reach 0.0269.-# alpha < 0.01 -> 40 rows, NOT calibrated: at alpha 0.005 the worst is-# 0.0058, above its bound 0.0057. `soup ab` warns.-# With the true variance the same sweep stays below alpha (worst 0.0468 at 0.05,-# 0.0095 at 0.01). Record: benchmarks/gate-1227-ab-burn-in.md; script:-# benchmarks/harness/ab_burn_in_sweep.py; results and log:-# benchmarks/results/gate-1227-ab-burn-in/. Changing a value means re-running it.-BURN_IN_ROWS_BY_ALPHA: tuple[tuple[float, int], ...] = ((0.05, 30), (0.01, 40))-_BURN_IN_ROWS_UNCALIBRATED = 40-# The sweep followed runs up to this many rows per arm; past it the Type-I-# figures above are not established, and `soup ab` says so.-CALIBRATED_HORIZON_ROWS = 1000--# #1339 - the largest standardised effect whose square is still a float. The-# drift term in _verdict_from_summary squares mu_h1, and ** raises-# OverflowError where * would have returned inf, so the bound is checked-# rather than the result.+# Rows per arm held out to put `effect_size` in standard deviations (#1265).+# Their pooled standard deviation sets the prior scale, and the Bayes factor+# runs on the rows after them. While both arms are still constant, more rows are+# held out until one varies. This is not a Type-I burn-in: the guarantee holds+# for any value. It trades power at small effect_size / sigma (fewer rows left)+# against power at large ones (a less noisy prior scale). Chosen by the sweep in+# benchmarks/gate-1265-ab-nig.md; changing it means re-running that sweep.+PRIOR_SCALE_ROWS = 5+# accept_h0 is held at continue while the tested rows' pooled standard deviation+# is more than this many times the held-out rows' (#1265 review). With a+# saturated start the prior scale is far too small and nearly every run accepted+# H0, with or without a real difference; on Gaussian rows the two spreads agree+# and no verdict changes. Only accepts are held back, so Type-I is untouched.+ACCEPT_HOLD_SPREAD_RATIO = 3.0++# #1339 - the largest standardised effect whose square is still a float.MAX_STANDARDISED_EFFECT = math.sqrt(sys.float_info.max)_MAX_METRIC_NAME_LEN = 32_MAX_SAMPLES_PER_ARM = 1_000_000+# The prior variance enters the statistic as 1 + n_eff * effect**2, and n_eff+# grows with every row. So effect_size / s0 is checked against the largest n_eff+# the tool accepts (half of _MAX_SAMPLES_PER_ARM), not the row count so far:+# otherwise the same held-out rows would give a silent -inf accept_h0 at a few+# rows and be refused only later, and an operator who stops at the first+# verdict would never see the refusal. About 1.9e151. Any statistic that is+# still non-finite is refused in msprt_step before the boundaries are compared.+_MAX_PRIOR_EFFECT = math.sqrt(sys.float_info.max / (_MAX_SAMPLES_PER_ARM / 2))_VALID_DECISIONS: frozenset[str] = frozenset({"continue", "reject_h0", "accept_h0"})@@ -138,24 +126,6 @@ def _require_unit_open(value: object, *, field: str) -> float:return f_val-def min_rows_per_arm(alpha: float) -> int:- """Rows each arm needs before `soup ab` gives any verdict at Type-I level ``alpha``.-- From ``BURN_IN_ROWS_BY_ALPHA``: 30 at alpha >= 0.05, 40 below. Below alpha- 0.01 the value is 40 but not calibrated; see :func:`burn_in_is_calibrated`.- """- value = _require_unit_open(alpha, field="alpha")- for lowest_alpha, rows in BURN_IN_ROWS_BY_ALPHA:- if value >= lowest_alpha:- return rows- return _BURN_IN_ROWS_UNCALIBRATED---def burn_in_is_calibrated(alpha: float) -> bool:- """False below alpha 0.01, where Type-I control under peeking was not calibrated."""- return _require_unit_open(alpha, field="alpha") >= BURN_IN_ROWS_BY_ALPHA[-1][0]--def _require_positive_finite(value: object, *, field: str) -> float:if isinstance(value, bool):raise TypeError(f"{field} must be a number, not bool")@@ -184,22 +154,22 @@ class MsprtConfig:object.__setattr__(self, "metric", validate_metric_name(self.metric))object.__setattr__(self, "alpha", _require_unit_open(self.alpha, field="alpha"))object.__setattr__(self, "beta", _require_unit_open(self.beta, field="beta"))- # #1339 - each rate is in (0, 1) on its own, but the reject boundary- # log((1 - beta) / alpha) stays above the accept boundary- # log(beta / (1 - alpha)) only while alpha + beta < 1. At or past 1- # there is no continue band, and because reject is tested first every- # verdict in the gap rejects: alpha 0.6 / beta 0.5 rejects on two- # identical arms, and alpha 0.05 / beta 0.95 (a power typed as beta)- # rejects a true H0 in a quarter of single looks.+ # #1339 - each rate is in (0, 1) on its own, but the accept boundary+ # log(beta / (1 - alpha)) is below 0, a Bayes factor of 1, only while+ # alpha + beta < 1. At or past 1 it accepts H0 on no evidence either+ # way, and on evidence for a difference: with alpha 0.05 / beta 0.95+ # (a power typed as beta) a true difference of effect_size ends in+ # accept_h0 in 0.96 of runs at 0.3 standard deviations and still 0.36+ # at 2 (1000-2000 runs each, a look after every pair). Under #1227's+ # statistic the same pairs crossed the boundaries instead, and rejected.if self.alpha + self.beta >= 1.0:raise ValueError(f"alpha + beta must be < 1.0, got alpha={self.alpha} + "f"beta={self.beta} = {self.alpha + self.beta}. At or above 1.0 "- "the reject boundary log((1 - beta) / alpha) is no longer above "- "the accept boundary log(beta / (1 - alpha)), so there is no "- "continue band left and any verdict between them rejects. "- "beta is the Type-II error rate, not the power: a power of "- "0.95 is beta 0.05."+ "the accept boundary log(beta / (1 - alpha)) is at or above 0, "+ "so the test accepts H0 when the rows show no evidence either "+ "way, or even evidence of a difference. beta is the Type-II "+ "error rate, not the power: a power of 0.95 is beta 0.05.")object.__setattr__(self,@@ -269,117 +239,176 @@ def _validate_sample_list(samples: object, *, arm: str) -> list[float]:return out-def _log_mean_exp(first: float, second: float) -> float:- """``log((exp(first) + exp(second)) / 2)`` without overflow (two-term logsumexp)."""- top = max(first, second)- return top + math.log1p(math.exp(-abs(first - second))) - math.log(2.0)--def _direction(metric: str, diff: float) -> str:"""``better`` / ``worse`` for a treatment-minus-control difference, by polarity."""treatment_higher = diff > 0.0return "better" if treatment_higher == HIGHER_IS_BETTER[metric] else "worse"-def _verdict_from_summary(- config: MsprtConfig,+def _nig_log_bayes_factor(*,n_control: int,n_treatment: int,- mean_control: float,- mean_treatment: float,+ mean_difference: float,pooled_variance: float,-) -> MsprtVerdict:- """Decide from per-arm summaries (``n >= 2`` per arm, ``pooled_variance > 0``).+ prior_variance: float,+) -> float:+ """Log Bayes factor of the normal-inverse-gamma mixture (right-Haar limit).++ H1: the treatment-minus-control difference is delta = d * sigma with+ d ~ N(0, ``prior_variance``); H0: delta = 0. Both share a flat prior on the+ common mean and 1/sigma on sigma, which integrate out in closed form+ (Gönen, Johnson, Lu and Westfall, 2005). With the pooled two-sample t+ statistic, nu = n_c + n_t - 2 and n_eff = n_c * n_t / (n_c + n_t):++ log BF = -0.5 * log(1 + n_eff * g)+ - (nu + 1) / 2 * [log1p(t**2 / (nu * (1 + n_eff * g)))+ - log1p(t**2 / nu)]++ It depends on the rows only through t, so under H0 its distribution does+ not depend on sigma, and as a ratio of two marginal likelihoods it is a+ martingale under H0 in the order the rows arrive. Ville's inequality then+ gives P(sup_n BF_n >= 1/alpha) <= alpha. Needs ``n >= 2`` per arm and+ ``pooled_variance > 0``; split out so the sweep in+ benchmarks/harness/ab_nig_sweep.py can check its vectorised copy+ against exactly this code.+ """+ nu = n_control + n_treatment - 2+ n_eff = (n_control * n_treatment) / (n_control + n_treatment)+ # Squared with * so an overflow is inf, which msprt_step refuses, not a bare+ # OverflowError (** raises).+ t_squared = mean_difference * mean_difference * n_eff / pooled_variance+ spread = 1.0 + n_eff * prior_variance+ return -0.5 * math.log(spread) - 0.5 * (nu + 1) * (+ math.log1p(t_squared / (nu * spread)) - math.log1p(t_squared / nu)+ )- The decision half of :func:`msprt_step`, split out so a peeking simulation- can drive exactly this code from running sums instead of re-reading every- row at every peek. Below ``min_rows_per_arm(config.alpha)`` rows in either- arm the log-likelihood ratio is still reported, but the decision is- ``continue``.++def _held_out_rows(control: Sequence[float], treatment: Sequence[float]) -> int | None:+ """Rows per arm that set the prior scale, or ``None`` if there are not enough yet.++ ``PRIOR_SCALE_ROWS``, or more while the held-out rows of both arms are still+ constant (their pooled standard deviation would be 0). The count depends+ only on the held-out rows themselves, so the rows after them are still+ untouched by the prior, and the guarantee is unchanged."""- pooled_se = math.sqrt(pooled_variance * (1.0 / n_control + 1.0 / n_treatment))- # #1384 - a positive but subnormal pooled variance can still underflow to- # 0.0 once scaled by 1/n (values 0 and 1e-161 at 40 rows per arm), and the- # z below then divides by zero. The square root of the smallest positive- # float is about 2.2e-162, so an underflow shows here as exactly 0.0.- if pooled_se == 0.0:+ def first_change(values: Sequence[float]) -> int:+ return next((i for i, x in enumerate(values) if x != values[0]), len(values))++ shortest = min(len(control), len(treatment))+ held = max(PRIOR_SCALE_ROWS, min(first_change(control), first_change(treatment)) + 1)+ return held if held <= shortest else None+++def _require_finite_means(+ metric: str,+ control: Sequence[float],+ treatment: Sequence[float],+ mean_c: float,+ mean_t: float,+) -> None:+ """#1384 - refuse an arm whose values sum past the largest float.++ Its mean is infinite however little the values spread, so the message names+ their size, not their spread.+ """+ if math.isfinite(mean_c) and math.isfinite(mean_t):+ return+ values = [*control, *treatment]+ raise ValueError(+ f"The {metric!r} column's values are too large for the test "+ f"statistic: they run from {min(values):.3g} to {max(values):.3g}, "+ "and an arm's sum overflows a float. Rescale the metric (divide its "+ "values by a large constant) and re-run."+ )+++def _means_and_pooled_variance(+ metric: str, control: Sequence[float], treatment: Sequence[float]+) -> tuple[float, float, float]:+ """Per-arm means and the Bessel-pooled variance (each arm needs ``>= 2`` rows).++ Called for the held-out rows and for the tested rows, so the #1384 refusals+ cover both: an arm sum past the largest float, and deviations whose squares+ are.+ """+ mean_c = sum(control) / len(control)+ mean_t = sum(treatment) / len(treatment)+ _require_finite_means(metric, control, treatment, mean_c, mean_t)+ # Squared as d * d, not d ** 2: ** raises OverflowError where * returns inf,+ # and inf is refused below.+ sum_sq = sum((x - mean_c) * (x - mean_c) for x in control) + sum(+ (x - mean_t) * (x - mean_t) for x in treatment+ )+ variance = sum_sq / (len(control) + len(treatment) - 2)+ # #1384 - deviations past about 1.3e154 square past the largest float.+ if not math.isfinite(variance):+ values = [*control, *treatment]raise ValueError(- f"The {config.metric!r} column's spread is below what the test "- f"statistic can represent: its pooled variance {pooled_variance:.3g} "- f"over {n_control} + {n_treatment} rows gives a standard error that "- "underflows to 0. Rescale the metric (multiply its values by a large "- "constant) and re-run."+ f"The {metric!r} column's spread is above what the test "+ f"statistic can represent: its values run from {min(values):.3g} to "+ f"{max(values):.3g}, and their variance overflows a float. Rescale "+ "the metric (divide its values by a large constant) and re-run.")+ return mean_c, mean_t, variance- # Standardised effect size (z-statistic of the difference of means).- diff = mean_treatment - mean_control- z = diff / pooled_se-- # Two-sided SPRT (#1227). For a point alternative H1: delta = +d (d =- # effect_size, in standardised units mu_h1) Wald's log-likelihood ratio is- #- # log(LR+_n) = z * mu_h1 * sqrt(n_eff / (n_eff + 1))- # - 0.5 * mu_h1**2 * n_eff / (n_eff + 1)- #- # and for H1: delta = -d the first term flips sign. With a known variance- # E[LR_n] = 1 under H0 at every n for each ratio, and so for their average.- # (The n_eff / (n_eff + 1) shrink moves the alternative with n, so neither- # is exactly a martingale; the Type-I rate under peeking is measured, not- # derived: benchmarks/gate-1227-ab-burn-in.md. Here the variance is also- # estimated; see limitation 3 in the module docstring.)- #- # It must be the average of the RATIOS. The mean of the log-ratios is just- # -drift (it ignores the data), and |z| in the one-sided formula is the- # larger of the two log-ratios, whose expectation exceeds 1 and which- # roughly doubles the Type-I rate under peeking.- #- # (Code-review CRITICAL fix v0.63.0: earlier draft used a malformed- # mixture-prior LLR with the wrong sign on the log term, which drove- # the LLR positive under H0 as n grew → unbounded Type-I error.)- n_eff = (n_control * n_treatment) / (n_control + n_treatment)- mu_h1 = config.effect_size / pooled_se # in standardised units- # #1339 - drift squares mu_h1 below, and ** raises OverflowError instead- # of returning inf, which left `soup ab` exiting on a bare- # "OverflowError: (34, 'Result too large')" that names no flag. It is the- # RATIO that overflows, so a near-constant metric column reaches it at the- # default --effect-size too; the message therefore names both sides.- if mu_h1 > MAX_STANDARDISED_EFFECT:++def _standardised_effect(+ config: MsprtConfig,+ control: Sequence[float],+ treatment: Sequence[float],+ *,+ scale_rows: int,+) -> float:+ """``effect_size`` over the pooled standard deviation of the first ``scale_rows``.++ Those are the held-out rows once there are enough of them, and until then+ every row so far, which are the first of them. Checking that early refuses an+ impossible ``--effect-size`` on the first run instead of after+ ``PRIOR_SCALE_ROWS`` rows (#1339). Returns 0.0 while the scale is not known yet+ (fewer than 2 rows per arm, or all of them equal); the caller does not use it+ then.+ """+ if scale_rows < 2:+ return 0.0+ _, _, variance = _means_and_pooled_variance(+ config.metric, control[:scale_rows], treatment[:scale_rows]+ )+ if variance <= 0.0:+ # Rows that differ can still have a variance of 0.0 in floats (0 and+ # 1e-170). Held out, they would set a prior variance of 0 and a continue+ # that never ends, so only rows that are all equal wait for more.+ if len(set(control[:scale_rows])) > 1 or len(set(treatment[:scale_rows])) > 1:+ raise ValueError(+ f"The {config.metric!r} column's spread is below what the test "+ f"statistic can represent: its first {scale_rows} rows per arm "+ "differ, but their variance underflows to 0. Rescale the metric "+ "(multiply its values by a large constant) and re-run."+ )+ return 0.0+ scale = math.sqrt(variance)+ effect = config.effect_size / scale+ too_large = effect > _MAX_PRIOR_EFFECT+ # #1384 - a variance below the smallest normal float is a spread the+ # statistic cannot carry at any --effect-size: say so, and how to fix it.+ if too_large and variance < sys.float_info.min:+ raise ValueError(+ f"The {config.metric!r} column's spread is below what the test "+ f"statistic can represent: its first {scale_rows} rows per arm have a "+ f"pooled standard deviation of {scale:.3g}, which puts --effect-size "+ f"{config.effect_size!r} at {effect:.3g} standard deviations, past the "+ f"{_MAX_PRIOR_EFFECT:.3g} the statistic can carry. Rescale the "+ "metric (multiply its values by a large constant) and re-run."+ )+ if too_large:raise ValueError(- f"--effect-size {config.effect_size!r} is {mu_h1:.3g} standard "- f"errors at a pooled standard error of {pooled_se:.3g}, and the "- f"test statistic overflows above {MAX_STANDARDISED_EFFECT:.3g}. "+ f"--effect-size {config.effect_size!r} is {effect:.3g} standard "+ f"deviations at a pooled standard deviation of {scale:.3g}, and the "+ f"test statistic overflows above {_MAX_PRIOR_EFFECT:.3g}. "f"Lower --effect-size, or check the {config.metric!r} column: a ""near-constant column reaches this at any --effect-size.")- n_ratio = n_eff / (n_eff + 1.0)- shift = z * mu_h1 * math.sqrt(n_ratio)- drift = 0.5 * mu_h1**2 * n_ratio- llr = _log_mean_exp(shift - drift, -shift - drift)-- upper = math.log((1.0 - config.beta) / config.alpha)- lower = math.log(config.beta / (1.0 - config.alpha))-- direction = None- if min(n_control, n_treatment) < min_rows_per_arm(config.alpha):- decision = "continue" # burn-in: see BURN_IN_ROWS_BY_ALPHA- elif llr >= upper:- decision = "reject_h0"- direction = _direction(config.metric, diff)- elif llr <= lower:- decision = "accept_h0"- else:- decision = "continue"-- return MsprtVerdict(- decision=decision,- log_likelihood_ratio=llr,- n_control=n_control,- n_treatment=n_treatment,- mean_control=mean_control,- mean_treatment=mean_treatment,- direction=direction,- )+ return effectdef msprt_step(@@ -391,79 +420,92 @@ def msprt_step("""Run a single two-sided mSPRT decision step.Returns ``MsprtVerdict`` with one of:- - ``continue``: keep collecting samples; always the answer while either- arm has fewer than ``min_rows_per_arm(config.alpha)`` rows (burn-in)+ - ``continue``: keep collecting samples; always the answer until each arm+ has at least 2 rows past the ``PRIOR_SCALE_ROWS`` held-out ones- ``reject_h0``: difference is real (treatment != control), in eitherdirection; ``direction`` says whether the treatment is ``better`` or``worse`` than control, by the metric's polarity- ``accept_h0``: difference is not significant++ ``mean_control`` / ``mean_treatment`` and the row counts cover every row;+ the statistic and the direction use the rows after the held-out ones."""ctrl = _validate_sample_list(control, arm="control")treat = _validate_sample_list(treatment, arm="treatment")n_c, n_t = len(ctrl), len(treat)- mean_c = sum(ctrl) / n_c if n_c else 0.0- mean_t = sum(treat) / n_t if n_t else 0.0+ if n_c and n_t:+ _require_finite_means(config.metric, ctrl, treat, sum(ctrl) / n_c, sum(treat) / n_t)- if n_c < 2 or n_t < 2:+ def verdict(llr: float = 0.0, decision: str = "continue", direction: str | None = None):return MsprtVerdict(- decision="continue",- log_likelihood_ratio=0.0,+ decision=decision,+ log_likelihood_ratio=llr,n_control=n_c,n_treatment=n_t,- mean_control=mean_c,- mean_treatment=mean_t,- )-- # #1384 - an arm whose values sum past the largest float has an infinite- # mean however little they spread: name their size, not their spread.- if not (math.isfinite(mean_c) and math.isfinite(mean_t)):- values = ctrl + treat- raise ValueError(- f"The {config.metric!r} column's values are too large for the test "- f"statistic: they run from {min(values):.3g} to {max(values):.3g}, "- "and an arm's sum overflows a float. Rescale the metric (divide its "- "values by a large constant) and re-run."+ mean_control=sum(ctrl) / n_c if n_c else 0.0,+ mean_treatment=sum(treat) / n_t if n_t else 0.0,+ direction=direction,)- # Pooled variance with Bessel correction. Squared as d * d, not d ** 2:- # ** raises OverflowError where * returns inf, and inf is refused below.- var_c = sum((x - mean_c) * (x - mean_c) for x in ctrl) / (n_c - 1)- var_t = sum((x - mean_t) * (x - mean_t) for x in treat) / (n_t - 1)- raw_pooled_var = ((n_c - 1) * var_c + (n_t - 1) * var_t) / (n_c + n_t - 2)- # #1384 - deviations past about 1.3e154 square past the largest float.- if not math.isfinite(raw_pooled_var):- values = ctrl + treat+ held = _held_out_rows(ctrl, treat)+ standardised_effect = _standardised_effect(+ config, ctrl, treat, scale_rows=held if held is not None else min(n_c, n_t)+ )+ if held is None or n_c - held < 2 or n_t - held < 2:+ return verdict()+ rest_c, rest_t = ctrl[held:], treat[held:]+ mean_c, mean_t, pooled_variance = _means_and_pooled_variance(+ config.metric, rest_c, rest_t+ )+ # Both tested arms constant: t is 0/0, and without measurement noise+ # sequential testing cannot bound the Type-I error honestly (code-review LOW+ # fix v0.63.0), so keep collecting.+ if pooled_variance <= 0.0:+ return verdict()+ diff = mean_t - mean_c+ prior_variance = standardised_effect * standardised_effect+ llr = _nig_log_bayes_factor(+ n_control=len(rest_c),+ n_treatment=len(rest_t),+ mean_difference=diff,+ pooled_variance=pooled_variance,+ prior_variance=prior_variance,+ )+ # A non-finite statistic cannot be compared with the boundaries: nan crosses+ # neither (a continue that never ends) and -inf is a silent accept_h0.+ if not math.isfinite(llr):+ n_eff = len(rest_c) * len(rest_t) / (len(rest_c) + len(rest_t))+ if not math.isfinite(1.0 + n_eff * prior_variance):+ raise ValueError(+ f"--effect-size {config.effect_size!r} is {standardised_effect:.3g} "+ f"standard deviations of the {config.metric!r} column's held-out "+ f"rows, and at {len(rest_c)} + {len(rest_t)} tested rows the prior "+ "variance of the test statistic overflows a float. Lower "+ f"--effect-size, or check the {config.metric!r} column: a "+ "near-constant held-out column reaches this at any --effect-size."+ )raise ValueError(- f"The {config.metric!r} column's spread is above what the test "- f"statistic can represent: its values run from {min(values):.3g} to "- f"{max(values):.3g}, and their variance overflows a float. Rescale "- "the metric (divide its values by a large constant) and re-run."- )- # Degenerate (zero variance) — both arms are constant. If the means- # are also identical, defer to ``continue`` (no information). If the- # means differ, fall back to ``continue`` as well: with zero observed- # variance the SPRT cannot bound Type-I error honestly. Operators- # need real measurement noise to use sequential testing (code-review- # LOW fix v0.63.0 — the equality check was previously dead under the- # `max(_, 1e-9)` floor).- if raw_pooled_var <= 0.0:- return MsprtVerdict(- decision="continue",- log_likelihood_ratio=0.0,- n_control=n_c,- n_treatment=n_t,- mean_control=mean_c,- mean_treatment=mean_t,+ f"The {config.metric!r} column's tested rows are outside what the "+ f"test statistic can represent: the arm means differ by {diff:.3g} at "+ f"a pooled variance of {pooled_variance:.3g}, and the t statistic "+ "overflows a float. Check the column for a near-constant arm, or "+ "rescale the metric (divide its values by a large constant) if its "+ "values are very large, and re-run.")- return _verdict_from_summary(- config,- n_control=n_c,- n_treatment=n_t,- mean_control=mean_c,- mean_treatment=mean_t,- pooled_variance=raw_pooled_var,- )+ if llr >= math.log(1.0 / config.alpha):+ return verdict(llr, "reject_h0", _direction(config.metric, diff))+ if llr <= math.log(config.beta / (1.0 - config.alpha)):+ # Held-out rows far tighter than the tested ones (a warm cache, a judge+ # that saturates early) make the prior far too wide, and the Bayes+ # factor then favours H0 whether or not there is a difference. Hold the+ # accept back until the spreads agree; a reject is never held back, so+ # the Type-I bound is unchanged.+ held_out_sd = config.effect_size / standardised_effect+ if math.sqrt(pooled_variance) > ACCEPT_HOLD_SPREAD_RATIO * held_out_sd:+ return verdict(llr)+ return verdict(llr, "accept_h0")+ return verdict(llr)def run_msprt(@@ -518,15 +560,13 @@ def run_msprt(__all__ = [- "BURN_IN_ROWS_BY_ALPHA",- "CALIBRATED_HORIZON_ROWS",+ "ACCEPT_HOLD_SPREAD_RATIO","HIGHER_IS_BETTER","MAX_STANDARDISED_EFFECT","MsprtConfig","MsprtVerdict",+ "PRIOR_SCALE_ROWS","SUPPORTED_METRICS",- "burn_in_is_calibrated",- "min_rows_per_arm","msprt_step","run_msprt","validate_metric_name",diff --git a/tests/test_issue1227_ab_two_sided.py b/tests/test_issue1227_ab_two_sided.pyindex 2eb2f4d8..a882bd87 100644--- a/tests/test_issue1227_ab_two_sided.py+++ b/tests/test_issue1227_ab_two_sided.py@@ -7,41 +7,26 @@ across the ACCEPT boundary: the larger the regression, the more confidently thecommand said "No significant difference". On ``latency`` and ``retry_rate``(lower is better) that made a real improvement look like no difference too.-The fix is the symmetric two-point mixture: average the likelihood RATIOS for-``+effect_size`` and ``-effect_size`` (in log space, with logsumexp). With a-known variance each point ratio has expectation 1 under H0 at every step, and so-does their average, which is why the ``log((1 - beta) / alpha)`` boundary keeps-its meaning. Neither is exactly a martingale (the ``n_eff / (n_eff + 1)`` shrink-moves the alternative with n), so the Type-I rate under peeking is measured, not-derived. Averaging the log-ratios, or substituting ``|z|``, does not keep that-expectation at 1; the peeking simulations below are what catch the ``|z|``-shortcut.--That argument needs a known variance, and ``soup ab`` estimates it from the rows.-From a handful of rows the estimate is too noisy: without a burn-in, re-running-after every pair would reject a true H0 up to 0.164 of the time at alpha 0.05. So-no verdict is given until each arm has ``min_rows_per_arm(alpha)`` rows: 30 at-alpha >= 0.05, 40 below (not calibrated below alpha 0.01). Each is the smallest-burn-in that the sweep in benchmarks/gate-1227-ab-burn-in.md (effect_size / sigma-0.1 to 5, runs followed to 1000 rows per arm) found to keep Type-I within alpha-plus Monte-Carlo error at every ratio: worst 0.0512 at alpha 0.05, 0.0109 at-alpha 0.01. The simulations here stop at 200 rows per arm to stay CI-sized.+The #1227 fix was a symmetric two-point mixture with a plug-in variance and a+burn-in. #1265 replaced that statistic with the normal-inverse-gamma mixture,+whose prior on the standardised difference is symmetric too, so both signs of+a difference are equal evidence; its own tests (the Bayes factor, Type-I under+peeking, power) are in test_issue1265_ab_nig.py. What this file pins is the+#1227 contract, whatever the statistic: a shift either way is rejected, the+direction is read through the metric's polarity, and the CLI panel, table and+webhook payload carry it."""from __future__ import annotations-import inspectimport jsonimport mathimport re-import statistics-from pathlib import Pathimport pytestfrom typer.testing import CliRunnerrunner = CliRunner()-_REPO_ROOT = Path(__file__).resolve().parents[1]# Rich colours per character on Linux CI, and wraps; compare on plain text.# Box-drawing characters go too, so a table row reads "direction worse" and a@@ -55,8 +40,8 @@ def _plain(text: str) -> str:# The reproduction data from the issue, rows around 0.80, repeated to 40 rows per-# arm: the issue's own 20 rows are now inside the burn-in (30 rows at alpha 0.05,-# 40 below), so they would only ever give `continue`.+# arm (the #1227 burn-in needed that many; since #1265 the first 5 set the prior+# scale and the rest are tested)._JUDGE_CONTROL = [0.80, 0.82, 0.78, 0.81, 0.79] * 8_LATENCY_CONTROL = [1.20, 1.25, 1.18, 1.22, 1.21] * 8_RETRY_CONTROL = [0.20, 0.22, 0.18, 0.21, 0.19] * 8@@ -72,8 +57,8 @@ def _step(metric, control, treatment, **kwargs):return msprt_step(MsprtConfig(metric=metric, **kwargs), control=control, treatment=treatment)-def _upper(alpha=0.05, beta=0.20):- return math.log((1.0 - beta) / alpha)+def _upper(alpha=0.05):+ return math.log(1.0 / alpha) # the reject boundary since #1265# ---------------------------------------------------------------------------@@ -187,218 +172,6 @@ class TestNoDifference:assert verdict.log_likelihood_ratio == 0.0-# ----------------------------------------------------------------------------# Burn-in: no verdict until each arm has min_rows_per_arm(alpha) rows-# ------------------------------------------------------------------------------def _judge_rows(count):- """``count`` judge_score rows around 0.80 (the issue's pattern, extended)."""- return ([0.80, 0.82, 0.78, 0.81, 0.79] * 20)[:count]---def _min_rows(alpha=0.05):- from soup_cli.utils.ab_test import min_rows_per_arm-- return min_rows_per_arm(alpha)---class TestBurnIn:- @pytest.mark.parametrize(- ("alpha", "rows"),- [(0.5, 30), (0.10, 30), (0.05, 30), (0.0499, 40), (0.025, 40), (0.01, 40),- (0.0099, 40), (0.001, 40)],- )- def test_burn_in_table_is_the_calibrated_one(self, alpha, rows):- """alpha >= 0.05: 30 rows; 0.01 <= alpha < 0.05: 40; below 0.01: 40, uncalibrated.-- Each is the smallest N in {20, 30, 40, 50, 60} whose Type-I rate under- peeking stays within alpha + 3 binomial SE at every effect_size / sigma- from 0.1 to 5, with runs followed to 1000 rows per arm and to 200- (benchmarks/gate-1227-ab-burn-in.md). Changing one means re-running- benchmarks/harness/ab_burn_in_sweep.py, not editing this table.- """- assert _min_rows(alpha) == rows-- @pytest.mark.parametrize(- ("alpha", "calibrated"), [(0.5, True), (0.05, True), (0.01, True), (0.0099, False),- (0.001, False)],- )- def test_calibration_stops_below_alpha_0_01(self, alpha, calibrated):- from soup_cli.utils.ab_test import burn_in_is_calibrated-- assert burn_in_is_calibrated(alpha) is calibrated-- def test_calibrated_horizon_is_1000_rows_per_arm(self):- """The sweep followed runs to 1000 rows per arm; past that `soup ab` warns."""- from soup_cli.utils.ab_test import CALIBRATED_HORIZON_ROWS-- assert CALIBRATED_HORIZON_ROWS == 1000-- @pytest.mark.parametrize(- ("bad", "message"),- [- (0.0, "alpha must be in"),- (1.0, "alpha must be in"),- (float("nan"), "alpha must be finite"),- (True, "alpha must be a number, not bool"),- ("0.05", "alpha must be a number"),- ],- )- def test_burn_in_refuses_an_invalid_alpha(self, bad, message):- from soup_cli.utils.ab_test import burn_in_is_calibrated, min_rows_per_arm-- with pytest.raises((TypeError, ValueError), match=message):- min_rows_per_arm(bad)- with pytest.raises((TypeError, ValueError), match=message):- burn_in_is_calibrated(bad)-- @pytest.mark.parametrize("shift", [-0.30, 0.30])- def test_alpha_0_01_needs_40_rows(self, shift):- below = _judge_rows(_min_rows(0.01) - 1)- verdict = _step("judge_score", below, _shifted(below, shift), alpha=0.01)- assert verdict.decision == "continue", verdict- assert verdict.log_likelihood_ratio >= _upper(alpha=0.01)-- at = _judge_rows(_min_rows(0.01))- verdict = _step("judge_score", at, _shifted(at, shift), alpha=0.01)- assert verdict.decision == "reject_h0", verdict-- @pytest.mark.parametrize("shift", [-0.30, 0.30])- def test_no_rejection_below_the_burn_in(self, shift):- control = _judge_rows(_min_rows() - 1)- verdict = _step("judge_score", control, _shifted(control, shift))- assert verdict.decision == "continue", verdict- assert verdict.direction is None- # The evidence is computed and reported; only the verdict is withheld.- assert verdict.log_likelihood_ratio >= _upper()-- def test_no_acceptance_below_the_burn_in(self):- control = _judge_rows(_min_rows() - 1)- verdict = _step("judge_score", control, list(control))- assert verdict.decision == "continue", verdict- assert verdict.log_likelihood_ratio <= math.log(0.20 / 0.95)-- @pytest.mark.parametrize(- ("shift", "decision", "direction"),- [(-0.30, "reject_h0", "worse"), (0.0, "accept_h0", None), (0.30, "reject_h0", "better")],- )- def test_verdicts_resume_at_the_burn_in(self, shift, decision, direction):- control = _judge_rows(_min_rows())- verdict = _step("judge_score", control, _shifted(control, shift))- assert verdict.decision == decision, verdict- assert verdict.direction == direction-- @pytest.mark.parametrize(("short_control", "short_treatment"), [(True, False), (False, True)])- def test_both_arms_must_reach_the_burn_in(self, short_control, short_treatment):- full = _judge_rows(_min_rows())- short = full[:-1]- control = short if short_control else full- treatment = _shifted(short if short_treatment else full, -0.30)- verdict = _step("judge_score", control, treatment)- assert verdict.decision == "continue", verdict- assert verdict.log_likelihood_ratio >= _upper()---class TestTheBurnInTextFollowsTheTable:- """The `--alpha` help and two docs pages state the burn-in in words.-- Nothing else ties that text to ``BURN_IN_ROWS_BY_ALPHA``: change a value there (after- re-running the sweep) and these fail until the help and the docs say it too.- """-- @staticmethod- def _tiers():- from soup_cli.utils.ab_test import BURN_IN_ROWS_BY_ALPHA, min_rows_per_arm-- # The text names two calibrated tiers, and one "N below" covers both the lower tier- # and the uncalibrated range, so it is right only while those share a value.- assert len(BURN_IN_ROWS_BY_ALPHA) == 2, BURN_IN_ROWS_BY_ALPHA- (high_alpha, high_rows), (low_alpha, low_rows) = BURN_IN_ROWS_BY_ALPHA- assert min_rows_per_arm(low_alpha / 2) == low_rows- return f"{high_alpha:g}", high_rows, f"{low_alpha:g}", low_rows-- def test_the_alpha_help_states_the_table(self):- from soup_cli.commands.ab import ab-- high_alpha, high_rows, low_alpha, low_rows = self._tiers()- help_text = " ".join(inspect.signature(ab).parameters["alpha"].default.help.split())- expected = (- f"no verdict before {high_rows} rows per arm at {high_alpha} and above, "- f"{low_rows} below (not calibrated below {low_alpha})"- )- assert expected in help_text, help_text-- def test_docs_commands_md_states_the_table(self):- high_alpha, high_rows, _, low_rows = self._tiers()- text = (_REPO_ROOT / "docs" / "commands.md").read_text(encoding="utf-8")- expected = (- f"continue until {high_rows} rows per arm, {low_rows} when --alpha < {high_alpha}"- )- assert expected in text-- def test_docs_evaluation_md_table_states_the_table(self):- high_alpha, high_rows, low_alpha, low_rows = self._tiers()- text = (_REPO_ROOT / "docs" / "evaluation.md").read_text(encoding="utf-8")- for row in (- f"| {high_alpha} and above | {high_rows} |",- f"| from {low_alpha} to below {high_alpha} | {low_rows} |",- f"| below {low_alpha} | {low_rows}, **not calibrated** |",- ):- assert row in text, row---# ----------------------------------------------------------------------------# The statistic itself: log of the AVERAGE of the two likelihood ratios-# ------------------------------------------------------------------------------def _documented_point_llrs(control, treatment, effect_size):- """Wald's point-alternative log-ratios for +effect_size and -effect_size.-- Written from the formula in the module docstring, not from the code.- """- n_c, n_t = len(control), len(treatment)- pooled = ((n_c - 1) * statistics.variance(control)- + (n_t - 1) * statistics.variance(treatment)) / (n_c + n_t - 2)- se = math.sqrt(pooled * (1.0 / n_c + 1.0 / n_t))- z = (statistics.fmean(treatment) - statistics.fmean(control)) / se- mu = effect_size / se- n_eff = n_c * n_t / (n_c + n_t)- ratio = n_eff / (n_eff + 1.0)- shift = z * mu * math.sqrt(ratio)- drift = 0.5 * mu**2 * ratio- return shift - drift, -shift - drift---class TestStatistic:- # Moderate evidence, so exp() of either point log-ratio is representable.- _CONTROL = [1.00, 1.30, 0.80, 1.10, 0.90, 1.20, 0.95, 1.05]- _TREATMENT = [1.10, 1.45, 0.85, 1.25, 1.00, 1.30, 1.00, 1.20]-- def test_llr_is_log_of_the_average_likelihood_ratio(self):- plus, minus = _documented_point_llrs(self._CONTROL, self._TREATMENT, 0.1)- expected = math.log((math.exp(plus) + math.exp(minus)) / 2.0)- # Discriminates the tempting wrong answers at this operating point:- assert abs(expected - max(plus, minus)) > 0.1 # |z| / max of the two- assert abs(expected - (plus + minus) / 2.0) > 0.1 # mean of the log-ratios- assert abs(expected - plus) > 0.1 # the old one-sided statistic-- verdict = _step("judge_score", self._CONTROL, self._TREATMENT, effect_size=0.1)- assert verdict.log_likelihood_ratio == pytest.approx(expected, rel=1e-9, abs=1e-12)-- def test_huge_evidence_stays_finite(self):- """exp(1142) overflows; the average must be taken in log space."""- verdict = _step("judge_score", _JUDGE_CONTROL, _shifted(_JUDGE_CONTROL, -0.30))- plus, minus = _documented_point_llrs(- _JUDGE_CONTROL, _shifted(_JUDGE_CONTROL, -0.30), 0.1- )- assert max(plus, minus) > 710 # math.exp overflows above ~709.78- assert verdict.log_likelihood_ratio == pytest.approx(- max(plus, minus) - math.log(2.0), rel=1e-9- )--# ---------------------------------------------------------------------------# MsprtVerdict: the direction field# ---------------------------------------------------------------------------@@ -495,12 +268,11 @@ class TestCli:out = _plain(result.output)assert "reject_h0" in outassert "direction worse" in out- assert "burn_in 30 rows per arm (alpha 0.05)" in out+ assert "prior_scale first 5 rows per arm" in outassert "rollback" in out.lower()assert "No significant difference" not in outassert "promote" not in out.lower()- assert "not calibrated" not in out- assert "calibrated up to" not in out+ assert "Warning" not in outassert len(captured) == 1payload = captured[0]["payload"]@@ -551,8 +323,8 @@ class TestCli:assert "direction" in payloadassert payload["direction"] is None- def test_burn_in_file_says_why_there_is_no_verdict(self, tmp_path, monkeypatch):- control = _judge_rows(5)+ def test_too_few_rows_file_says_why_there_is_no_verdict(self, tmp_path, monkeypatch):+ control = _JUDGE_CONTROL[:6] # the 5 prior-scale rows and 1 more: 2 are neededresult, captured = _run_cli(tmp_path, monkeypatch, "judge_score", control, _shifted(control, -0.30),)@@ -560,316 +332,7 @@ class TestCli:out = _plain(result.output)assert "decision continue" in outassert "direction n/a" in out- assert "Burn-in: no verdict before 30 rows per arm at alpha 0.05" in out- assert "control has 5, treatment 5" in out+ assert "Not enough rows yet: the first 5 rows of each arm set the scale" in out+ assert "control has 6, treatment 6" in outassert "rollback" not in out.lower()assert captured == [] # a `continue` never pages anyone-- def test_alpha_0_01_states_its_40_row_burn_in(self, tmp_path, monkeypatch):- control = _judge_rows(30) # enough at alpha 0.05, short of alpha 0.01's 40 rows- result, captured = _run_cli(- tmp_path, monkeypatch, "judge_score", control, _shifted(control, -0.30),- extra=("--alpha", "0.01"),- )- assert result.exit_code == 0, (result.output, repr(result.exception))- out = _plain(result.output)- assert "decision continue" in out- assert "burn_in 40 rows per arm (alpha 0.01)" in out- assert "Burn-in: no verdict before 40 rows per arm at alpha 0.01" in out- assert "control has 30, treatment 30" in out- assert "not calibrated" not in out- assert captured == []-- def test_alpha_below_0_01_warns_that_it_is_not_calibrated(self, tmp_path, monkeypatch):- control = _judge_rows(40)- result, captured = _run_cli(- tmp_path, monkeypatch, "judge_score", control, _shifted(control, -0.30),- extra=("--alpha", "0.005"),- )- assert result.exit_code == 0, (result.output, repr(result.exception))- out = _plain(result.output)- assert (- "Warning: Type-I control under peeking is not calibrated below alpha 0.01" in out- )- assert "At --alpha 0.005 the burn-in is 40 rows per arm" in out- assert "burn_in 40 rows per arm (alpha 0.005)" in out- # The warning qualifies the verdict; it does not suppress it.- assert "direction worse" in out- assert captured[0]["payload"]["direction"] == "worse"-- @pytest.mark.parametrize(- ("n_control", "n_treatment", "warned"),- [(1000, 1000, False), (1001, 1001, True), (1001, 40, True)],- )- def test_past_1000_rows_per_arm_warns_that_the_calibration_ends(- self, tmp_path, monkeypatch, n_control, n_treatment, warned- ):- pattern = [0.80, 0.82, 0.78, 0.81, 0.79] * 201- result, captured = _run_cli(- tmp_path, monkeypatch, "judge_score",- pattern[:n_control], _shifted(pattern[:n_treatment], -0.30),- )- assert result.exit_code == 0, (result.output, repr(result.exception))- out = _plain(result.output)- warning = "Warning: Type-I control under peeking is calibrated up to 1000 rows per arm"- assert (warning in out) is warned, out- if warned:- assert f"This input has {max(n_control, n_treatment)} rows in an arm" in out- # The warning qualifies the verdict; it does not suppress it.- assert "direction worse" in out- assert captured[0]["payload"]["direction"] == "worse"---# ----------------------------------------------------------------------------# Type-I error under peeking (seeded Monte-Carlo, vectorised with numpy)-# ----------------------------------------------------------------------------#-# The operator re-runs `soup ab` after every new (control, treatment) pair,-# n = 2..200 rows per arm, and stops at the first terminal verdict. (The-# calibration in benchmarks/gate-1227-ab-burn-in.md follows runs to 1000 rows;-# these stop at 200 to stay CI-sized, with the same burn-in.) Calling-# `msprt_step` on the raw rows at every peek is O(n) per call (about 45 s for-# a few thousand runs), so the rows' running means and Bessel-corrected-# variances are computed with numpy and handed to `_verdict_from_summary`,-# the decision code `msprt_step` itself delegates to. Two checks tie that back-# to `msprt_step`: the anchor at the end of the first simulation compares-# single peeks, and `test_msprt_step_replays_the_simulated_runs` replays whole-# runs through it, one peek at a time.--_REPS = 3000-_ALPHA = 0.05-# Monte-Carlo tolerance: a one-sided 3-sigma binomial allowance on the rate,-# 3 * sqrt(0.05 * 0.95 / 3000) = 0.0119, so the bound is 0.0619.-_MC_TOLERANCE = 3.0 * math.sqrt(_ALPHA * (1.0 - _ALPHA) / _REPS)---def _peek_until_decided(np, config, *, sigma, reps, seed, n_max=200, known_variance=False):- """Peek after every pair; return the terminal verdict (or None) per run.-- Also returns the raw rows and the running summaries that were fed to the- decision code, so a caller can check them against ``msprt_step``.- """- from soup_cli.utils.ab_test import _verdict_from_summary-- rng = np.random.default_rng(seed)- # H0: both arms from the same distribution. The statistic is- # location-invariant, so the common mean is 0 (no cancellation in the- # one-pass variance below).- control = rng.normal(0.0, sigma, size=(reps, n_max))- treatment = rng.normal(0.0, sigma, size=(reps, n_max))- rows = np.arange(1, n_max + 1, dtype=float)- mean_c = np.cumsum(control, axis=1) / rows- mean_t = np.cumsum(treatment, axis=1) / rows- if known_variance:- pooled = np.full_like(mean_c, sigma * sigma)- else:- dof = np.maximum(rows - 1.0, 1.0)- var_c = (np.cumsum(control * control, axis=1) - rows * mean_c * mean_c) / dof- var_t = (np.cumsum(treatment * treatment, axis=1) - rows * mean_t * mean_t) / dof- pooled = (var_c + var_t) / 2.0 # equal arms: the Bessel-pooled variance-- mean_c_rows, mean_t_rows, pooled_rows = mean_c.tolist(), mean_t.tolist(), pooled.tolist()- outcomes = []- for row_c, row_t, row_v in zip(mean_c_rows, mean_t_rows, pooled_rows):- verdict = None- for idx in range(1, n_max): # idx + 1 = 2..n_max rows per arm- candidate = _verdict_from_summary(- config,- n_control=idx + 1,- n_treatment=idx + 1,- mean_control=row_c[idx],- mean_treatment=row_t[idx],- pooled_variance=row_v[idx],- )- if candidate.decision != "continue":- verdict = candidate- break- outcomes.append(verdict)- return {- "outcomes": outcomes,- "control": control,- "treatment": treatment,- "summaries": (mean_c_rows, mean_t_rows, pooled_rows),- }---def _rejection_rate(outcomes):- return sum(1 for v in outcomes if v is not None and v.decision == "reject_h0") / len(outcomes)---class TestTypeOneErrorUnderPeeking:- def test_rejects_at_most_alpha_when_the_effect_is_small_against_noise(self):- """Acceptance: H0, a peek after every pair, rejection rate <= alpha.-- effect_size / sigma = 0.25: the effect you look for is small next to the- row-to-row noise, the usual A/B regime. Measured over 100,000 runs with- the 30-row burn-in and a 200-row horizon (benchmarks/gate-1227-ab-burn-in.md):- 0.0358 for the mixture, 0.0850 for a |z| substitution, 0.0412 for the old- one-sided test. 3000 runs put the bound at 0.0619.- """- np = pytest.importorskip("numpy")- from soup_cli.utils.ab_test import MsprtConfig, _verdict_from_summary, msprt_step-- config = MsprtConfig(metric="latency", alpha=_ALPHA, beta=0.20, effect_size=0.1)- sim = _peek_until_decided(np, config, sigma=0.1 / 0.25, reps=_REPS, seed=1227)- outcomes = sim["outcomes"]- rate = _rejection_rate(outcomes)- assert rate <= _ALPHA + _MC_TOLERANCE, (- f"Type-I rate {rate:.4f} under peeking exceeds alpha {_ALPHA} "- f"+ tolerance {_MC_TOLERANCE:.4f}"- )-- # Two-sided under H0: false rejections fall on both sides.- directions = [v.direction for v in outcomes if v is not None and v.decision == "reject_h0"]- assert len(directions) >= 50, directions- for side in ("better", "worse"):- share = directions.count(side) / len(directions)- assert 0.25 <= share <= 0.75, (side, share, len(directions))-- # Anchor: the summaries the simulation decided on give msprt_step's own- # verdict on the raw rows.- mean_c_rows, mean_t_rows, pooled_rows = sim["summaries"]- rng = np.random.default_rng(7)- for run, idx in zip(rng.integers(0, _REPS, 150).tolist(),- rng.integers(1, 200, 150).tolist()):- from_rows = msprt_step(- config,- control=sim["control"][run, : idx + 1].tolist(),- treatment=sim["treatment"][run, : idx + 1].tolist(),- )- from_summary = _verdict_from_summary(- config,- n_control=idx + 1,- n_treatment=idx + 1,- mean_control=mean_c_rows[run][idx],- mean_treatment=mean_t_rows[run][idx],- pooled_variance=pooled_rows[run][idx],- )- assert from_rows.decision == from_summary.decision, (run, idx)- assert from_rows.direction == from_summary.direction, (run, idx)- assert from_rows.log_likelihood_ratio == pytest.approx(- from_summary.log_likelihood_ratio, rel=1e-9, abs=1e-9- ), (run, idx)-- def test_mixture_keeps_the_wald_boundary_with_a_known_variance(self):- """The martingale argument itself, with the variance estimate taken out.-- effect_size / sigma = 0.4. Measured over 100,000 runs with the true- variance, the 30-row burn-in and a 200-row horizon: 0.0406 for the- mixture, 0.0862 for |z|. 3000 runs put the bound at 0.0619.- """- np = pytest.importorskip("numpy")- from soup_cli.utils.ab_test import MsprtConfig-- config = MsprtConfig(metric="judge_score", alpha=_ALPHA, beta=0.20, effect_size=0.1)- sim = _peek_until_decided(- np, config, sigma=0.1 / 0.4, reps=_REPS, seed=2027, known_variance=True- )- rate = _rejection_rate(sim["outcomes"])- assert rate <= _ALPHA + _MC_TOLERANCE, (rate, _ALPHA + _MC_TOLERANCE)-- @pytest.mark.parametrize(- ("ratio", "seed"),- [(0.35, 2028), (1.0, 2029), (2.0, 2030)],- )- def test_burn_in_keeps_type_one_error_within_alpha_with_few_rows(self, ratio, seed):- """The small-sample case: the variance estimated from as few as 2 rows.-- Measured over 100,000 runs with a 200-row horizon, Type-I with the- 30-row burn-in / without any: 0.0492 / 0.1066 at effect_size / sigma- 0.35 (the worst ratio for the burn-in at this horizon), 0.0114 / 0.1637- at 1.0, 0.0001 / 0.1349 at 2.0. 2000 runs put the bound at 0.0646, so- removing the burn-in fails every case, and no verdict may come before 30- rows per arm, so the old 20-row burn-in fails too.- """- np = pytest.importorskip("numpy")- from soup_cli.utils.ab_test import MsprtConfig-- reps = 2000- tolerance = 3.0 * math.sqrt(_ALPHA * (1.0 - _ALPHA) / reps)- config = MsprtConfig(metric="judge_score", alpha=_ALPHA, beta=0.20, effect_size=0.1)- sim = _peek_until_decided(np, config, sigma=0.1 / ratio, reps=reps, seed=seed)- rate = _rejection_rate(sim["outcomes"])- assert rate <= _ALPHA + tolerance, (- f"Type-I rate {rate:.4f} at effect_size / sigma {ratio} exceeds alpha "- f"{_ALPHA} + tolerance {tolerance:.4f}"- )- _assert_no_verdict_before(sim["outcomes"], 30)-- @pytest.mark.parametrize(- ("ratio", "seed"),- [(0.45, 2031), (0.7, 2032)],- )- def test_alpha_0_01_burn_in_keeps_type_one_error_within_alpha(self, ratio, seed):- """alpha 0.01 uses the 40-row burn-in.-- Measured over 100,000 runs with a 200-row horizon, Type-I at alpha 0.01- with 40 / 20 rows: 0.01045 / 0.01164 at effect_size / sigma 0.45 (the- worst ratio for 40 rows at this horizon) and 0.00748 / 0.01224 at 0.7- (the worst for 20 rows). At CI size the rate alone cannot tell 40 rows- from 20: 2000 runs put the bound at 0.0167. So the test also checks- where the verdicts start, never before 40 rows per arm. Forcing 20 rows- at alpha 0.01 fails that check.- """- np = pytest.importorskip("numpy")- from soup_cli.utils.ab_test import MsprtConfig-- alpha, reps = 0.01, 2000- tolerance = 3.0 * math.sqrt(alpha * (1.0 - alpha) / reps)- config = MsprtConfig(metric="judge_score", alpha=alpha, beta=0.20, effect_size=0.1)- sim = _peek_until_decided(np, config, sigma=0.1 / ratio, reps=reps, seed=seed)- _assert_no_verdict_before(sim["outcomes"], 40)- rate = _rejection_rate(sim["outcomes"])- assert rate <= alpha + tolerance, (- f"Type-I rate {rate:.4f} at effect_size / sigma {ratio} exceeds alpha "- f"{alpha} + tolerance {tolerance:.4f}"- )-- def test_msprt_step_replays_the_simulated_runs(self):- """Whole runs through the real `msprt_step` give the simulation's first verdicts.-- The simulations drive `_verdict_from_summary`. This replays 30 seeded runs- of the ratio-0.4 simulation through `msprt_step` on the raw rows, one- peek at a time, and requires the same first verdict: decision, direction- and row count. A decision rule living in `msprt_step` alone (an accept- turned into continue between 21 and 59 rows, say) changes the stopping- behaviour the Type-I rate is computed from, and only this sees it.- """- np = pytest.importorskip("numpy")- from soup_cli.utils.ab_test import MsprtConfig, msprt_step-- config = MsprtConfig(metric="judge_score", alpha=_ALPHA, beta=0.20, effect_size=0.1)- sim = _peek_until_decided(np, config, sigma=0.1 / 0.4, reps=400, seed=2033)- picked = np.random.default_rng(3).choice(400, 30, replace=False).tolist()- expected = [sim["outcomes"][run] for run in picked]- # Not vacuous: most replayed runs decide, and some decide inside the window- # between the burn-in and 60 rows where such a rule would act.- assert sum(v is not None for v in expected) >= 25- assert sum(v is not None and v.n_control < 60 for v in expected) >= 10-- for run, want in zip(picked, expected):- replayed = None- for idx in range(1, 200): # idx + 1 = 2..200 rows per arm- verdict = msprt_step(- config,- control=sim["control"][run, : idx + 1].tolist(),- treatment=sim["treatment"][run, : idx + 1].tolist(),- )- if verdict.decision != "continue":- replayed = verdict- break- assert _first_verdict_key(replayed) == _first_verdict_key(want), run---def _first_verdict_key(verdict):- if verdict is None:- return None- return verdict.decision, verdict.direction, verdict.n_control---def _assert_no_verdict_before(outcomes, rows):- """Every run's first verdict came with at least ``rows`` rows per arm."""- decided = [v for v in outcomes if v is not None]- assert decided, "no run reached a verdict"- earliest = min(v.n_control for v in decided)- assert earliest >= rows, f"a run was decided at {earliest} rows per arm (burn-in {rows})"diff --git a/tests/test_issue1265_ab_nig.py b/tests/test_issue1265_ab_nig.pynew file mode 100644index 00000000..dc14cb9c--- /dev/null+++ b/tests/test_issue1265_ab_nig.py@@ -0,0 +1,624 @@+"""#1265 — `soup ab` decides with a variance-robust statistic and needs no burn-in.++The #1227 statistic plugged the estimated variance into a likelihood ratio built+for a known one. From a handful of rows that estimate is too noisy, so a burn-in+of 30 / 40 rows per arm held verdicts back, and at alpha 0.01 the Type-I rate+still sat near 0.0108, with no calibration below 0.01 or past 1000 rows.++The statistic is now the normal-inverse-gamma Bayes factor in its right-Haar+limit: flat on the common mean, 1/sigma on sigma, N(0, g) on the standardised+difference d = delta / sigma. It is a function of the two-sample t statistic+only, so under H0 it is a martingale whatever sigma is, and Ville's inequality+bounds the chance it ever reaches 1/alpha by alpha, at any horizon. The first+``PRIOR_SCALE_ROWS`` rows per arm are held out to put effect_size in standard+deviations: g = (effect_size / s0) ** 2, s0 their pooled SD. The sweep behind+it is benchmarks/gate-1265-ab-nig.md; the simulations here stop at 200 rows per+arm to stay CI-sized.+"""++from __future__ import annotations++import math+import re++import pytest+from typer.testing import CliRunner++runner = CliRunner()++_ANSI_RE = re.compile(r"\x1b\[[0-9;]*m")+_BOX_RE = re.compile(f"[{chr(0x2500)}-{chr(0x257F)}|]")+++def _plain(text: str) -> str:+ return " ".join(_BOX_RE.sub(" ", _ANSI_RE.sub("", text)).split())+++def _step(control, treatment, metric="judge_score", **kwargs):+ from soup_cli.utils.ab_test import MsprtConfig, msprt_step++ return msprt_step(MsprtConfig(metric=metric, **kwargs), control=control, treatment=treatment)+++def _log_bf(control, treatment, prior_variance):+ from soup_cli.utils.ab_test import _nig_log_bayes_factor++ n_c, n_t = len(control), len(treatment)+ mean_c, mean_t = sum(control) / n_c, sum(treatment) / n_t+ sum_sq = sum((x - mean_c) ** 2 for x in control) + sum((x - mean_t) ** 2 for x in treatment)+ return _nig_log_bayes_factor(+ n_control=n_c,+ n_treatment=n_t,+ mean_difference=mean_t - mean_c,+ pooled_variance=sum_sq / (n_c + n_t - 2),+ prior_variance=prior_variance,+ )+++# ---------------------------------------------------------------------------+# The Bayes factor itself+# ---------------------------------------------------------------------------+++def _log_bf_by_integration(np, control, treatment, g):+ """The Bayes factor from the likelihoods, by quadrature, without the t form.++ With a flat prior the common mean integrates out exactly:+ m(delta, sigma) is proportional to sigma^(1 - N) * exp(-(SS + n_eff *+ (D - delta)^2) / (2 sigma^2)), D the difference of the means, SS the+ within-arm sum of squares. H0 sets delta = 0; H1 has delta = d * sigma with+ d ~ N(0, g). Both integrate over sigma with d(sigma) / sigma = d(log sigma).+ """+ control, treatment = np.asarray(control), np.asarray(treatment)+ n_c, n_t = len(control), len(treatment)+ n_total = n_c + n_t+ n_eff = n_c * n_t / n_total+ diff = treatment.mean() - control.mean()+ sum_sq = ((control - control.mean()) ** 2).sum() + ((treatment - treatment.mean()) ** 2).sum()+ log_sigma = np.linspace(math.log(1e-3), math.log(1e3), 4001)[:, None]+ sigma = np.exp(log_sigma)+ d = np.linspace(-10 * math.sqrt(g), 10 * math.sqrt(g), 2001)[None, :]++ def log_m(delta):+ return (1 - n_total) * log_sigma - (sum_sq + n_eff * (diff - delta) ** 2) / (2 * sigma**2)++ h0 = log_m(0.0)[:, 0]+ prior = np.exp(-d * d / (2 * g)) / math.sqrt(2 * math.pi * g)+ shift = h0.max()+ h0_mass = np.trapezoid(np.exp(h0 - shift), log_sigma[:, 0])+ h1_inner = np.trapezoid(np.exp(log_m(d * sigma) - shift) * prior, d[0], axis=1)+ h1_mass = np.trapezoid(h1_inner, log_sigma[:, 0])+ return math.log(h1_mass / h0_mass)+++class TestBayesFactor:+ @pytest.mark.parametrize(+ ("control", "treatment", "g"),+ [+ ([1.0, 1.4], [0.7, 1.9], 1.0), # 2 + 2 rows: nu = 2+ ([0.2, -0.4, 0.9], [1.3, 0.8], 0.5), # unequal arms+ ([3.1, 2.7, 3.3, 2.9], [2.2, 2.6, 2.5, 2.1, 2.8], 4.0), # clear difference+ ([0.5, 0.52, 0.49, 0.51, 0.5, 0.48], [0.5, 0.49, 0.51, 0.5, 0.52, 0.5], 0.05),+ ],+ )+ def test_closed_form_matches_the_integrated_likelihoods(self, control, treatment, g):+ np = pytest.importorskip("numpy")+ expected = _log_bf_by_integration(np, control, treatment, g)+ assert _log_bf(control, treatment, g) == pytest.approx(expected, abs=2e-4)++ def test_no_difference_gives_the_occam_penalty(self):+ """t = 0: log BF = -0.5 * log(1 + n_eff * g), whatever the spread."""+ control = [1.0, 2.0, 3.0, 4.0]+ treatment = [4.0, 1.0, 3.0, 2.0]+ assert _log_bf(control, treatment, 0.3) == pytest.approx(-0.5 * math.log(1 + 2 * 0.3))++ def test_statistic_is_scale_and_location_invariant(self):+ """What makes it a martingale under H0 for every sigma."""+ control = [0.80, 0.83, 0.77, 0.81, 0.79, 0.84]+ treatment = [0.78, 0.74, 0.79, 0.76, 0.80, 0.73]+ moved_c = [1000.0 * x - 55.0 for x in control]+ moved_t = [1000.0 * x - 55.0 for x in treatment]+ assert _log_bf(moved_c, moved_t, 0.7) == pytest.approx(+ _log_bf(control, treatment, 0.7), rel=1e-9+ )++ def test_statistic_is_symmetric_in_the_sign_of_the_difference(self):+ control = [0.80, 0.83, 0.77, 0.81, 0.79, 0.84]+ up = [x + 0.05 for x in control]+ down = [x - 0.05 for x in control]+ assert _log_bf(control, up, 1.0) == pytest.approx(_log_bf(control, down, 1.0))++ def test_huge_evidence_stays_finite(self):+ control = [0.80, 0.82, 0.78, 0.81, 0.79] * 200+ verdict = _step(control, [x - 0.30 for x in control])+ assert math.isfinite(verdict.log_likelihood_ratio)+ assert verdict.decision == "reject_h0"+++# ---------------------------------------------------------------------------+# The held-out rows set the prior scale and nothing else+# ---------------------------------------------------------------------------+++_CONTROL = [0.80, 0.83, 0.77, 0.81, 0.79, 0.84, 0.78, 0.82, 0.80, 0.76, 0.83, 0.79]+_TREATMENT = [0.78, 0.74, 0.79, 0.76, 0.80, 0.73, 0.77, 0.75, 0.79, 0.74, 0.76, 0.78]+++def _sd(values_c, values_t):+ import statistics++ return math.sqrt((statistics.variance(values_c) + statistics.variance(values_t)) / 2)+++class TestPriorScale:+ def test_the_first_five_rows_per_arm_are_held_out(self):+ """Chosen by the sweep in benchmarks/gate-1265-ab-nig.md; re-run it to change."""+ from soup_cli.utils.ab_test import PRIOR_SCALE_ROWS++ assert PRIOR_SCALE_ROWS == 5++ def test_the_docs_give_the_same_row_counts(self):+ """docs/evaluation.md states both counts in words; they follow the constant."""+ from pathlib import Path++ from soup_cli.utils.ab_test import PRIOR_SCALE_ROWS++ docs = (Path(__file__).parent.parent / "docs" / "evaluation.md").read_text(+ encoding="utf-8"+ )+ assert f"the first {PRIOR_SCALE_ROWS} rows of each arm" in docs+ assert f"from {PRIOR_SCALE_ROWS + 2} rows per arm" in docs++ @pytest.mark.parametrize("effect_size", [0.01, 0.1, 2.0])+ def test_statistic_runs_on_the_rows_after_them(self, effect_size):+ s0 = _sd(_CONTROL[:5], _TREATMENT[:5])+ expected = _log_bf(_CONTROL[5:], _TREATMENT[5:], (effect_size / s0) ** 2)+ verdict = _step(_CONTROL, _TREATMENT, effect_size=effect_size)+ assert verdict.log_likelihood_ratio == pytest.approx(expected, rel=1e-12)++ def test_held_out_values_enter_only_through_their_spread(self):+ """Moving the held-out rows (not their spread) leaves the statistic alone."""+ moved_c = [x + 7.0 for x in _CONTROL[:5]] + _CONTROL[5:]+ moved_t = [x - 3.0 for x in _TREATMENT[:5]] + _TREATMENT[5:]+ assert _step(moved_c, moved_t).log_likelihood_ratio == pytest.approx(+ _step(_CONTROL, _TREATMENT).log_likelihood_ratio, rel=1e-12+ )++ def test_whole_arm_means_are_reported(self):+ verdict = _step(_CONTROL, _TREATMENT)+ assert verdict.n_control == len(_CONTROL)+ assert verdict.mean_control == pytest.approx(sum(_CONTROL) / len(_CONTROL))+ assert verdict.mean_treatment == pytest.approx(sum(_TREATMENT) / len(_TREATMENT))++ @pytest.mark.parametrize(("n_control", "n_treatment"), [(6, 12), (12, 6), (6, 6)])+ def test_each_arm_needs_two_rows_after_the_held_out_ones(self, n_control, n_treatment):+ verdict = _step(_CONTROL[:n_control], [x - 0.3 for x in _TREATMENT[:n_treatment]])+ assert verdict.decision == "continue"+ assert verdict.log_likelihood_ratio == 0.0++ def test_seven_rows_per_arm_can_already_decide(self):+ """No burn-in: 5 held out + 2 tested rows per arm can reject a clear shift."""+ control = [0.80, 0.82, 0.78, 0.81, 0.79, 0.80, 0.81]+ verdict = _step(control, [x - 0.30 for x in control])+ assert verdict.decision == "reject_h0"+ assert verdict.direction == "worse"++ def test_constant_held_out_rows_extend_until_one_arm_varies(self):+ """A pooled SD of 0 would make the prior infinitely wide: hold out more rows."""+ control = [1.0] * 7 + [1.1, 0.9, 1.05, 0.95, 1.0, 1.1, 0.9]+ treatment = [1.0] * 8 + [1.3, 1.2, 1.25, 1.35, 1.3, 1.2]+ # control first varies at row 8, so 8 rows per arm are held out.+ s0 = _sd(control[:8], treatment[:8])+ expected = _log_bf(control[8:], treatment[8:], (0.1 / s0) ** 2)+ assert _step(control, treatment).log_likelihood_ratio == pytest.approx(expected)++ def test_never_varying_arms_give_no_verdict(self):+ verdict = _step([1.0] * 50, [2.0] * 50)+ assert verdict.decision == "continue"+ assert verdict.log_likelihood_ratio == 0.0++ def test_constant_tested_rows_give_no_verdict(self):+ """Varying held-out rows, but t is 0 / 0 on the rows after them."""+ verdict = _step([1.0, 1.1, 0.9, 1.0, 1.0] + [1.0] * 10, [1.0] * 5 + [2.0] * 10)+ assert verdict.decision == "continue"+ assert verdict.log_likelihood_ratio == 0.0+++# ---------------------------------------------------------------------------+# Boundaries: reject at 1/alpha (Ville), accept at beta / (1 - alpha)+# ---------------------------------------------------------------------------+++class TestBoundaries:+ def test_reject_boundary_is_one_over_alpha_whatever_beta(self, monkeypatch):+ from soup_cli.utils import ab_test++ for alpha in (0.05, 0.01, 0.001):+ for beta in (0.05, 0.2, 0.5):+ edge = math.log(1.0 / alpha)+ for llr, decision in ((edge, "reject_h0"), (edge - 1e-9, "continue")):+ monkeypatch.setattr(ab_test, "_nig_log_bayes_factor", lambda **_: llr)+ got = _step(_CONTROL, _TREATMENT, alpha=alpha, beta=beta)+ assert got.decision == decision, (alpha, beta, llr)++ def test_accept_boundary_is_beta_over_one_minus_alpha(self, monkeypatch):+ from soup_cli.utils import ab_test++ edge = math.log(0.20 / 0.95)+ for llr, decision in ((edge, "accept_h0"), (edge + 1e-9, "continue")):+ monkeypatch.setattr(ab_test, "_nig_log_bayes_factor", lambda **_: llr)+ assert _step(_CONTROL, _TREATMENT).decision == decision, llr++ @pytest.mark.parametrize(+ ("alpha", "beta"), [(0.05, 0.2), (0.01, 0.1), (0.5, 0.49), (0.05, 0.9499)]+ )+ def test_an_allowed_pair_accepts_only_on_evidence_for_h0(self, alpha, beta):+ """#1339's alpha + beta < 1 is what keeps the accept boundary below BF 1.++ Under #1227's statistic the same bound kept the two boundaries from+ crossing; here the reject boundary 1 / alpha is always above 1, and the+ bound matters because the accept boundary must stay under it.+ """+ from soup_cli.utils.ab_test import MsprtConfig++ config = MsprtConfig(metric="judge_score", alpha=alpha, beta=beta)+ assert math.log(config.beta / (1.0 - config.alpha)) < 0.0++ def test_a_near_constant_held_out_column_is_refused_not_accepted(self):+ """#1339 in the NIG path: the scale comes from the held-out rows only.++ Rows 0 and 1e-160 put ``effect_size / s0`` past the float range while the+ tested rows vary normally. Without the guard, squaring that ratio raises a+ bare OverflowError; and ``effect_size**2 / s0**2``, the form before the+ guard, does not raise at all: the prior variance is inf, the Bayes factor+ -inf, and the verdict a silent ``accept_h0``.+ """+ held_out = [0.0, 1e-160, 0.0, 1e-160, 0.0]+ with pytest.raises(ValueError) as exc:+ _step(held_out + _CONTROL[5:], held_out + _TREATMENT[5:])+ message = str(exc.value)+ assert "--effect-size" in message+ assert "judge_score" in message++ def test_an_overflowing_effect_is_refused_before_the_prior_scale_is_complete(self):+ """Three rows per arm: the scale is checked on the rows so far."""+ with pytest.raises(ValueError, match="--effect-size"):+ _step(_CONTROL[:3], _TREATMENT[:3], effect_size=1e200)++ def test_too_few_rows_for_any_scale_still_continue(self):+ assert _step(_CONTROL[:1], _TREATMENT[:1], effect_size=1e200).decision == "continue"++ @pytest.mark.parametrize(("shift", "direction"), [(-0.1, "worse"), (0.1, "better")])+ def test_direction_comes_from_the_tested_rows(self, shift, direction):+ """Held-out rows pulling the whole-arm means the other way do not flip it."""+ control = [5.0, 5.02, 4.98, 5.01, 4.99] + _CONTROL[5:]+ treatment = [0.0, 0.02, -0.02, 0.01, -0.01] + [x + shift for x in _CONTROL[5:]]+ verdict = _step(control, treatment, effect_size=0.05)+ assert verdict.mean_treatment < verdict.mean_control # whole arms: always lower+ assert verdict.decision == "reject_h0", verdict+ assert verdict.direction == direction+++class TestNonFiniteStatistic:+ """Values a float cannot carry are refused, not decided on (#1419 review)."""++ def test_huge_means_are_refused_not_a_bare_overflow(self):+ control = [-1e154 * (1 + k * 1e-10) for k in range(12)]+ treatment = [1e154 * (1 + k * 1e-10) for k in range(12)]+ with pytest.raises(ValueError, match="judge_score"):+ _step(control, treatment)++ def test_near_constant_tested_rows_are_refused_not_a_nan_continue(self):+ held = [0.1, 0.2, 0.3, 0.4, 0.5]+ with pytest.raises(ValueError, match="judge_score"):+ _step(held + [0.0, 1e-160] * 10, held + [1e-5] * 20)++ def test_a_prior_scale_just_under_the_bound_is_never_minus_inf(self):+ held = [0.0, 1.83e-155, 0.0, 1.83e-155, 0.0] # effect_size / s0 ~ 1.0e154+ rest = _CONTROL[5:]+ try:+ verdict = _step(held + rest, held + [x + 5.0 for x in rest])+ except ValueError as exc:+ assert "--effect-size" in str(exc) or "judge_score" in str(exc)+ else:+ assert math.isfinite(verdict.log_likelihood_ratio), verdict++ def test_held_out_rows_whose_variance_underflows_to_zero_are_refused(self):+ """They differ, so no more rows are held out, but their variance is 0.0 in floats."""+ held = [0.0, 1e-170, 0.0, 1e-170, 0.0]+ rest = _CONTROL[5:]+ with pytest.raises(ValueError, match="spread is below"):+ _step(held + rest, held + [x + 5.0 for x in rest])++ def test_one_arm_differing_is_enough_for_that_refusal(self):+ """The other arm's held-out rows all equal, as a warm cache gives."""+ rest = _CONTROL[5:]+ with pytest.raises(ValueError, match="spread is below"):+ _step([0.0, 1e-170, 0.0, 1e-170, 0.0] + rest, [0.0] * 5 + [x + 5.0 for x in rest])++ def test_the_treatment_arm_differing_is_enough_too(self):+ """The mirror of the control-arm case: control's held-out rows all equal."""+ rest = _CONTROL[5:]+ with pytest.raises(ValueError, match="spread is below"):+ _step([0.0] * 5 + rest, [0.0, 1e-170, 0.0, 1e-170, 0.0] + [x + 5.0 for x in rest])++ def test_the_round_one_f3_input_never_accepts_h0_at_any_peek(self):+ """The same rows, replayed one row at a time, the way soup ab is meant to be run."""+ from soup_cli.utils.ab_test import PRIOR_SCALE_ROWS++ held = [0.0, 1.83e-155, 0.0, 1.83e-155, 0.0]+ rest = _CONTROL[5:]+ control, treatment = held + rest, held + [x + 5.0 for x in rest]+ for n in range(PRIOR_SCALE_ROWS + 2, len(control) + 1):+ try:+ verdict = _step(control[:n], treatment[:n])+ except ValueError:+ continue+ assert verdict.decision != "accept_h0", (n, verdict)++ def test_an_oversized_flag_on_ordinary_rows_names_the_flag_not_the_spread(self):+ """The two --effect-size refusals are told apart by the held-out variance."""+ with pytest.raises(ValueError) as exc:+ _step(_CONTROL, _TREATMENT, effect_size=1e160)+ message = str(exc.value)+ assert "Lower --effect-size" in message+ assert "spread is below" not in message++[email protected](("factor", "refused"), [(0.99, False), (1.01, True)])+def test_the_prior_bound_sits_at_the_largest_n_eff_the_tool_accepts(factor, refused):+ """sqrt(float max / (1,000,000 / 2)) standard deviations, about 1.9e151, and no further."""+ import sys++ held = [0.0, 1.0, 0.0, 1.0, 0.0] # pooled variance 0.3 in both arms+ bound = math.sqrt(sys.float_info.max / (1_000_000 / 2))+ effect_size = factor * bound * math.sqrt(0.3)+ control, treatment = held + _CONTROL[5:], held + _CONTROL[5:]+ if refused:+ with pytest.raises(ValueError, match="Lower --effect-size"):+ _step(control, treatment, effect_size=effect_size)+ else:+ _step(control, treatment, effect_size=effect_size)+++# A saturated start: the first rows barely vary (a warm cache, a judge that gives+# 1.0 early), then ordinary rows. Seeded Gaussian rows, sd 0.03, rounded.+_SATURATED_C = [1.0, 1.0, 1.0, 1.0, 0.99]+_SATURATED_T = [1.0] * 5+_ORDINARY_C = [0.792, 0.815, 0.793, 0.791, 0.772, 0.794, 0.833, 0.813, 0.831, 0.807,+ 0.812, 0.806, 0.75, 0.826, 0.815, 0.815, 0.749, 0.748, 0.773, 0.786]+_ORDINARY_T = [0.818, 0.782, 0.786, 0.762, 0.771, 0.784, 0.839, 0.739, 0.756, 0.807,+ 0.843, 0.817, 0.743, 0.724, 0.811, 0.778, 0.766, 0.829, 0.833, 0.805]+++def _peeks(control, treatment, **kwargs):+ """Every verdict from 7 rows per arm on, one row at a time."""+ return [_step(control[:n], treatment[:n], **kwargs) for n in range(7, len(control) + 1)]+++class TestAcceptHold:+ """accept_h0 waits while the tested rows spread far more than the held-out ones."""++ @pytest.mark.parametrize("shift", [0.0, -0.03], ids=["no-difference", "worse"])+ def test_a_saturated_start_never_accepts_h0(self, shift, monkeypatch):+ from soup_cli.utils import ab_test++ control = _SATURATED_C + _ORDINARY_C[5:]+ treatment = _SATURATED_T + [x + shift for x in _ORDINARY_T[5:]]+ assert all(v.decision != "accept_h0" for v in _peeks(control, treatment))+ # The premise: without the hold, both accept at the first peek.+ monkeypatch.setattr(ab_test, "ACCEPT_HOLD_SPREAD_RATIO", math.inf)+ assert _peeks(control, treatment)[0].decision == "accept_h0"++ def test_the_same_tested_rows_with_ordinary_held_out_rows_still_accept(self):+ verdict = _step(_ORDINARY_C[:7], _ORDINARY_T[:7])+ assert verdict.decision == "accept_h0", verdict++ def test_a_reject_is_never_held_back(self):+ """A saturated start with a clear shift still rejects, with its direction."""+ control = _SATURATED_C + _ORDINARY_C[5:]+ treatment = _SATURATED_T + [x - 0.3 for x in _ORDINARY_T[5:]]+ verdicts = [v for v in _peeks(control, treatment) if v.decision != "continue"]+ assert verdicts and verdicts[0].decision == "reject_h0"+ assert verdicts[0].direction == "worse"++ def test_the_ratio_is_three(self):+ from soup_cli.utils.ab_test import ACCEPT_HOLD_SPREAD_RATIO++ assert ACCEPT_HOLD_SPREAD_RATIO == 3.0++ def test_gaussian_rows_rarely_change_and_rejects_never_do(self, monkeypatch):+ """600 seeded runs of Gaussian rows, first verdict with and without the hold."""+ import random++ from soup_cli.utils import ab_test++ def first(control, treatment, effect_size, ratio):+ monkeypatch.setattr(ab_test, "ACCEPT_HOLD_SPREAD_RATIO", ratio)+ for v in _peeks(control, treatment, effect_size=effect_size):+ if v.decision != "continue":+ return v.decision, v.direction, v.n_control+ return None++ changed = 0+ for effect_size, shift in ((1.0, 0.0), (2.0, 0.0), (1.0, 1.0)):+ for seed in range(200):+ rng = random.Random(1_265_000 + seed)+ control = [rng.gauss(0.0, 1.0) for _ in range(60)]+ treatment = [rng.gauss(shift, 1.0) for _ in range(60)]+ held = first(control, treatment, effect_size, 3.0)+ free = first(control, treatment, effect_size, math.inf)+ if free is not None and free[0] == "reject_h0":+ assert held == free, (effect_size, shift, seed)+ changed += held != free+ assert changed <= 6, changed # 1% of 600; 2 on this seed range+++# ---------------------------------------------------------------------------+# Type-I error and power under peeking (seeded Monte-Carlo)+# ---------------------------------------------------------------------------+#+# The operator re-runs `soup ab` after every new (control, treatment) pair and+# stops at the first terminal verdict; runs stop at 200 rows per arm. The+# statistic is vectorised with numpy (msprt_step on raw rows at every peek is+# O(n) per call); test_msprt_step_replays_the_simulated_runs ties it back to+# the shipped code run by run.++_N_MAX = 200+++def _simulate(np, *, ratio, shift_in_effects, reps, seed, alpha, beta=0.20, effect_size=0.1):+ """First verdict per run: (decision, direction, rows per arm), or None if undecided."""+ from soup_cli.utils.ab_test import PRIOR_SCALE_ROWS++ held = PRIOR_SCALE_ROWS+ rng = np.random.default_rng(seed)+ sigma = effect_size / ratio+ control = rng.normal(0.0, sigma, size=(reps, _N_MAX))+ treatment = rng.normal(shift_in_effects * effect_size, sigma, size=(reps, _N_MAX))+ s0_sq = (control[:, :held].var(axis=1, ddof=1) + treatment[:, :held].var(axis=1, ddof=1)) / 2+ g = (effect_size**2 / s0_sq)[:, None]+ rest_c, rest_t = control[:, held:], treatment[:, held:]+ rows = np.arange(1, rest_c.shape[1] + 1, dtype=float)+ mean_c = np.cumsum(rest_c, axis=1) / rows+ mean_t = np.cumsum(rest_t, axis=1) / rows+ sum_sq = (np.cumsum(rest_c**2, axis=1) - rows * mean_c**2) + (+ np.cumsum(rest_t**2, axis=1) - rows * mean_t**2+ )+ rows, mean_c, mean_t, sum_sq = rows[1:], mean_c[:, 1:], mean_t[:, 1:], sum_sq[:, 1:]+ nu, n_eff = 2 * rows - 2, rows / 2+ t_sq = (mean_t - mean_c) ** 2 * n_eff * nu / sum_sq+ spread = 1 + n_eff * g+ log_bf = -0.5 * np.log(spread) - 0.5 * (nu + 1) * (+ np.log1p(t_sq / (nu * spread)) - np.log1p(t_sq / nu)+ )+ upper, lower = math.log(1 / alpha), math.log(beta / (1 - alpha))+ outcomes = []+ for run in range(reps):+ hits = np.flatnonzero((log_bf[run] >= upper) | (log_bf[run] <= lower))+ if hits.size == 0:+ outcomes.append(None)+ continue+ col = int(hits[0])+ if log_bf[run, col] >= upper:+ higher = mean_t[run, col] > mean_c[run, col]+ outcomes.append(("reject_h0", "better" if higher else "worse", held + col + 2))+ else:+ outcomes.append(("accept_h0", None, held + col + 2))+ return {"outcomes": outcomes, "control": control, "treatment": treatment}+++def _rate(outcomes, decision="reject_h0"):+ return sum(1 for o in outcomes if o is not None and o[0] == decision) / len(outcomes)+++class TestUnderPeeking:+ @pytest.mark.parametrize(+ ("ratio", "alpha", "seed"),+ [+ (0.35, 0.05, 3101), # the burn-in design's worst ratio at alpha 0.05+ (1.0, 0.05, 3102), # 0.164 at alpha 0.05 with the #1227 statistic and no burn-in+ (0.4, 0.01, 3103), # the burn-in design's worst ratio at alpha 0.01+ (1.0, 0.005, 3104), # below 0.01, where the burn-in was not calibrated+ ],+ )+ def test_type_one_error_stays_within_alpha_from_the_first_rows(self, ratio, alpha, seed):+ """H0, a peek after every pair from 7 rows per arm on, no burn-in.++ benchmarks/gate-1265-ab-nig.md records the full sweep (100,000 runs per+ ratio, horizons 200 and 1000). 3000 runs put the bound at alpha + 3 SE.+ """+ np = pytest.importorskip("numpy")+ reps = 3000+ sim = _simulate(np, ratio=ratio, shift_in_effects=0.0, reps=reps, seed=seed, alpha=alpha)+ rate = _rate(sim["outcomes"])+ bound = alpha + 3 * math.sqrt(alpha * (1 - alpha) / reps)+ assert rate <= bound, (rate, bound)++ def test_false_rejections_fall_on_both_sides(self):+ np = pytest.importorskip("numpy")+ sim = _simulate(np, ratio=0.35, shift_in_effects=0.0, reps=6000, seed=3105, alpha=0.10)+ sides = [o[1] for o in sim["outcomes"] if o is not None and o[0] == "reject_h0"]+ assert len(sides) >= 60, len(sides)+ assert 0.3 <= sides.count("better") / len(sides) <= 0.7++ def test_verdicts_come_well_before_the_old_burn_in(self):+ """The #1227 design gave nothing before 30 rows per arm; this one need not wait."""+ np = pytest.importorskip("numpy")+ sim = _simulate(np, ratio=2.0, shift_in_effects=1.0, reps=1000, seed=3106, alpha=0.05)+ decided = [o for o in sim["outcomes"] if o is not None]+ assert sum(o[2] < 30 for o in decided) >= 0.9 * len(sim["outcomes"])++ @pytest.mark.parametrize(("ratio", "min_power"), [(0.5, 0.75), (1.0, 0.95)])+ def test_power_against_the_asked_for_effect(self, ratio, min_power):+ """True difference = +effect_size: reject as `better` (judge_score) within 200 rows.++ Full numbers side by side with the burn-in design: benchmarks/gate-1265-ab-nig.md.+ """+ np = pytest.importorskip("numpy")+ sim = _simulate(np, ratio=ratio, shift_in_effects=1.0, reps=1000, seed=3107, alpha=0.05)+ right = sum(1 for o in sim["outcomes"] if o is not None and o[:2] == ("reject_h0",+ "better"))+ assert right / len(sim["outcomes"]) >= min_power++ def test_msprt_step_replays_the_simulated_runs(self):+ """Whole runs through the real `msprt_step` give the simulation's first verdicts."""+ np = pytest.importorskip("numpy")+ sim = _simulate(np, ratio=2.0, shift_in_effects=0.3, reps=300, seed=3108, alpha=0.05)+ picked = np.random.default_rng(4).choice(300, 30, replace=False).tolist()+ expected = [sim["outcomes"][run] for run in picked]+ assert sum(o is not None for o in expected) >= 25+ assert {o[0] for o in expected if o is not None} == {"reject_h0", "accept_h0"}+ for run, want in zip(picked, expected):+ replayed = None+ for rows in range(2, _N_MAX + 1):+ verdict = _step(+ sim["control"][run, :rows].tolist(), sim["treatment"][run, :rows].tolist()+ )+ if verdict.decision != "continue":+ replayed = (verdict.decision, verdict.direction, verdict.n_control)+ break+ assert replayed == want, run+++# ---------------------------------------------------------------------------+# CLI: the #1227 calibration warnings are gone with the burn-in+# ---------------------------------------------------------------------------+++def _run_cli(tmp_path, monkeypatch, control, treatment, extra=()):+ import json++ from soup_cli.cli import app++ monkeypatch.chdir(tmp_path)+ rows = [{"arm": "control", "judge_score": x} for x in control]+ rows += [{"arm": "treatment", "judge_score": round(x, 6)} for x in treatment]+ (tmp_path / "ab.jsonl").write_text("\n".join(json.dumps(r) for r in rows), encoding="utf-8")+ return runner.invoke(app, ["ab", "--input", "ab.jsonl", "--metric", "judge_score", *extra])+++class TestCli:+ @pytest.mark.parametrize(+ ("rows", "extra"),+ [(40, ("--alpha", "0.005")), (1001, ()), (12, ("--alpha", "0.001"))],+ )+ def test_no_calibration_warning_at_any_alpha_or_length(self, tmp_path, monkeypatch, rows,+ extra):+ pattern = ([0.80, 0.82, 0.78, 0.81, 0.79] * 201)[:rows]+ result = _run_cli(tmp_path, monkeypatch, pattern, [x - 0.30 for x in pattern], extra)+ assert result.exit_code == 0, (result.output, repr(result.exception))+ out = _plain(result.output)+ assert "Warning" not in out+ assert "calibrated" not in out+ assert "burn" not in out.lower()+ assert "direction worse" in out+ assert "prior_scale first 5 rows per arm" in out++ def test_alpha_help_no_longer_describes_a_burn_in(self):+ from soup_cli.cli import app++ result = runner.invoke(app, ["ab", "--help"])+ out = _plain(result.output)+ assert "burn-in" not in out+ assert "re-run after every new row" in out