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/)
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
Matchup vs Opponent
- 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.
- Python
- Streamlit
- Pandas / NumPy
- Scikit-Learn
- Joblib
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)
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- app.py → Streamlit interface + scoring engine
- src/ → data processing / model scripts
- data/ → input CSVs + trained model artifact
- 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
- Deployed via Streamlit Cloud with GitHub CI-based redeploys.
- Path-safe file loading using
pathlibto 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.

