Inspiration NBA teams lose millions every season to preventable injuries — not because they lack data, but because workload risk builds up silently across minutes, back-to-backs, and rest patterns until it's too late. Front offices react after an injury happens instead of catching the warning signs early. We wanted to build a tool that gives coaches and medical staff the same kind of early-warning intelligence a real analytics department would use.

What it does? CourtLoad predicts each NBA player's 14-day injury probability from workload, schedule density, age, and injury history — then explains why in plain language using SHAP, not just a black-box number.

The dashboard has four views: Watchlist — full roster ranked by 14-day injury probability, from Low to High risk, with league-wide monitoring stats (players monitored, high-risk count, elevated watch band, league average) Dossier — individual player risk score with a plain-language explanation, SHAP-based score drivers, season workload trend with injury history overlaid, and a downloadable front-office brief What-if Scout — build a custom player snapshot by hand (age, position, minutes, back-to-backs, rest days) and instantly score injury risk, then preview how added rest changes that risk in real time Roster — a coach-ready glance view of an entire team, color-coded and ranked by 14-day risk Compare — side-by-side risk profiles for two players, useful for trade or load-management debates The app also includes a full dark mode for low-light or broadcast-style use.

How we built it? Model: LightGBM gradient-boosted classifier with isotonic probability calibration, trained on workload features including minutes spikes, back-to-back density, rest days, age curve, position load, team pace, usage intensity, and same-area injury recurrence Explainability: TreeSHAP for both individual player explanations and global feature importance Frontend: Streamlit, with custom light and dark themes for a front-office analytics-desk look and feel Data: A realistic synthetic workload dataset built to mirror real NBA patterns for reliable offline demos, with a built-in path to pull live data via nba_api

Challenges we ran into Avoiding data leakage — injury history features had to be strictly as-of-date snapshots, since a real front office would never have access to future injury data when scoring risk. We used chronological train and test splits and excluded the injury target from ever leaking into features. Injuries are rare events, so accuracy alone is misleading — we made PR-AUC our headline metric instead of ROC-AUC, since it's the honest metric for imbalanced classification. Making a real ML model feel usable to a non-technical coach — SHAP values are powerful but not intuitive on their own, so we built plain-language summaries on top of every risk score, plus a what-if simulator so decision-makers can test scenarios themselves.

Accomplishments we're proud of PR-AUC of 0.603 and ROC-AUC of 0.720 with a properly calibrated model, Brier score 0.205 A genuinely explainable system — every risk score comes with a human-readable reason, not just a percentage An interactive what-if simulator with instant before/after rest-impact comparison, turning the model into a real decision-support tool rather than a static report A full team roster view and head-to-head compare tool, so the model works at the individual, team, and cross-player level

What we learned? How much of building a trustworthy ML product is about calibration and leakage prevention, not just model accuracy — and how much a good UI matters in making a statistical model actually usable by a non-technical decision-maker. What's next for CourtLoad? Live nba_api integration for real-time workload tracking Expanding to team-level scheduling optimization, suggesting rest days across a full roster Incorporating real injury datasets for production-grade validation

Built With

Share this project:

Updates