# Machine-Learning-Based Elderly Stroke Monitoring System Using Electroencephalography Vital Signals
## 4 Experiment and Analysis
### Experiment Based on Machine-Learning Methodology
#### 4.3.1 Predicting and Analyzing Stroke Diseases Based on Power Values
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \multirow{2}{*}{**Data Sets**} & \multicolumn{2}{c}{**Train (67)/**} & \multicolumn{2}{c}{**Train (80)/**} & \multicolumn{2}{c}{**5-Fold CV**} & \multicolumn{2}{c}{**10-Fold CV**} & \multicolumn{2}{c}{**20-Fold CV**} \\ \cline{2-11}  & **Test (33)** & **Test (20)** & **Test (20)** & **Test (20)** & **Test (20)** & **Test (20)** & **Test (20)** & **Test (20)** \\ \hline RandomForest & 92.4 & 92.6 & 91.9 & 92.1 & 90.7 & 90.9 & 91.0 & 91.2 & 91.1 & 91.3 \\ C4.5 DT & 88.4 & 88.4 & 87.2 & 87.2 & 87.8 & 87.8 & 88.2 & 88.2 & 88.0 & 88.0 \\ C5.0 DT & 84.9 & 84.9 & 83.2 & 83.1 & 83.9 & 83.9 & 84.7 & 84.6 & 84.4 & 84.4 \\ Naive Bayes & 75.7 & 78.7 & 75.4 & 78.5 & 74.4 & 77.1 & 74.5 & 77.2 & 74.5 & 77.2 \\ LR & 84.9 & 84.9 & 85.3 & 85.3 & 83.9 & 84.0 & 84.0 & 84.0 & 84.1 & 84.1 \\ MLP(ANN) & 89.2 & 89.2 & 90.5 & 90.7 & 88.9 & 89.4 & 90.7 & 90.7 & 89.8 & 89.9 \\ SVM & 81.6 & 81.5 & 82.1 & 82.1 & 82.4 & 82.3 & 82.7 & 82.6 & 82.6 & 82.7 \\ ADTree & 85.6 & 85.7 & 86.9 & 86.8 & 88.8 & 88.9 & 89.9 & 89.9 & 89.7 & 89.7 \\ C\&RT & 83.1 & 83.1 & 83.2 & 83.2 & 83.3 & 83.3 & 84.3 & 84.2 & 84.3 & 84.3 \\ QUEST & 78.5 & 78.6 & 77.9 & 77.9 & 78.3 & 78.4 & 79.7 & 79.7 & 79.5 & 79.6 \\ \hline \end{tabular} \({}^{1}\) Prec.: Precision.  
\end{table} 
Table 6: Recall and Precision (%) for each algorithm using EEG power values. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \multirow{2}{*}{**Methods**} & \multicolumn{2}{c}{**Train (67)/**} & \multicolumn{2}{c}{**Train (80)/**} & \multicolumn{2}{c}{**5-Fold CV \({}^{1}\)**} & \multicolumn{2}{c}{**10-Fold CV**} & \multicolumn{2}{c}{**20-Fold CV**} \\  & **Test (33)** & **Test (20)** & **Test (20)** & **Test (20)** & **Test (20)** & **Test (20)** & **Test (20)** & **Test (20)** \\ \hline RandomForest & 92.37 & 92.4 & 91.92 & 91.9 & 90.66 & 90.6 & 90.95 & 90.9 & 91.07 & 91.1 \\ C4.5 DT \({}^{4}\) & 88.35 & 88.3 & 87.15 & 87.2 & 87.81 & 87.8 & 88.18 & 88.2 & 87.98 & 88.0 \\ C5.0 DT & 84.89 & 84.8 & 83.14 & 83.2 & 83.92 & 83.9 & 84.67 & 84.5 & 84.43 & 84.4 \\ Naive Bayes & 75.67 & 75.1 & 75.43 & 75.0 & 74.44 & 73.8 & 74.46 & 73.8 & 74.47 & 73.8 \\ LR \({}^{5}\) & 84.90 & 84.9 & 85.29 & 85.3 & 83.95 & 83.9 & 83.9 & 84.0 & 84.0 & 84.06 & 84.1 \\ MLP(ANN) \({}^{6}\) & 89.17 & 89.2 & 90.47 & 90.6 & 89.64 & 88.9 & 90.68 & 90.7 & 89.89 & 89.8 \\ SVM & 81.56 & 81.5 & 82.08 & 82.1 & 82.44 & 82.4 & 82.72 & 82.7 & 82.68 & 82.7 \\ ADTree & 85.63 & 85.6 & 86.82 & 86.8 & 88.86 & 88.9 & 89.91 & 89.9 & 89.66 & 89.7 \\ C\&RT & 83.09 & 83.1 & 83.2 & 83.2 & 83.27 & 83.3 & 84.28 & 84.2 & 84.32 & 84.3 \\ QUEST & 78.57 & 78.6 & 77.92 & 77.9 & 78.3 & 78.4 & 79.7 & 79.7 & 79.5 & 79.6 \\ \hline \end{tabular} \({}^{1}\) CV: Cross-Validation, \({}^{2}\) Acc.: Accuracy, \({}^{3}\) F1: F1-score, \({}^{4}\) DT: Decision Tree, \({}^{5}\) LR: Logistic Regression, \({}^{6}\) MLP: Multi-Layer Perceptron.  
\end{table} 
Table 5: Prediction accuracy and F1-score (%) for each algorithm using EEG power values. by about 1% in performance indicators including accuracy. However, by reducing the number of attributes used in the experiment by 36, the advantage of using less computing resources and an easier system operation in terms of the service of the stroke prediction model was obtained. In the last experiment employing power values, the optimal set of attributes using Equation (1) is: Fz(\(\theta\)), Fz(\(\theta\)_to_\(\beta\)), Fz(\(IDAR\)), Fz(\(RRRI\)), T7(\(RRI\)), C1(\(DAR\)), Oz(\(IDAR\)), and T8(\(RRI\)). Only eight were tested and analyzed for algorithm-specific predictive accuracy (see Table 2). Comprehensively examining the experimental results, most of the performance indicators were 80%. Regarding the Random Forest algorithm on the 10-fold CV dataset, the accuracy was 87.12%, F1-score 87.4%, recall 87.4%, and precision 87.4%, showing relatively good performance. The accuracy of the C4.5 DT algorithm was 86.39%, F1-score 85.79%, recall 86.4%, and precision 85.2%.