feat: regime-switch runner for claims A1 and A2 (spec §8)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BoDVQE6PnU9Mt9uikRy7pD
This commit is contained in:
chrnxandClaude Sonnet 5 committed 2026-09-02 07:44:52 -05:00
1 parent 8dc20c8446
commit 0d074a5d6e
2 files changed
+148

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import pytest
from regime import CONDITIONS, run
@pytest.mark.parametrize("name", sorted(CONDITIONS))
def test_every_condition_runs(name):
res = run(name, seed=0, steps=300, window=5, bptt=10)
assert len(res["recovery"]) == 5
assert res["steady"] >= 0.0
assert res["n_switches"] >= 1
def test_rp_only_has_no_memory_and_zero_kappa():
assert CONDITIONS["rp_only"]["memory"] is False
assert CONDITIONS["grp_k0"]["kappa"] == 0.0
assert CONDITIONS["grp_flag"]["kappa"] == 0.0 and CONDITIONS["grp_flag"]["oracle"] == "change"
assert CONDITIONS["grp_regime"]["kappa"] == 0.0 and CONDITIONS["grp_regime"]["oracle"] == "regime"