How tylersherrick/sports-prediction-engine works
This repository is a sports-game prediction service with NFL and NHL workflows, exposed through a FastAPI application. The main user path is a game-ID request to the API, which dispatches to the sport-specific prediction module and returns a prediction; NFL responses also include winner, spread, and total predictions. Separate collection, processing, feature-generation, and modeling code supports historical data and additional betting and player-prop capabilities. The README is empty, and several links between batch stages and runtime models are not shown in the excerpts, so those links are marked unverified rather than asserted.
Main entry points: api.py FastAPI routes · nfl_prediction.py NFL predictions · nhl_prediction.py NHL predictions · nfl.py NFL collector
Components 27
API
- FastAPI routes
src/api.py - Prediction report
src/report.py
Data preparation
- NFL collector
src/collectors/nfl.py - NHL collector
src/collectors/nhl/nhl.py - NFL processing
src/processors/nfl.py - NHL processing
src/processors/nhl.py - NHL validation
src/processors/nhl_validate.py - NFL features
src/features/nfl.py - NHL team features
src/features/nhl/nhl.py - Goalie features
src/features/nhl/nhl_goalies.py - Skater features
src/features/nhl/nhl_skaters.py
Prediction
- NFL predictions
src/nfl_prediction.py - NHL predictions
src/nhl_prediction.py - NFL models
src/models - NHL models
src/models/nhl - NHL prediction service
src/services/nhl_prediction.py - NHL live predictor
src/models/nhl/nhl_live_predictor.py
Evaluation
- NFL betting evaluation
src/evaluation/nfl_betting.py - Spread evaluation
src/evaluation/nfl_spread_betting.py - Total evaluation
src/evaluation/nfl_total_betting.py - NFL calibration
src/evaluation/nfl_calibration.py - Odds download
src/evaluation/download_nfl_odds.py - NHL evaluation
src/models/nhl/nhl_evaluate.py
Other components
- API caller
- ESPN data
- NFL data and models
- NHL data and models
Connections 27
- API caller → FastAPI routes: requests prediction
- FastAPI routes → NFL predictions: dispatches NFL
src/api.py - FastAPI routes → NHL predictions: dispatches NHL
src/api.py - NFL predictions → ESPN data: fetches game data
src/nfl_prediction.py - NHL predictions → ESPN data: fetches game data
src/nhl_prediction.py - NFL collector → NFL data and models: stores raw games
- NFL processing → NFL data and models: writes processed data
- NFL features → NFL data and models: writes features
- NFL predictions → NFL data and models: reads state and models
- NHL collector → NHL data and models: stores raw games
src/collectors/nhl/nhl.py - NHL processing → NHL data and models: writes processed data
- NHL validation → NHL data and models: validates data
- NHL team features → NHL data and models: writes features
- Goalie features → NHL data and models: builds goalie features
- Skater features → NHL data and models: builds skater features
- NHL predictions → NHL data and models: reads team and player state
- NFL data and models → NFL models: trains models
- NHL data and models → NHL models: trains models
- NHL prediction service → NHL data and models: loads model and features
src/services/nhl_prediction.py - NHL live predictor → NHL data and models: loads features and models
- NFL betting evaluation → NFL data and models: reads features and odds
- Spread evaluation → NFL data and models: evaluates spread bets
- Total evaluation → NFL data and models: evaluates total bets
- NFL calibration → NFL data and models: calibrates predictions
- Odds download → NFL data and models: downloads odds
- NHL evaluation → NHL data and models: evaluates predictions
- FastAPI routes → Prediction report: renders reports