# Analyzing Brain Waves of Table Tennis Players with Machine Learning for Stress Classification
## 3 Results and Discussion
### Performance Evaluation of Classification Models  
In this study, the algorithms of LR, SVM, C4.5, CART, RF, and GXBoost were used for comparison (see Table 1 for the parameters for the model), and a generalizing and a personalizing stress model were built. The generalizing stress model is a stress detection model built by mixing the data of all persons, whereas the personalizing stress model is one built based on their individual data. For the analytic results of stress classification, see Tables 2-7 and Figures 4-7. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & **Parameter Name** & **Parameter Value** \\ \hline LR & Penalty & L2 \\  & Penalty coefficient & 100 \\ \hline SVM & Kernel function & RBF \\  & kernel coefficient \(\gamma\) & \(1/64\) \\  & Penalty coefficient & 100 \\ \hline C4.5 & Feature selection criteria & Information gain ratio \\  & Maximum number of features when branching & No limit \\  & Maximum depth & No limit \\  & Minimum number of samples for node splitting & 2 \\  & Minimum number of samples for leaf nodes & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Table of the model parameters. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Acc** & **Pre** & **Rec** & **F1** \\ \hline C4.5 & 0.7223 & 0.7226 & 0.7232 & 0.7219 \\ CART & 0.7210 & 0.7217 & 0.7206 & 0.7203 \\ LR & 0.6749 & 0.6778 & 0.6751 & 0.6741 \\ RF & 0.8013 & 0.8021 & 0.8024 & 0.8009 \\ SVM & 0.7864 & 0.7868 & 0.7867 & 0.7853 \\ XGBoost & **0.8649** & **0.8657** & **0.8653** & **0.8647** \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Generalizing model for the three-level stress classification. Figure 4: The accuracy and 95% confidence intervals of the generalizing models for the three-level classification. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Model** & **Parameter Name** & **Parameter Value** \\ \hline CART & Feature selection criteria & Gini \\  & Maximum number of features when branching & No limit \\  & Maximum depth & No limit \\  & Minimum number of samples for node splitting & 2 \\  & Minimum number of samples for leaf nodes & 1 \\ \hline RF & The number of trees & 1000 \\  & Feature selection criteria & Gini \\  & Maximum number of features when branching & No limit \\  & Maximum depth & 3 \\  & Minimum number of samples for node splitting & 2 \\  & Minimum number of samples for leaf nodes & 1 \\ \hline XGBoost & The number of trees & 100 \\  & Maximum depth & 6 \\  & Learning rate \(\eta\) & 0.3 \\  & Penalty & L2 \\  & Penalty coefficient & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._The results in Figure 4 indicate that, among all the assessing indicators, GXBoost is always the highest, with an accuracy of 86.49%. The results in Figure 5 indicate that, among all the assessing indicators, GXBoost is always the highest, with an accuracy of 94.27%. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Acc** & **Pre** & **Rec** & **F1** & **MCC** \\ \hline C4.5 & 0.8567 & 0.8569 & 0.8556 & 0.8559 & 0.7133 \\ CART & 0.8462 & 0.8376 & 0.8573 & 0.8469 & 0.6928 \\ LR & 0.7959 & 0.7948 & 0.7975 & 0.7956 & 0.5919 \\ RF & 0.8761 & 0.8871 & 0.8599 & 0.8731 & 0.7521 \\ SVM & 0.8958 & 0.8883 & 0.9049 & 0.8964 & 0.7910 \\ XGBoost & **0.9243** & **0.9137** & **0.9364** & **0.9248** & **0.8485** \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Generalizing model for the two-level stress classification (mid and low stresses). Figure 5: The accuracy and 95% confidence intervals of the generalizing models for the two-level classification (high and low stresses).