# Use of Machine Learning and Deep Learning to Predict the Outcomes of Major League Baseball Matches
## 4 Results
### Performance Comparison of the Prediction Models  
Table 16 lists the prediction results, before and after feature extraction, obtained from inputting the two data sets into the three prediction models.  
For data set 1, the prediction accuracies of the ANN were 92.02% and 92.06% before and after feature extraction, respectively. The prediction accuracies of the SVM were 91.36% and 91.94% before and after feature extraction, respectively. The prediction accuracy of the 1 DCNN was 91.44% for data set 1. Although the accuracy of the 1 DCNN was slightly lower than the accuracies of the ANN and SVM after feature selection, the prediction performance of the 1 DCNN was slightly higher than that of the SVM before feature selection.  
For data set 2, the prediction accuracies of the ANN were 93.91% and 93.99% before and after feature extraction, respectively. The prediction accuracies of the SVM were 93.90% and 94.16% before and after feature extraction, respectively. The prediction accuracy of the 1 DCNN was 93.4% for data set 2. The three models exhibited similar prediction performance.  
The prediction accuracies obtained with data set 2 were higher for all models, which means that using the data of all pitchers is better than using the data of only the SP. Although the performance of the SP during a game is very important, the performance of the RP also must be considered to obtain more complete game information and thus  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \multicolumn{6}{c}{**Prediction Results**} \\ \hline  & **CV** & \multicolumn{2}{c}{**Win**} & **Lose** & **Accuracy** \\ \hline  & & Win & 458 & 24 & 94.65\% \\ \multirow{4}{*}{Actual results} & \multirow{2}{*}{2} & Win & 444 & 24 & \multirow{2}{*}{94.03\%} \\  & & Lose & 34 & 470 & \\ \cline{2-5}  & & Win & 473 & 37 & \multirow{2}{*}{93.93\%} \\  & & Lose & 34 & 440 & \\ \cline{2-5}  & & Win & 475 & 20 & \multirow{2}{*}{94.65\%} \\  & & Lose & 32 & 445 & \\ \cline{2-5}  & & Win & 456 & 29 & \multirow{2}{*}{93.52\%} \\  & & Lose & 34 & 453 & \\ \hline Average & & & & & 94.16\% \\ \hline \hline \end{tabular}
\end{table}
Table 15: Confusion matrix of SVM after feature selection (dataset 2).  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & \multicolumn{6}{c}{**Prediction Results**} \\ \hline  & **CV** & \multicolumn{2}{c}{**Win**} & **Lose** & **Accuracy** \\ \hline  & 1 &
\begin{tabular}{c} Win \\ Lose \\ \end{tabular} & 474 & 38 & 94.14\% \\ \multirow{4}{*}{Actual results} & \multirow{2}{*}{2} & Win & 483 & 29 & \multirow{2}{*}{94.03\%} \\  & & Lose & 29 & 431 & \\ \cline{2-5}  & & Win & 478 & 34 & \multirow{2}{*}{94.65\%} \\  & & Lose & 18 & 442 & \\ \cline{2-5}  & & Win & 481 & 31 & \multirow{2}{*}{94.14\%} \\  & & Lose & 26 & 434 & \\ \cline{2-5}  & & Win & 478 & 34 & \\ \cline{2-5}  & & Lose & 25 & 435 & \\ \hline Average & & & & & 94.18\% \\ \hline \hline \end{tabular}
\end{table}
Table 14: Confusion matrix of ANN after feature selection (dataset 2).  
more accurate prediction of the outcomes of matches. This trend was also observed for the variables after feature selection. Ten variables (AB, PA, BA, OBP, SLG, OPS, Pit, PO, GSc, H/A) were selected for data set 1, in which only one variable was related to the first pitcher (GSc). Of the 25 variables selected for data set 2 (AB, H, BB, PA, BA, OBP, SLG, OPS, Pit, Str, PO, IP, H, BB, HR, ERA, BF, Pit, Str, Cct, FB, GSc, IR, IS, H/A), 13 were related to all pitchers. The use of all pitcher game data leads to more accurate predictions of game outcomes than the use of only SP data.