Friday, July 22, 2016

New Neural Networks

I recently discovered a bug in the Neural Networks (NN) I wrote to help fantasy players with the Beat the Streak game. It turns out the NN still had some value; it used player data, but due to a programming error, not as much data as I intended. I fixed the bug and retrained the networks, and they do seem to perform better.

For review, the inputs to the networks are a collection of hit averages (HA), hits/plate appearances. For the original NN, I used the hit average for the pitcher against position players for the current year, and a weighted average of the last three years. I use the hit average for the batter for the current year, and a weighted average for the last three years. I also include the league average for position players for the current year. Small sample sizes are regressed toward the league average. In the second network, I add a three-year weighted average for the ballpark.

I ran a test over 160 days, days not used in the training. I looked at starting position players and the the pitcher who started the game against them. For each day, I selected the batter with the highest probability of getting a hit. Here are the results for the five parameter NN:

Days: 160, Expected Games with hit: 104.1, Actual Game with hit 110.
Streak Length: 0, Number of times: 19
Streak Length: 1, Number of times: 13
Streak Length: 2, Number of times: 5
Streak Length: 3, Number of times: 3
Streak Length: 4, Number of times: 2
Streak Length: 5, Number of times: 1
Streak Length: 6, Number of times: 4
Streak Length: 8, Number of times: 1
Streak Length: 13, Number of times: 2

So this NN under performs, predicting fewer hits than actually happened.

The NN with the park parameter does a bit better:

Days: 160, Expected Games with hit: 122.9, Actual Game with hit 123.
Streak Length: 0, Number of times: 6
Streak Length: 1, Number of times: 11
Streak Length: 2, Number of times: 4
Streak Length: 3, Number of times: 2
Streak Length: 4, Number of times: 4
Streak Length: 5, Number of times: 3
Streak Length: 6, Number of times: 1
Streak Length: 7, Number of times: 1
Streak Length: 8, Number of times: 3
Streak Length: 10, Number of times: 1
Streak Length: 16, Number of times: 1

I think a 75% success rate is pretty good, and a 16 game hit streak is not bad. I’ll reporting the top ten lists for both.



from baseballmusings.com http://ift.tt/2a1LQaz

No comments:

Post a Comment