Baseball Fan Team Decision Tree
I used this dataset to train a decision tree model to predict a batter s swing or non swing.
Baseball fan team decision tree. Create sports examples like this template called baseball roster that you can easily edit and customize in minutes. So this series of blog posts weren t t very much of a choose your own adventure with just one decision to be made but i think the antimatter formula by jay leibold showed some of the advantages and disadvantages of decision trees and decision tables quite well. Other variables in the dataset include strike zone size location and game situation information such as balls and strikes along with inning number men on base and run difference between the at bat team and the fielding team. One clear benefit to a decision tree as opposed to other machine learning techniques is that its mechanics are pretty easy to understand.
But this is the decision tree that teams should use to make role decisions. The data start at the top the tree and get filtered. I d call that good not great but its notable that i did very little tuning of these algorithms so this is a good first effort. In this article by robert craig layton author of learning data mining with python we will look at predicting the winner of games of the national basketball association nba using a different type of classification algorithm decision trees.
For this example a decision tree is probably best since it is easier to read and follow. Our decision tree implementation is inspired by this article which explains how to to build a decision tree classifier using python scikit learn package. It can learn to predict discrete or continuous outputs by answering questions based on the values of the inputs it receives. The data we will be using is the match history data for the nba for the 2013 2014 season.
Random forest was the leader with an r 2 of 0 73. Let s look at an example using a real world dataset. We baseball fans have always understood the rough logic of the decision but putting numbers to it can illuminate the right path in situations like that of the cardinals and martÃnez where it s not an open and shut case. A decision tree is well suited to this problem because it can determine and apply rules in order of importance and is extremely accurate and adaptable.
Decision trees and gradient boosted machines were roughly the same with an r 2 near 0 6. Major league baseball mlb player data from 1986 1987. First we split the mlb pitch statistics.