How cmunch1/nba-prediction works
This is an end-to-end NBA game winner prediction project: historical and newly scraped game data are processed into model features, used to train and evaluate probability classifiers, then served with current-season predictions and performance information in a Streamlit app. The README also describes scheduled scraping and retraining, plus a Hopsworks feature-store/registry integration that is currently suspended. Some pipeline stages are documented but their notebook wiring was not sampled, so those relationships are cited to the README rather than inferred from filenames.
Main entry points: streamlit_app.py Streamlit app · games_engineered.csv Engineered games · model_training.py Model training · model.pkl Trained model
Components 15
Data collection
- Game scraper
src/webscraping.py - Historical games
data/original/games.csv
Feature preparation
- Data processing
src/data_processing.py - Feature engineering
src/feature_engineering.py - Engineered games
data/games_engineered.csv
Model development
- Train test split
src/data_processing.py - Hyperparameter tuning
src/optuna_objectives.py - Model training
src/model_training.py - Trained model
models/model.pkl - Hopsworks utilities
src/hopsworks_utils.py
Prediction and reporting
- Streamlit app
src/streamlit_app.py - Prediction reporting
src/dashboard_processing.py - Accuracy metrics
data/running_accuracy_metrics.csv
Other components
- NBA data
- App user
Connections 16
- NBA data → Game scraper: provides scores
src/webscraping.py - Game scraper → Historical games: collects games
- Historical games → Data processing: loads data
- Data processing → Feature engineering: prepares games
- Feature engineering → Engineered games: writes features
- Engineered games → Train test split: splits data
- Train test split → Model training: supplies splits
- Hyperparameter tuning → Model training: tunes models
- Model training → Trained model: saves model
- Hopsworks utilities → Engineered games: stores features
- Hopsworks utilities → Trained model: supports registry
- App user → Streamlit app: requests predictions
README.md - Streamlit app → Engineered games: reads games
src/streamlit_app.py - Streamlit app → Trained model: loads model
README.md - Streamlit app → Prediction reporting: reports predictions
- Prediction reporting → Accuracy metrics: exports accuracy