# AI-Based Stroke Disease Prediction System Using Real-Time Electromyography Signals
## 4 Experiments and Analysis
### Experiment and Analysis Based on Machine Learning  
EMG bio-signals measure muscle response or electrical activity in response to a nerve's simulation, and they are used to diagnose neuromuscular disorders and balance abnormalities. In this paper, 28 attributes are newly defined and extracted to predict stroke disease based on machine learning using EMG bio-signals. The attributes are extracted from the raw data of the left and right biceps femoris and gastrocnemius muscles (see Table 1). The attributes extracted from EMG raw data were used for the machine learning-based prediction model experiments and multidimensional analysis. At 1500 Hz per second EMG, the variation in muscle movement is considered to be acceptable, and data points were extracted by dividing the EMG raw data into 0.1 s units when extracting the attributes [50, 51, 52, 53]. Data measurements were collected based on the protocols defined in this paper. Our scenario includes standing, walking, raising arms, and sleeping, and only EMG bio-signals collected at this time were used as experimental data. Although experimental data were collected for various activities, only walking data was considered. Table 1 below presents detailed descriptions of the newly defined and extracted EMG attributes in this paper. Figure 4: Example of EMG bio-signals waveform changes while walking. (**a**) stroke patient sample, (**b**) normal sample. In the first experiment, 271 stroke patients and 271 normal patient subjects were tested. The measurement protocol used all 28 attributes obtained from the EMG signals during walking. Table 2 presents the accuracy of each machine learning model based on the EMG data from a total of 542 people. The data set configuration for the experiment was tested by randomly selecting data for training and testing at ratios of 70 to 30 and 80 to 20, respectively, based on the total data. Further, the reliability of the models may be reduced if the number of data is small in a single experiment. Thus, K-fold cross validation was used to compensate for these shortcomings and to analyze how well the dependent variable values in the test data were predicted. As a result of the experiment and analysis, the Random Forest algorithm using all 28 attributes confirmed the highest prediction accuracy of 85.82% in 20-fold cross validation (CV). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Methods Data Sets** & **Train (70)/ Test (30)** & **Train (80)/ Test (20)** & **5-Fold CV** & **10-Fold CV 1** & **20-Fold CV** \\ \hline C4.5 Decision Tree & 78.22 & 78.23 & 78.78 & 79.65 & 79.43 \\ C5.0 Decision Tree & 79.48 & 79.68 & 80.01 & 80.32 & 80.29 \\ Naïve Bayes & 62.82 & 63.06 & 62.81 & 62.80 & 62.85 \\ Logistic Regression & & & & & \\ (LR) & 71.45 & 70.25 & 70.33 & 70.33 & 70.33 \\ ANN (MLP) & 66.16 & 59.17 & 64.47 & 68.63 & 66.15 \\ Random Forest (RF) & 85.03 & 85.35 & 85.67 & 85.78 & 85.82 \\ C\&RT & 77.25 & 77.38 & 77.44 & 77.48 & 77.59 \\ CHAID & 77.01 & 77.12 & 77.57 & 77.41 & 77.37 \\ Two-Class SVM & 71.12 & 70.58 & 71.18 & 71.47 & 71.51 \\ \hline \hline \end{tabular}  
* CV: Cross Validation.  
\end{table} 
Table 2: Prediction accuracy of stroke by machine learning algorithm with all 28 attributes (%).