Skip to content

feat: forecast level/debias check, prior blend, and approach scoring#389

Merged
bartzbeielstein merged 1 commit into
mainfrom
feat/forecast-level-blend-compare
Jun 14, 2026
Merged

feat: forecast level/debias check, prior blend, and approach scoring#389
bartzbeielstein merged 1 commit into
mainfrom
feat/forecast-level-blend-compare

Conversation

@bartzbeielstein

Copy link
Copy Markdown
Collaborator

What

Three pure additions to spotforecast2_safe.processing, from the 2026-06-13 team_4 post-mortem (a flat all-day over-prediction on a low-load Saturday the four-zone setup could not catch):

Symbol Purpose
shape_check.check_forecast_level / LevelCheckReport / apply_level_correction Detect + remove a systematic flat level offset (complements the existing profile/shape check).
blend.blend_with_prior Convex post-hoc blend of a model forecast with an external prior — the correct lever for down-weighting a near-oracle prior, since tree models are invariant to monotonic feature scaling.
forecast_scoring.score_forecasts Tidy approach×metric table ranking competing forecasts (e.g. 4-zone bottom-up sum vs single combined model) against a shared actual.

Placement

All pure pandas/numpy — no forbidden deps (plotly/matplotlib/spotoptim/optuna/torch/tensorflow), so they live in sf2-safe.

Verification

  • 67 new unit tests; full suite 2755 passed, 1 skipped.
  • Registered in _quarto.yml + regenerated docs/reference/ (API-Reference-In-Sync gate).
  • ruff / black / isort / reuse lint clean.

🤖 Generated with Claude Code

… processing

Three pure additions to spotforecast2_safe.processing, motivated by the
2026-06-13 team_4 post-mortem (a flat all-day over-prediction on a low-load
Saturday the four-zone setup could not catch):

- shape_check.check_forecast_level / LevelCheckReport / apply_level_correction:
  detect and remove a systematic flat level offset; complements the existing
  profile/shape check.
- blend.blend_with_prior: convex post-hoc blend of a model forecast with an
  external prior — the correct lever for down-weighting a near-oracle prior,
  since tree models are invariant to monotonic feature scaling.
- forecast_scoring.score_forecasts: tidy approach-by-metric table ranking
  competing forecasts (e.g. 4-zone bottom-up sum vs single combined model)
  against a shared actual.

Pure pandas/numpy, no forbidden deps; registered in the quartodoc API
reference; 67 new unit tests; full suite green (2755 passed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bartzbeielstein bartzbeielstein merged commit 165d5de into main Jun 14, 2026
11 checks passed
@bartzbeielstein bartzbeielstein deleted the feat/forecast-level-blend-compare branch June 14, 2026 14:46
bartzbeielstein pushed a commit that referenced this pull request Jun 14, 2026
## [22.9.0](v22.8.0...v22.9.0) (2026-06-14)

### Features

* add forecast level/debias, prior blend, and approach scoring to processing ([#389](#389)) ([165d5de](165d5de))
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