HOF prediction model – 2015

Like many baseball fans, I spent the weeks leading up to the hall-of-fame voting obsessing over the publicly released ballots, and especially the data gathered by Ryan Thibodaux (@NotMrTibbs) in his hall-of-fame tracker. This post describes how I used the data provided by Ryan to make a hall-of-fame voting prediction model. The model grew in part out of discussions on Tom Tango’s blog here, and I’ll comment on some of that below. All of my code is available on github here
https://github.com/bdilday/hofTracker

The basic idea behind the model is to take a linear combination of the public ballots to predict the public + non-public ballot overall results. I downloaded Ryan’s HOF tracker data going back to 2011 and used this for training the model. There’s a number of changes to consider between 2011 and the present that impact the choice of which data to use.

Continue reading HOF prediction model – 2015

baseball with n outs… and m bases.

This post describes some work I did on modeling baseball with n outs and m bases. The code to generate the run-expectancy matrix, and generate linear weights is available from github here,
https://github.com/bdilday/mlbMarkov_nm

This work was motivated from a few different directions. A few months back I made an interactive run-expectancy matrix using Mathematica (published on the Wolfram “demonstrations” site here http://demonstrations.wolfram.com/RunExpectancyMatrixInBaseball/ ). When doing that, I basically hardcoded the system of equations, but thought to myself there must be a better and more flexible way; I didn’t really pursue it since it was more expedient to just hardcode it. Later, Joe Poznanski answered an email asking what would happen if baseball had 4 outs (I don’t have the link handy), and Tango took on the topic on his blog also,
http://tangotiger.com/index.php/site/comments/how-many-runs-would-we-have-with-4-out-innings . I was also in the back of my mind thinking about better ways to express the Markov chains in my (American) football markov chain code

NFL Markov: 1 of n (a basic markov chain)

Continue reading baseball with n outs… and m bases.