Skip to content

Add paired distance venue-regime evidence#75

Open
khtad wants to merge 2 commits intomainfrom
codex/rolling-venue-regime-pr2
Open

Add paired distance venue-regime evidence#75
khtad wants to merge 2 commits intomainfrom
codex/rolling-venue-regime-pr2

Conversation

@khtad
Copy link
Copy Markdown
Owner

@khtad khtad commented May 4, 2026

Summary

  • Add paired/stratified distance-location evidence in src/venue_bias.py, comparing visiting-team corrected distances at a venue against those same teams' away shots elsewhere in the same season.
  • Wire the DB-backed venue scorecard runner to build the diagnostic from in-memory prior-corrected distances without mutating shot_events or venue_bias_corrections.
  • Add a Distance-Location Paired Diagnostics section to the Markdown artifact and refresh the live artifact.
  • Refresh roadmap/component docs plus the venue-scorekeeper-bias KB page, index, and log.

Residual-regime failure

The residual gate still fails in regime-aware mode, but not because max |z| >= 2 is an automatic veto. The remaining blockers are candidate venue-seasons classified as blocking (unexplained_or_confounded, population_shift_detected, or insufficient_evidence) rather than supported persistent_bias or temporary_supported_regime.

Latest artifact result:

  • Held-out log-loss: PASS (delta = -0.000015)
  • Home-ice over-correction: PASS (removed = -0.013, limit 0.500)
  • Distance/location residuals: FAIL (10 blocking regimes, 18 supported regimes, max |z| = 4.067)
  • Event-frequency residuals: FAIL (5 blocking regimes, 22 supported regimes, max |z| = 3.572)
  • Distance paired diagnostics: 28 candidate residuals, 17 supported by paired visiting-team evidence

Verification

  • wsl bash -lc "python3 -m venv /tmp/test-venv && /tmp/test-venv/bin/pip install -q pytest requests numpy scipy scikit-learn && /tmp/test-venv/bin/python -m pytest -q tests/test_venue_bias.py tests/test_validation.py tests/test_venue_correction_validation_export.py tests/test_venue_correction_validation_from_db.py" -> 81 passed
  • python scripts/check_knowledge_base_update.py --base-ref origin/main -> passed
  • git diff --check origin/main...HEAD -> clean
  • git diff --check -> clean

Knowledge base

Updated knowledge_base/wiki/concepts/venue-scorekeeper-bias.md, knowledge_base/index.md, and knowledge_base/log.md for the paired/stratified distance evidence and refreshed live scorecard result.

@khtad khtad changed the title Document regime-aware venue correction status Add paired distance venue-regime evidence May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant