Predicting sports winners using data analytics with pandas and scikit-learn
summary
Uses pandas to pull box scores from basketball-reference and scikit-learn to build models; creates features like last-game result, win streak, head-to-head, previous-season ranking and one‑hot team encodings; baseline (always predict home) is ~58% home wins and F1 ≈ 0.43; a tuned random forest with label + one‑hot encoding and cross‑validation reaches F1 ≈ 0.64 on training season and then predicts the next season at ~76% accuracy. pandas scikit-learn
AI-written summary · about
chapters (15)
- 0:00Introduction
- 0:46Overview
- 4:21Python
- 6:21Data
- 8:07Home Win
- 12:49Winning Streak
- 15:15Standings
- 16:57Apply
- 21:21Home team win
- 22:59Encoding
- 24:32Label Encoder
- 26:39Random Forest
- 28:52Results
- 32:37F1 Score
- 33:40Next steps
related talks
41mFootball's data analytics in python
29mMissing the Apex: Predicting F1 Races with Python
14mPredicting Football Matches Using Data
33mUsing Data Science to Better Evaluate American Football Players
48mMachine learning the hard way -- a story about ponies
56mSports Analytics: Big Data in the Big Time
38mDeep Learning plays Handball
22mPredict the future (or don't) with machine learning in applications
