Powerwise

Project context

GLAX pipeline — project context & roadmap

Results-anchored, stat-informed rankings for Missouri girls HS lacrosse. Complements powerwise_lax (published Powerwise pairwise method); see docs/ALGORITHMS.md. Connects team strength, individual production, and next-season / scheduling risk.

Keep this document updated as tasks complete. Domain math lives in composite_score.py; data lives in source-data/; runnable pipeline is run_glax_analysis.py.


Why we are building this

Problem

  1. Team strength is often summarized by win–loss and ranking systems (Powerwise, RPI, etc.), but coaches and ADs also care about how a team wins (offense, defense, possession) and whether margins are sustainable.

  2. Graduation and roster turnover change competitive balance. A team ranked 16th can look very different in August if its top three scorers and starting goalie graduate. We need a structured way to estimate how much team power walks off the field, not just “they were 16th last year.”

  3. Scheduling should reduce predictable blowouts where possible. That requires an estimate of expected score delta between two teams after roster change—not only last year’s final rank.

What success looks like

Audience Question we answer
Coach / AD If our seniors leave, how much does our team power drop, and where might we land in the league?
League / scheduler Which matchups project to large margins given projected 2027 strengths?
Analysis Are player stats meaningful (earned vs strong opponents) or padded vs weak schedules?

Design principles (do not break these)

  1. Anchor strength on game results only — finish tiers (1–4, 5–8, 9–16, 17–32) from finish_2026.tsv / finish_2025.tsv. League rank and schedule margins do not use composite (Phases A–B, 2026). Box-score domains remain for player impact and board columns only. See docs/PHASE_C_ROADMAP.md for retiring composite from coach exports.

  2. Two separate metrics - Team power — three domains (offense, defense, possession). - Player impact on team power — SOS-weighted share of production + defense (goalies).

  3. Context weighting — stats vs weak opponents count less (tier SOS × game leverage).

  4. Subtract → adjust rank off prior — graduation uses departure loss % (not composite drop) with capped moves vs prior finish.

  5. Schedulingprojected margin ratings (results-only) → expected margin & blowout-risk matrix.

  6. Board ranking packet — default recommended rank = roster-adjusted outlook; teams flagged when metrics conflict. Flagged cases get secondary regression (surge, assists, manual notes) before the board votes. See ranking_board_report_*.md.


Run

cd glax-pipeline
python3 fetch_awards.py 2026              # optional: refresh awards_2026.csv
python3 run_glax_analysis.py              # 2025-26 → output/
python3 run_glax_analysis.py --season both   # + backtest → output/backtest_2024_25/
python3 tune_roster_predictor.py             # goal-seek board-line MAE (holdout)
python3 tune_possession_weights.py           # draw / GB / CTO weight grid

Model overview

finish_2026.tsv / finish_2025.tsv  →  tier SOS weights
         ↓
team-game stats + results  →  team power (calibrated possession baseline)
         ↓
player-game stats  →  SOS-weighted impact  →  subtract seniors  →  T′
         ↓
league re-rank + schedule_risk_matrix (expected margin, blowout flag)

Possession baseline: league p90 weighted events/game (~42 for 2025–26), not 10.

Tier SOS: 1.0 / 0.80 / 0.55 / 0.30 for finish tiers 1–4.


Outputs

File Description
output/team_strength_2025_26.csv Coach strength index (margin, RPI, ranks, turnover, domains)
output/team_power_2025_26.csv Domain stats + margin (composite optional via CLI flag)
output/player_impact_2025_26.csv Raw + SOS shares, power points per player
output/projected_power_2027.csv Post–2026 grad projection
output/league_rerank_2027.csv League order before/after grad losses
output/ranking_recommendations_2027.csv Board packet: recommended rank + defensible metrics (all teams)
output/ranking_outliers_2027.csv Flagged teams only — secondary regression / manual review
output/ranking_board_report_2027.md Executive brief: methodology, flag rules, flagged table
output/graduation_player_loss_2025_26.csv Per-departing-player loss shares
output/board_overrides_2027.csv Template for board voted rank + notes
output/schedule_risk_matrix_2027.csv Pairwise expected margin (projected T′)
output/sanity_report_2025_26.md Composite vs finish vs Powerwise
output/backtest_2024_25/ Same artifacts for 2024–25 season
output/backtest_2024_25/backtest_report.md Projected 2025–26 vs actual finish_2026 + #0 naive benchmark
output/backtest_2024_25/backtest_benchmark_by_tier.csv MAE / ±3 by finish tier (1–4) per predictor
output/backtest_2024_25/backtest_team_rank_errors.csv Per-team rank errors (prior, roster, adjusted, composite)
output/benchmark_2027.md Forward: model proj rank vs prior-finish carry-forward

Task tracker

Phase 1 — Foundation

Phase 2 — Anchor & calibration

Phase 3 — Two metrics

Phase 4 — League projection & scheduling

Phase 5 — Polish

Phase 6 — Backtest


Code map

Module Role
anchor.py Load finish TSV, tier SOS, name resolution
glax_data.py Season config, loaders, player impact, graduation
analysis.py Full pipeline, sanity + backtest reports
ranking_outliers.py Board recommendations, outlier flags, regression tracks
secondary_regression.py Flagged-team adjustments → recommended_rank_adjusted
roster_stats.py Late surge, assists/feeders, draw % for graduation
board_override.py Optional voted rank + program notes CSV
game_margin_stats.py MO-vs-MO margin profiles (top-16, consistency)
results_anchor.py RPI+AGD, rolling snapshots, dated results loader
awards.py / awards_{year}.csv STL awards ingest, roster match, graduation + board rollups
fetch_awards.py Download season-results-{year}.json → CSV
run_glax_analysis.py CLI
composite_score.py Domain scoring engine


Prioritized roadmap (product order)

Work in this sequence. #0 is mandatory on every evaluation before claiming the model adds value.

#0 — Prior-year finish benchmark (default expectation)

#1 — Missouri-only league set (drop out-of-state from ranking)

#2 — Graduation, roster turnover & legacy team score (primary predictor path)

Rank outlook = prior finish + capped roster move, not full composite re-sort. Box-score domain weights and composite sort amplify noise; turnover + returning production + legacy explain adjustments off last year.

#3 — SOS accuracy for top-20 teams

#4 — Offense / defense recalibration (after MO-only + top-20 SOS focus)

#5 — Player awards (STL Lacrosse Awards)

Independent recognition signal for individual talent (not team finish). Source: STL Lacrosse Awards — Results (2026 season is a static snapshot on that site; filter by conference, school, position).

Level What it is Model use (planned)
All Conference Committee selections by conference and team level Depth / returning quality; conference strength context
All State Official 1st Team + Honorable Mention (statewide) Stronger individual prior; departing All-State → board flag
All American USA Lacrosse area awards (coach ballots) Highest tier; graduation loss weight + legacy program signal

Award tier weights (tuned on 2025-26 holdoutfinish_2026): see awards_weights.TUNED_AWARD_WEIGHTS and python3 awards_tune.py.

Honor Points
All-Conference 1st 2
All-Conference 2nd / HM 1
Conference POY 3
All-State HM 4
All-State 1st 8
All-American 16 (2× state 1st)

Board flag award_talent_loss when departing points ≥ 10. Tune grid: output/awards_tune_results.csv.


Follow-up backlog (Opus review + analysis session)

Done since Opus review

Still open (reference)

Item Priority
Replacement-level graduation #2
Legacy / multi-year program prior #2
Out-of-state handling #1
Smooth / continuous SOS #3
Offense/defense recalibration #4
Bootstrap rank confidence intervals P1
Naive baseline on ablation grid P1 (backtest has it)
HFA on schedule margins P2
Per-player % loss Done → graduation_player_loss_*.csv
stat_type=combined filter Done
Player awards (All Conference / State / American) #5results
Tier-conditioned MAE CSV Done (#3)
Bootstrap rank confidence intervals P1

Game-rooted predictors (for #2–#4)