🌐 Live Demo: https://nba-oracle-flyqyf1oh-souppmans-projects.vercel.app
ML-Powered NBA Fantasy Point Projections
Context-Aware. Time-Decayed. Precision Engineered.
NBA Oracle is a machine learning application that predicts individual NBA player statistics (Points, Rebounds, Assists) for upcoming games. Unlike simple season averages, it uses context-aware features and time-decay weighting to generate accurate daily fantasy projections.
The prediction engine is built on a Multi-Output Regression model trained on ~500,000 historical player game logs.
- Rolling Window Statistics: Calculates mean, standard deviation, and momentum over 3, 5, and 10-game windows
- Opponent Defense Modeling: Incorporates how many points/rebounds the opposing team allows on average
- Fatigue Detection: Tracks rest days and back-to-back game indicators
- Time-Decay Weighting: Recent games are weighted exponentially higher (60-day half-life) to capture current form
- Algorithm: XGBoost Multi-Output Regressor
- Targets: Points, Rebounds, Assists (simultaneous prediction)
- Performance:
- Points: R² = 0.58, RMSE = 5.7
- Rebounds: R² = 0.51, RMSE = 2.3
- Assists: R² = 0.55, RMSE = 1.7
The model is trained in a Jupyter Notebook (NBA_PlayerGamePredictor.ipynb) and outputs predictions to CSV files.
The web application is a React + Vite frontend that consumes the ML predictions:
- Data Layer (
src/data/predictions.js): Pre-loaded predictions from the latest CSV export - Component Layer (
src/components/PlayerCard.jsx): Displays individual player projections with fantasy score calculations - App Layer (
src/App.jsx): Implements search, filtering, and sorting logic
- 🔍 Search: Filter by player name or team
- 📊 Sort: Rank players by Points, Rebounds, or Assists
- ⚡ High Confidence Indicators: Visual highlights for players projected >20 points
- Python 3.x
- Pandas - Data manipulation
- Scikit-learn - Model training & evaluation
- XGBoost - Gradient boosting regressor
- NumPy - Numerical computing
- React 19 - UI framework
- Vite - Build tool
- Tailwind CSS v4 - Styling
- Framer Motion - Animations
- Lucide React - Icons
- Vercel - Hosting & CI/CD
- PostCSS - CSS processing
https://nba-oracle-flyqyf1oh-souppmans-projects.vercel.app
# Clone the repository
git clone https://github.com/souppman/NBA-Loracle.git
cd NBA-Loracle/nba-oracle
# Install dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run buildAll data is sourced from publicly available NBA statistics. No proprietary or sensitive information is included in this repository.
MIT License - See LICENSE file for details
Built as a demonstration of applied machine learning in sports analytics. Model training code available in NBA_PlayerGamePredictor.ipynb.
