# Use of Machine Learning and Deep Learning to Predict the Outcomes of Major League Baseball Matches
## 4 Results
### Discussion  
Because studies on the outcome prediction of MLB matches have employed data from different years and over different periods to make predictions, comparing the prediction accuracies reported in different studies may be inappropriate. Moreover, the selection of match variables for inclusion in prediction models affects the prediction results. Suitable variables should be selected into a prediction model to achieve satisfactory model performance. [PERSON] et al. (2018) collected game data on variables related to scoring in three categories: hitter, pitcher, and team. After feature selection, they obtained 7 variables from the original 14 variables and achieved a prediction accuracy of 59.6%. [PERSON] (2018) collected competition data from two websites. Because the items recorded by each website were slightly different, more research variables needed to be collected from more data sets. In (2018), 15 variables were obtained after feature selection, and the prediction accuracy was 59%. [PERSON] (2018) collected 60 variables for hitters, SPs, match time, and temperature (\({}^{\circ}\)F) and then selected four variables for inclusion in their prediction model. [PERSON] (2018) obtained data pertaining to five categories: game time (day/night), home/away team, baseball field, competing team, and day of the week; [PERSON] expanded the number of variables collected for match outcome prediction and achieved relatively low accuracy (55.52%). In our study, we collected data on hitters, pitchers, and the variable of whether the team was the home or away team and achieved high prediction accuracies. Studies have used machine learning methods to predict the outcomes of MLB matches. The prediction accuracies obtained by [PERSON] et al. (2018), [PERSON] (2018), and [PERSON] (2018) were 59.6% (SVM), 73.68% (ANN), and 59% (SVM), respectively (Table 17). The ANNs and SVMs developed in the aforementioned studies outperformed other methods. For data set 2, our ANN model exhibited the highest prediction accuracy (94.18%), followed by the SVM (94.16%) and the 1 DCNN (93.4%). \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Dataset**} & \multirow{2}{*}{**Model**} & \multicolumn{2}{c}{**Accuracy**} \\ \cline{3-4}  & & **No Feature Selection** & **Feature Selection** \\ \hline \multirow{3}{*}{Dataset 1} & 1 DCNN & & 91.44\% \\ \cline{2-4}  & ANN & 92.02\% & 92.06\% \\ \cline{2-4}  & SVM & 91.36\% & 91.94\% \\ \hline \multirow{3}{*}{Dataset 2} & 1 DCNN & & 93.4\% \\ \cline{2-4}  & ANN & 93.91\% & 94.18\% \\ \cline{2-4}  & SVM & 93.90\% & 94.16\% \\ \hline \hline \end{tabular}
\end{table} 
Table 16: The prediction results of the three models. A major difference between our study and previous studies is the data source used for constructing the prediction models. We collected data from Baseball-Reference to establish two data sets and investigated whether selecting data with only the SP or with all pitchers in the pitcher category had an effect on the prediction accuracy. In addition, the prediction performance of the models before and after feature selection was compared. The results of this study indicate that including the data of all pitchers (data set 2) yields more accurate predictions of the outcomes of MLB matches. Although the performance of the SP is very important and is often used as an indicator of whether a game may be lost or won, the performance of the RP can sometimes be a decisive factor influencing the outcome of the game. During feature selection for data set 1, only one game score (GSc) variable was selected from the SP data. It is clear that more complete game information on all pitchers would increase the accuracy of match outcome prediction. The prediction accuracies of the three prediction models for MLB matches proposed in this study were higher than 90%, which is considerably higher than the prediction accuracies obtained in related studies (accuracies of 55-74%).