The three neighbouring applications out of the published branch: the NLMS step size (anc), the ODE step controllers (odestep) and the relaxation factor (relax), with the six stage scripts that drive them and the five tests that cover them. They are not part of the root-finding paper and no document refers to them. stage18_bulletproof.py keeps claim A and loses claim B; tests/test_bulletproof.py loses the one test that reached into anc. Server: verify 548 OK / 0 BAD, tests x2 1205 passed (was 1240 with the three).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
vvs
2026-09-25 10:02:18 +01:00
co-authored by Claude Opus 5
parent 886b3f4244
commit 8ad09b47a6
22 changed files with 2 additions and 2335 deletions
-36
View File
@@ -123,39 +123,3 @@ def test_the_scope_of_the_claim_is_repairs_not_the_field():
t, _s2, _w2 = score(lambda f, a, b, xt, mx, _m=better: _m(f, a, b, xt,
mx))
assert t < c_total, (better.__name__, t, c_total)
# --------------------------------------------------------------------------
# the claim that does NOT survive, pinned so it is not overstated
# --------------------------------------------------------------------------
def test_the_anc_claim_is_not_uniform_and_must_be_stated_as_such():
"""Against a Kwong-Johnston oracle tuned per scenario the measured step
size wins on the mean (19.14 dB against 17.51) but on only four of ten
cells, and the mean is carried by two of them. It is a real result and
it is not bullet-proof; this test exists so the difference is not blurred."""
import numpy as np
from anc.bench import SCENARIOS, make_primary_path, make_secondary_path, \
run_nlms
from anc.rules import Measured
from stage18_bulletproof import KJTuned, KJ_GRID
wins = cells = 0
for _sname, gen in SCENARIOS:
for snr in (30.0, 15.0):
def sc(rule):
vals = []
for s in range(3):
rng = np.random.default_rng(1000 + s)
noise = gen(8000, rng)
nr = run_nlms(noise, make_primary_path(rng),
make_secondary_path(rng), rule,
snr_db=snr, seed=s)
if math.isfinite(nr):
vals.append(nr)
return sum(vals) / len(vals)
ours = sc(Measured())
best_kj = max(sc(KJTuned(a, g)) for a, g in KJ_GRID)
cells += 1
wins += ours > best_kj
assert 0 < wins < cells, (wins, cells)