Description
Simulates every possible batting order for a given lineup and displays summary statistics of
the average runs (over a number of games) of the orders, and specific information about the
top and bottom 5 orders. The user may choose how many games each order is simulated for,
which players are in the lineup, or what each player's PA outcomes are in a single game
(see sample files).
Data Source
Baseball Savant Custom Data
Major TODOs
- Determine the accurate likelihoods of sacrifices and double plays for different out types
- Enable some sort of pinch hitting scheme (right now, each player hits the entire game)
- Enable some sort of pitcher dependent hitting results (even as simple as right-y/left-y;
right now hitting stats are full season aggregates)
- Include edge cases like stealing, wild pitches, etc.
- More detailed data (i.e. did a double go to right or left field?)
- Player specific data (i.e. how often does a player try to steal?)
Installation
pip install batting-order-analysis
View on PyPI
Usage
driver.py and driver.ipynb supply a basic interface, check them out