P2 diagnosis on dev, P3 dev experiments, lock protocol_p3

- P2: SMC tie posterior (numpy + torch), RML/soft-DTW losses, bank training,
  D2 synthetic generator, scripts 09-13, protocol_p2 (locked) and its outcome
  (G-B failed; H1 not rejected, H3 rejected, H4 not rejected).
- Diagnosis on dev realizations 900/901 only (scripts 14-17, run_p3_dev.sh):
  posterior screen, SMC stability (P = 1024, K = 1), sigma_a misspecification
  stress and training, H3 with the SMC posterior, F3 placement on sigma_post.
- protocol_p3: H2 split into H2a (posterior-mean labels vs point ties) and
  H2b (RML vs posterior mean as a function of sigma_post); H3 descriptive only;
  sigma_a arm; new D2 config d2_synth_p3.yaml; main grid on realizations 8-15.
  Locked by configs/protocol_p3.sha256 and tag protocol-p3.
- runlog: per-run logs and runtime index (logs/index.csv).
- Docs: plan §12 items 10-11, theory, technical overview, report; wording
  aligned with Gunning & Glinsky (2006): the tie posterior is not claimed as new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 06:03:33 +00:00
parent a76e61398a
commit cee2ff0859
84 changed files with 8793 additions and 460 deletions

View File

@@ -8,7 +8,7 @@ from ml_porosity.paths import f3_root, f3_segy
pytestmark = [
pytest.mark.data,
pytest.mark.skipif(not f3_segy().exists(), reason="thiếu F3_entire.segy"),
pytest.mark.skipif(not f3_segy().exists(), reason="missing F3_entire.segy"),
]
@@ -21,7 +21,7 @@ def cube():
def test_axes(cube):
assert (cube.ilines[0], cube.ilines[-1], len(cube.ilines)) == (100, 750, 651)
assert (cube.xlines[0], cube.xlines[-1], len(cube.xlines)) == (300, 1250, 951)
# DelayRecordingTime = 4 ms: mẫu đầu ở 4 ms, không phải 0
# DelayRecordingTime = 4 ms: the first sample is at 4 ms, not 0
assert cube.times_ms[0] == 4.0 and cube.dt_ms == 4.0 and len(cube.times_ms) == 462
@@ -30,7 +30,7 @@ def test_trace_index_matches_headers(cube, il, xl):
idx = cube._index(il, xl)
h = cube._f.header[idx]
assert (h[segyio.TraceField.INLINE_3D], h[segyio.TraceField.CROSSLINE_3D]) == (il, xl)
# Tọa độ trong header (scalar −100) khớp phép biến đổi của .survey
# Header coordinates (scalar −100) match the .survey transform
geom = SurveyGeometry.from_survey(f3_root())
x, y = geom.bin_to_xy(il, xl)
assert h[segyio.TraceField.CDP_X] / 100 == pytest.approx(x, abs=0.5)