This project predicts the next pitch a mlb pitcher will throw using statcast's pitch by pitch data and machine learning
Setup a python environment and then install dependencies using pip install -r requirements.txt
- data.py: python code/data.py --start 2024-07-01 --end 2024-07-31 --out data/statcast_july2024.csv
- organize.py: python code/organize.py --infile data/statcast_july2024.csv --outprefix data/processed_july2024
- pitch_quality.py: python code/pitch_quality.py --infile_train data/processed_july2024_train.csv --infile_test data/processed_july2024_test.csv
- model.py: python code/model.py --xtrain artifacts/X_train.pkl --ytrain artifacts/y_train.pkl --xtest artifacts/X_test.pkl --ytest artifacts/y_test.pkl
- test.py: python code/test.py --model artifacts/rf.joblib --le artifacts/label_encoder.joblib --Xtest artifacts/X_test.pkl --ytest artifacts/y_test.pkl
-
pybaseball
-
pandas, numpy
-
scikit-learn
-
matplotlib, seaborn
-
joblib
Kanye McKinney - Created the software by myself. Coded, evaluated, and documented the project including every part of the data analysis, processing, model training and evaluation