# Comparison of ECG Between Gameplay and Seated Rest: Machine Learning-Based Classification
## 3 Results  
To evaluate the performance of different classification models in distinguishing between gaming and resting states, we analyzed the results for both 5 min and 10 min data segments. For the 5 min data segments, the results were recall: 0.785 \(\pm\) 0.121; precision: 0.788 \(\pm\) 0.122; F-score: 0.783 \(\pm\) 0.11; PR-AUC: 0.868 \(\pm\) 0.095. For the 10 min data segments, the results were recall: 0.858 \(\pm\) 0.105; precision: 0.858 \(\pm\) 0.105; F-score: 0.858 \(\pm\) 0.105; PR_auc 0.906 \(\pm\) 0.066. Among all classifiers tested, One-Class SVM (OCS) with k = 3 consistently achieved the highest performance in both conditions (Figures 1 and 2). These values indicate that the model was able to effectively identify gaming participants while maintaining a balance between precision and recall (Tables 2 and 3).  
Figure 1: The 5 min analysis. (**a**) shows recall, (**b**) shows precision, (**c**) shows F-score, and (**d**) shows PR auc (precision–recall area under the curve). The blue bars indicate a K value = 3, the red bars indicate a K value = 4, and the green bars indicate a K value = 5. Indices with a mean \(\pm\) S.D. larger than 1 are presented as a range (max–min). Precision: OCS (k = 4, 0.947–0.361); PR_auc: OCS (k = 4; 0.995–0.496, k = 5; 0.992–0.557); PR_auc: ILF (k = 3; 0.977–0.617, k = 4; 1–0.551, k = 5; 0.992–0.612).  
Figure 2: Figure (**a**) shows recall, (**b**) shows precision, (**c**) shows F-score, and (**d**) shows PR-auc (Precision-Recall AUC). The blue bars show K = 3, the red bars K = 4, and the green bars K = 5. The 10 min analysis. In k-fold cross-validation, K is a parameter that determines how many groups (folds) the dataset is divided into. The mechanism of k-fold cross-validation is to first divide the data into K folds (subsets) of equal size, and then perform K training and testing. Each time, one fold is used as test data, and the remaining K-1 folds are used as training data. After that, the process is repeated so that each fold is used as test data once. The average of the K test results is the final evaluation value of the model. The value of K affects the generalization performance and computational cost of the model. In this analysis, because the size of the training data is large, a small K (3–5) was selected, which has the advantage of being easy to learn. A small K tends to result in large variation in evaluation, while a large K increases the computational cost, but the evaluation is stable. Precision: OCS (k = 4; 1–0.370, k = 5; 1–0.422); PR_auc: OCS (k = 4; 1–0.516, k = 5; 1–0.373); PR_auc: ILF (k = 4; 1–0.492, k = 5; 1–0.448); PR_auc: LOF (k = 4; 1–0.375, k = 5; 1–0.373).  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Participants** & **MRR [ms]** & **SDRR** & **VLF** & **LF [In, ms\({}^{2}\)]** & **HF** & **LF/HF** & **HF** & **HF Freq [Hz]** \\  & & **[ms]** & **[In, ms\({}^{2}\)]** & **LF [In, ms\({}^{2}\)]** & **[In, ms\({}^{2}\)]** & **[Ratio]** & **HF Freq [Hz]** \\ \hline G1 & 803 & 91 & 8.30 & 6.89 & 5.02 & 6.44 & 0.228 \\ G2 & 724 & 78 & 7.94 & 7.19 & 5.58 & 5.01 & 0.233 \\ G3 & 722 & 90 & 8.01 & 7.42 & 6.20 & 3.38 & 0.243 \\ G4 & 637 & 33 & 5.61 & 5.71 & 4.33 & 3.97 & 0.246 \\ G5 & 511 & 44 & 6.35 & 6.23 & 4.71 & 4.56 & 0.228 \\ G6 & 776 & 74 & 7.30 & 7.14 & 6.18 & 2.61 & 0.234 \\ \hline Mean \(\pm\) S.D. & 696 \(\pm\) 98 & 69 \(\pm\) 22 & 7.25 \(\pm\) 0.97 & 6.76 \(\pm\) 0.60 & 5.34 \(\pm\) 0.71 & 4.33 \(\pm\) 1.22 & 0.235 \(\pm\) 0.007 \\ \hline \hline \end{tabular}
\end{table}
Table 2: HRV index of the gaming group.