# Multi-Class Sleep Stage Analysis and Adaptive Pattern Recognition
## 3 Results
The highest true-positive rate was achieved for the second (NonREM) class and all these sets. Figure 7 presents the target and predicted classes of three selected patients with sleep apnea classified into three classes, including (a) class 1 (Wake), (b) class 2 (NonREM), and (c) class 3 (REM). The associated ROC characteristics in Figure 7d show the true positive rate of each class against the false positive rate of all other classes. The final results including the accuracy and the performance of neural network models for different sleep disorders and male/female sets of individuals are presented in Figure 8. The results show the similarity in the accuracy for features evaluated from the single EEG channel (F5) and different multimodal (EEG, Flow and OCG) channels (F12). The slightly lower accuracy achieved for females in this case can be explained by the higher deviations of the associated features. The mean classification accuracy is 88.7% (STD: 2.1) and 89.6% (STD: 1.9), respectively, for the given sets of records and classification using single (F5) and multimodal (F12) features. This result can be explained \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multicolumn{2}{c}{_Training Set_} & \multicolumn{5}{c}{_Target Class_} \\ \cline{3-6}  & \(k\) & **1** & **2** & **3** & \(\mathit{FP}\left(k\right)\mathit{PPV}\left(k\right)\)** \\ \hline \multirow{3}{*}{_Output Class_} & 1 & **4644** & 601 & 236 & 837 & 84.7\% \\ \cline{2-6}  & 2 & 368 & **10,971** & 534 & 902 & 92.4\% \\ \cline{2-6}  & 3 & 152 & 405 & **1958** & 557 & 77.9\% \\ \hline \multirow{3}{*}{} & \(\mathit{FN}\left(k\right)\) & 520 & 1006 & 770 & _ACC: 88.4\%_ \\ \cline{2-6}  & \(\mathit{TPR}\left(k\right)\) & 89.9\% & 91.6\% & 71.8\% & _Error: 11.6\%_ \\ \hline \multicolumn{2}{c}{_Validation Set_} & \multicolumn{5}{c}{_Target Class_} \\ \cline{3-6}  & \(k\) & **1** & **2** & **3** & \(\mathit{FP}\left(k\right)\mathit{PPV}\left(k\right)\)** \\ \hline \multirow{3}{*}{_Output Class_} & 1 & **1007** & 144 & 38 & 182 & 84.7\% \\ \cline{2-6}  & 2 & 85 & **2304** & 114 & 199 & 92.0\% \\ \cline{2-6}  & 3 & 44 & 95 & **421** & 139 & 75.2\% \\ \hline \multirow{3}{*}{} & \(\mathit{FN}\left(k\right)\) & 129 & 239 & 152 & _ACC: 87.8\%_ \\ \cline{2-6}  & \(\mathit{TPR}\left(k\right)\) & 88.6\% & 90.6\% & 73.5\% & _Error: 12.2\%_ \\ \hline \multicolumn{2}{c}{_Test Set_} & \multicolumn{5}{c}{_Target Class_} \\ \cline{3-6}  & \(k\) & **1** & **2** & **3** & \(\mathit{FP}\left(k\right)\mathit{PPV}\left(k\right)\)** \\ \hline \multirow{3}{*}{_Output Class_} & 1 & **1007** & 155 & 49 & 204 & 83.2\% \\ \cline{2-6}  & 2 & 76 & **2337** & 106 & 182 & 92.8\% \\ \cline{2-6}  & 3 & 34 & 79 & **416** & 113 & 78.6\% \\ \hline \multirow{3}{*}{} & \(\mathit{FN}\left(k\right)\) & 110 & 234 & 155 & _ACC: 88.3\%_ \\ \cline{2-6}  & \(\mathit{TPR}\left(k\right)\) & 90.2\% & 90.9\% & 72.9\% & _Error: 11.7\%_ \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Confusion matrix of the classification neural network model for the training, validation, and test sets of sleep stages (for healthy individuals) with true positive values on the matrix diagonal (in the bold). by the presence of additional attributes in the EEG channel. The accuracy achieved corresponds with that published in [25] for a smaller group of individuals and different feature sets. Table 8 presents the summary of both the achieved global classification accuracy, the \(K\)-fold cross-validation errors (for \(K=10\)) and the precision of classification into three classes over all sleep disorders with associated detailed values summarized in Table 6.