# InfNets Signal Classification Based on Deep Learning in Rock-Paper-Scissors Imagery Task
## 5 Results and Discussion
CNN-based TSC methods (Inception and ResNet) obtained a higher classification accuracy than non-TSC methods (SVM etc. ), which shows that the CNN-based TSC methods have a huge advantage in FNIRS classification. Compared with the TSC method in the finger tapping task of left and right hand-motion imagery [28], the CNN-based method can also achieve good classification results for shorter duration, more classes and more complex tasks. This is because the TSC methods have the ability to make full use of the rich pattern features contained in the time series through convolution, and these useful pattern features are an important basis for accurate classification. For shorter tasks, the information contained in each moment is very valuable, so we use a more appropriate kernel length of one-dimensional convolutional neural network (a shorter time series should use a shorter convolution kernel), so that it can better adapt to the length of the input time series. When the dataset contains more classes, it will be more difficult to classify. The CNN-based TSC methods still achieved good results in three classifications due to their powerful feature-extraction abilities. More complex tasks correspond to more complex FNIRS signals. If the difference between these signals is small, the TSC methods will pay more attention to the main pattern features, so more complex tasks will make classification more difficult; if these signals have a very big difference, this is conducive to the extraction of feature patterns to some extent and helps to improve the classification effect. The cross-entropy loss of Inception with HbT matrix input (which achieved the best classification result) training process is shown in Figure 10a, and the test accuracy changes are shown in Figure 10b. After 300 epochs, the classification model converged to a stable point. Table 3 shows the confusion matrix of Inception result when the HbT matrix is input. The testset contains 132 trials in total, and only three trials were predicted to fail. It can be seen that rock and scissors are more difficult to distinguish, compared with other task classifications. This may be related to the similar motion imagery of making a fist in both rock and scissors. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **HbO** & **HbR** & **HbT** & **Average** \\ \hline Perceptron & 0.38 & 0.33 & 0.44 & 0.38 \\ LDA & 0.43 & 0.45 & 0.49 & 0.46 \\ KNN & 0.81 & 0.77 & 0.87 & 0.82 \\ Adaboost & 0.65 & 0.63 & 0.67 & 0.65 \\ DecisionTree & 0.74 & 0.76 & 0.82 & 0.77 \\ RF & 0.67 & 0.66 & 0.70 & 0.68 \\ SVM & 0.51 & 0.32 & 0.73 & 0.52 \\ MLP & 0.57 & 0.48 & 0.58 & 0.54 \\ Inception & **0.88** & **0.84** & **0.97** & **0.90** \\ ResNet & 0.84 & 0.78 & 0.96 & 0.86 \\ Average & 0.65 & 0.60 & 0.72 & \\ \hline \hline \end{tabular} The highest scores in each column is shown in bold.  
\end{table} 
Table 2: Comparison results of different classification methods (traditional and deep learning) with three different hemodynamic matrices. The TSC method Inception achieved the best result in HbT matrix. Figure 11 shows the Receiver Operating Characteristic (ROC) curve and its Area Under Curve (AUC) of Inception result when the HbT matrix is input. There are three curves in Figure 11, each of which is an ROC curve and its AUC calculated by taking one class as a positive class and the other two classes as the negative class. It can be seen that the three curves are very close to the upper left corner, and all of their AUCs tend to be 1. This indicates that Inception achieved an excellent classification performance on fNIRS signal with the rock-paper-scissors task. It took about 2 days to train the ResNet and Inception network with different data preprocessing methods and different input types (HbO, HbR, Hbt), 10 individual times on Intel i9 9900 K CPU, Nvidia RTX2080 Ti GPU. Once the model is trained, we can test new  
Figure 11: Three ROC curve and its AUC in one experiment. Each ROC curve and its AUC is calculated by taking one class as a positive class and the other two classes as a negative class.