CourtIQ: Pressure-Aware Shot Quality and Decision Audit

Inspiration

In basketball, two shots taken from nearly identical locations can have very different levels of difficulty. A defender closing in, the level of contest, and the shooter's movement may all provide important context that a basic shot chart misses.

This inspired us to investigate a question: Can defensive context at shot release improve basketball field-goal outcome prediction beyond basic shot characteristics?

We wanted to explore how player-tracking data could help analysts understand shot outcomes more deeply, while being honest about what predictive models can—and cannot—tell us.

What it does

CourtIQ is an interactive basketball analytics prototype that investigates the relationship between shot characteristics, defensive pressure, and field-goal outcomes.

The project includes:

  • Shot exploration: Explore eligible shot attempts and examine outcomes across available shot characteristics.
  • Model comparison: Compare a baseline model against a model incorporating defensive context.
  • Calibration analysis: Examine whether predicted probabilities align with observed outcomes, rather than evaluating models using discrimination alone.
  • Research audit: Inspect the evaluation methodology, data exclusions, tracking limitations, and uncertainty behind the findings.

The dashboard presents results from an existing research pipeline and is designed to make the analysis easier to explore and reproduce.

How we built it

We used open basketball data from SkillCorner's Spanish Liga ACB 2025–26 dataset. After excluding unlocated shots and fouled misses that were not official field-goal attempts, the study retained 1,322 shots from 10 games, including 597 makes and 725 misses.

We developed a modelling and evaluation pipeline that compares:

  • M0 — Baseline: Basic shot characteristics and shot context.
  • M1 — Defensive context: The baseline feature set augmented with defender proximity and contest information.
  • Exploratory extensions: Tracking-derived shooter-speed and directional features.

We evaluated the models using leave-one-game-out cross-validation, holding out an entire game at a time. This tests performance on games not used to train the corresponding model.

We assessed log loss, Brier score, ROC-AUC, and expected calibration error (ECE). We then built a Streamlit dashboard to present the existing experimental results, explore the available shot-level data, and communicate the research findings.

What we found

The defensive-context model improved predictive performance over the baseline on the evaluated dataset.

Metric Baseline (M0) Defensive context (M1)
Log loss 0.6552 0.6173
Brier score 0.2315 0.2159
ROC-AUC 0.6410 0.6941
ECE, 10 bins 0.0306 0.0511

M1 improved log loss, Brier score, and ROC-AUC, but its ECE was worse. This matters because a model can distinguish between outcomes more effectively without producing better-calibrated probabilities.

Adding relative shooter speed produced a small further improvement in log loss, but the game-cluster bootstrap interval crossed zero. We therefore treat that result as exploratory rather than conclusive. The directional-feature extension did not improve on M1.

Challenges we faced

One major challenge was preventing information leakage between training and evaluation. Randomly splitting individual shots could allow shots from the same game to appear in both sets, making generalization appear stronger than it is. We instead used game-level cross-validation.

Another challenge was working with incomplete and extrapolated tracking positions. We needed to distinguish directly detected positions from estimates and acknowledge the limitations of planar tracking data.

We also had to reconcile feature definitions, shot-exclusion counts, and metrics across the reports and stored experimental artifacts. These audits helped ensure that the final documentation reflected the actual implementation and results.

What we learned

We learned that adding a plausible feature does not automatically improve a predictive model. Defensive context produced a meaningful improvement over the baseline in this sample, while more elaborate movement features delivered little additional benefit.

We also learned to evaluate calibration separately from discrimination, preserve held-out evaluation boundaries, and report uncertainty rather than presenting every improvement as a breakthrough.

Most importantly, predicting whether a shot goes in is not the same as determining whether taking that shot was the right decision. Answering the latter would require additional decision-context information and a defensible way to evaluate alternatives such as passing or driving.

Limitations and future work

This study covers only 10 games, so its findings should not be generalized automatically to other teams, leagues, or seasons. The tracking data is planar and cannot capture every aspect of shooting mechanics or defender reach. The current model predicts outcomes using information available at shot release; it does not establish causal effects or determine the optimal basketball decision.

Future work includes evaluating more games, testing generalization across seasons, investigating interactions between defensive pressure and shooter movement, and exploring decision-quality analysis only when appropriate counterfactual evidence is available.

Acknowledgements

This project uses SkillCorner Open Data. Please consult the dataset repository and its applicable terms for attribution and usage requirements.

CourtIQ is an experimental sports analytics research prototype, not a validated coaching or automated decision-making system.

Built With

Share this project:

Updates

Submission history