Inspiration
I built CourtIQ around a question that has always interested me about basketball: how much does the situation around a shot matter? A shot is more than a location on the court. The distance, the time remaining on the shot clock, and the defender’s pressure can all change the difficulty of an attempt. I wanted to explore whether machine learning could help capture some of that context and provide a more meaningful picture of shot quality.
What it does
CourtIQ is a basketball analytics research project that examines how shot context and defensive pressure relate to the likelihood of making a shot. It compares models using contextual information with models that also include defensive features, then evaluates their predictions using metrics such as ROC-AUC, precision-recall, Brier score, and log loss. The goal is not simply to produce a prediction, but to understand what additional information contributes and where the model still falls short.
How we built it
I developed CourtIQ through a Python-based research workflow using basketball shot data, data analysis, feature engineering, and machine learning. I compared several model configurations, evaluated their predictions, and created visualizations to make the results easier to interpret. I also examined calibration, performance across individual games, and uncertainty in the measured improvements. This helped me look beyond a single headline score and assess whether the findings were supported by the broader evaluation.
Challenges we ran into
One of the biggest challenges was making sure that an apparent improvement in model performance represented a meaningful result rather than a misleading metric. Basketball data is complicated, and defensive pressure cannot always be captured perfectly by a few recorded variables. I also had to check prediction coverage, reproduce evaluation metrics independently, and consider how performance varied from game to game. These checks made the work more demanding, but they were essential to producing results I could explain honestly.
Accomplishments that we're proud of
I am proud that CourtIQ developed into more than a basic shot-prediction experiment. The analysis covers 1,459 shots across 10 games and compares five model configurations. In this evaluation, the model incorporating contest level achieved a ROC-AUC of approximately 0.655, compared with 0.590 for the baseline context model. Game-cluster bootstrap analysis estimated an improvement of about 0.065, with a 95% confidence interval from approximately 0.038 to 0.087. These results are encouraging, although they should be treated as evidence from a limited dataset rather than proof that the model will generalize to other competitions.
What we learned
The main lesson for me was that model quality cannot be reduced to one accuracy score. A model may rank shots reasonably well but still produce probabilities that need better calibration. Improvements also need to be tested for consistency, not just reported from one evaluation. I learned to pay closer attention to reproducibility, uncertainty, and the limits of the available data. Most importantly, I came away with a better understanding of how careful experimentation can turn a straightforward machine-learning question into a more useful research investigation.
What's next for CourtIQ: AI-Powered Basketball Analytics
My next step is to test CourtIQ on a broader range of games and, where suitable data is available, evaluate it on genuinely held-out games or competitions. I would also like to improve the representation of defensive positioning, validate the court-coordinate data, and explore whether better calibration can make the predicted probabilities more useful to coaches and analysts. Ultimately, I want CourtIQ to become a transparent, evidence-driven tool for exploring basketball decisions—not a system that claims to know the answer to every shot, but one that helps people ask better questions about the game.
Built With
- basketball-analytics
- data-science
- data-visualization
- feature-engineering
- jupyter-notebook
- machine-learning
- model-evaluation
- numpy
- pandas
- predictive-modeling
- probability
- python
- scikit-learn
- sports-analytics
- statistical-analysis
Log in or sign up for Devpost to join the conversation.