# EEG Pattern Classification of Picking and Coordination Using Anonymous Random Walks
## 3 Data Processing and Analysis
### Coherence Pattern Classification Based on Random Walk Approach  
In this section, we describe the construction of a multi-class hierarchical classifier [40; 41] composed of the two binary classifiers described earlier in Sections 3.2 and 3.3 (see Figure 5). The classifier pipeline is composed of the following stages. First, following signal preprocessing, the EEG signal is transformed into a coherence graph and undergoes a process of embedding using bag of node degrees to classify it as either a non-task- or task-related process. The signals identified as task-related will then undergo an embedding process based on anonymous random walks and will be transferred to the second classification stage to evaluate the associated cognitive state (picking or coordination).  
Figure 5: The hierarchical classification process.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & & \multicolumn{2}{c}{**Predicted Classes**} & \multicolumn{1}{c}{**True**} & \multicolumn{1}{c}{**False**} \\  & & **Picking** & **Coordination** & **Positive** & **Negative** \\  & **P = 0** & **P = 1** & **Rate** & **Rate** \\ \hline \multirow{3}{*}{**True**} & Picking & \multirow{3}{*}{106} & \multirow{3}{*}{14} & \multirow{3}{*}{88.33\%} & \multirow{3}{*}{11.67\%} \\  & P = 0 & & & \\ \cline{1-1} \cline{2-4}
**Classes** & Coordination & & & \\ \cline{1-1} \cline{2-4}
**P = 1** & & & & \\ \hline \multicolumn{2}{c}{Positive Predicted Value} & \multicolumn{1}{c}{92.17\%} & \multicolumn{1}{c}{88.80\%} & \multicolumn{1}{c}{**Prediction Accuracy**} \\ \hline \multicolumn{2}{c}{False Discovery Rate} & \multicolumn{1}{c}{7.83\%} & \multicolumn{1}{c}{11.20\%} & \multicolumn{1}{c}{**90.42\%**} \\ \hline \hline \end{tabular}
\end{table}
Table 3: Classification results—random forest using anonymous walk of length 5.  
The hierarchical classification reduces the mathematical complexity of the algorithm since, at the first stage, we use a simple embedding process (bag of nodes) that filters one class (i.e., resting state) from the entire dataset. Only then do we continue with a more complex stochastic embedding process (anonymous random walks) applied on the rest of the data. In order to achieve optimal results, we re-trained the first classifier, which failed to differentiate between the three classes (Section 3.2) as a binary classifier within the framework of the hierarchical classifier (Figure 5). The results of the hierarchical classifier are presented in Table 4. Note that the results displayed in Table 4 are based on the data presented in Tables 2 and 3 and were already described in Sections 3.2 and 3.3. The Table summarizes the results of the hierarchical multiclass classifier aimed to differentiate between the three experimental conditions using graph embedding feature representation based on coherence.  
The overall accuracy of the classifier was 96.55%, while the PPV of the resting-state class (first level of the classifier) was 99.33%, and the PPV of the picking and coordination classes (second level of the classifier) was 90.60% and 88.8%, respectively. The TPR of the resting-state class (first level of the classifier) was 99.00%, and the TPR of the picking and coordination classes (second level of the classifier) was 88.33% and 92.50%, respectively. In order to estimate the hierarchical classifier while reducing possible bias caused by either the PPV or the TPR, we combined both indices by computing their harmonic mean, i.e., the F1 score index, as presented in Table 5.