My first reaction was, "Cool! I want to play with it!" But wait, it's in MATLAB?! I don't have MATLAB at home. I had a couple of options, I could try and get a copy of MATLAB (which is not very cheap) or translate to a language I had access to on my laptop. I thought about R, Python, or potentially learning Octave but eventually sided with R. Below are links to the Git that has the translated code in R. Note that this version is strictly a translation and has not been optimized for the R language.
This is really a work in progress since I'd like to build it out a bit. Here's what I see as future work I hope to accomplish on this problem:
- Optimize for the R language and decrease overall runtime for a particular run.
- Adjust for a team of different players (currently assumes the same player at all nine hitting spots).
- Create a nice way to visualize the results.
- Link to more recent data.
- Through the Lahman package.
- Through "live" data.
- Add in ability to manipulate lineup order and be able to compare pros and cons behind various strategies.
- Add in ability for lineup substitutions.
Github repository
Original Problem website
No comments:
Post a Comment