feat: regime-switch runner for claims A1 and A2 (spec §8)
This commit is contained in:
1 parent
8a59473025
commit
ba1b036635
2 files changed
+148
No files matched your search
@@ -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"
|
||||
Reference in new issue
Block a user