Skip to content

Forecast Explainability & Driver Attribution slice #224

@w7-mgfcode

Description

@w7-mgfcode

New app/features/explainability/ vertical slice — rule-based, deterministic forecast explanations for the three baseline forecasters (naive / seasonal_naive / moving_average).

Scope:

  • Driver-contribution attribution (each explainer reproduces its forecaster's exact h=1 value) + advisory retail reason codes (stockout / promotion / lifecycle / holiday / insufficient-history), computed time-safely (<= as_of_date)
  • forecast_explanation persistence table + Alembic migration + alembic/env.py registration
  • 3 endpoints: GET /explain/runs/{run_id}, GET /explain/jobs/{job_id}, POST /explain/forecast
  • Frontend explanation panels on the run-detail and forecast pages
  • SHAP deliberately out of scope (rule-based MVP; adding it would need its own PRP + ADR)

Plan: PRPs/PRP-28-forecast-explainability-driver-attribution.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions