R model for optimizing a baseball lineup based on the starting pitcher
- Uses historical player performance data to predict expected runs.
- Applies machine learning and linear programming (
lpSolve) to determine an optimal batting order. - Considers pitcher handedness (LHP/RHP) to adjust expected player performance.
- Simulated dataset for proof of concept with customizable player statistics.
- R (Tidyverse, lpSolve, caret)
- Linear Optimization for lineup selection
- Probability-based Performance Estimation based on OBP and AVG
- Loads player performance data against left and right-handed pitchers.
- Determines expected performance based on the starting pitcher.
- Runs an optimization model to create the highest-scoring lineup.
- Outputs the best batting order for maximum expected runs.