Game Plan AI:
Can Data Predict the Next Move?

Logistic Regression Confusion Matrix Additional Slide
Logistic Regression Confusion Matrix Additional Slide
Logistic Regression Confusion Matrix Additional Slide

This project was all about bringing data science onto the football field. I built a machine learning model to predict whether the next play in an NFL game would be a run or a pass — based on game context like down, distance, time remaining, and more. Think of it as a digital coach quietly reading the playbook.

After cleaning and engineering features from real NFL play-by-play data, I tried out several models — including Random Forest, XGBoost, and KNN — but it was Support Vector Machine (SVM) that came out on top. It offered the best balance of precision and recall, and showed strong generalization on unseen test data.

The model uncovered some interesting patterns: teams tend to pass more when they’re behind or in long-yardage situations, and lean toward running when they’re ahead or facing short gains. These kinds of insights could help coaches, analysts, or even sports commentators make more strategic calls (or just win more fantasy points).

Metric Train (SVM) Test (SVM) Train (XGBoost) Test (XGBoost)
Accuracy 66.68% 66.91% 68.64% 65.45%
Precision 72.98% 76.18% 69.06% 73.33%
Recall 68.12% 65.52% 68.64% 66.94%
F1 Score 70.46% 70.45% 68.78% 69.99%

Tools used: Python, Pandas, Scikit-learn, Matplotlib, Seaborn

GitHub Repository: NFL Game : Predictive Analytics