Skip to content

jacobsmith0408-svg/basketball-lineup-analytics-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basketball Lineup Analytics Engine

A matchup-aware lineup optimization and rotation decision-support tool built for basketball analytics.

This application evaluates every viable 5-man lineup combination using advanced player metrics, contextual game-state adjustments, and a supervised machine learning model to project net rating impact.

Designed as a sports analytics / basketball operations tool.

👉 Live Demo: (https://basketball-lineup-analytics-engine.streamlit.app/)

What this does

Lineup Recommendations

  • Ranks all 5-man combinations from a minutes-based player pool
  • Supports roster constraints (min guards, min bigs, max centers)
  • Optimizes for game-state priorities (Balanced / Need a bucket / Get stops / Protect the ball / Win the glass)

Substitution Assistant

  • Given the current 5 + bench, suggests the best one-for-one substitutions
  • Uses the same objective + constraints as the lineup ranking engine

Matchups vs ACC Opponents

  • Scores Syracuse 5-man counters vs a specific opponent 5-man lineup
  • Opponent lineup modes: auto (top minutes), archetype (Big/Small/Shooting/Defense), manual

Screenshots

Lineup Recommendations Screenshot 2026-02-24 at 2 18 23 PM

Substitution Assistant Screenshot 2026-02-24 at 2 25 46 PM

Matchup vs Opponent

Screenshot 2026-02-24 at 2 17 23 PM

Modeling Approach

  • Player-level season metrics aggregated into lineup-level features
  • Supervised regression model predicts projected net rating
  • Reliability penalty applied for low-minute units
  • Fatigue multiplier adjusts impact late-game
  • Chemistry & familiarity multipliers stabilize predictions
  • Matchup adjustment estimates opponent interaction effects
  • Final Objective score = weighted normalized composite

This system is built as a decision-support engine — not a deterministic predictor.

Tech Stack

  • Python
  • Streamlit
  • Pandas / NumPy
  • Scikit-Learn
  • Joblib

Data inputs

  • data/syracuse_player_profiles.csv (Syracuse player season profiles)
  • data/acc_player_profiles.csv (ACC player season profiles)
  • data/lineup_model.joblib (trained model used to predict lineup net rating)

Run locally

git clone https://github.com/jacobsmith0408-svg/basketball-lineup-analytics-engine.git
cd basketball-lineup-analytics-engine

python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt

streamlit run app.py

Project Structure

  • app.py → Streamlit interface + scoring engine
  • src/ → data processing / model scripts
  • data/ → input CSVs + trained model artifact

Limitations

  • Model performance depends on feature quality and training data
  • Matchup logic is heuristic-based (Level-1 interaction layer)
  • Designed as a prototype decision-support tool, not a production analytics platform

Engineering Notes

  • Deployed via Streamlit Cloud with GitHub CI-based redeploys.
  • Path-safe file loading using pathlib to support Linux-based cloud environments.
  • Constraint-based lineup generation using combinatorics (itertools.combinations).
  • Model predictions layered with reliability penalties, fatigue multipliers, and matchup heuristics.
  • Results exportable to CSV for scouting workflow integration.

About

Built and deployed a Basketball Lineup Analytics Engine — a sports-tech decision-support tool that ranks 5-man lineups, recommends substitutions, and evaluates matchup counters.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages