**4. Benchmark data and experiment results**

Open access free website of BCI laboratory of Colorado State University [14, 15] provides Benchmark EEG data with five kinds of mental tasks as shown in **Table 3**. The data were measured by six channels with EEG sensors (See **Figure 10**) and one channel data of an EOG sensor (to measure the movement of an eye). The sampling rate is 250 Hz, and EEG data are recorded in 10 seconds, that is, 2500 time series data obtained by one trial. EEG signals of each mental task are recorded in 10 trials of five subjects. For the ROC analysis classifies two classes data, "Baseline" (relaxing state) and "Multiplication" (Multiplication calculation mentally) data, were used in our experiment. Additionally, training samples and testing samples used EEG data of the same subject, which were chosen randomly with a ratio of 15:5.

The classification accuracies of **Algorithm I** [8], and **Algorithm II** [9] by different classifiers are shown in **Table 4**. In **Table 4**, it is also shown that different dimensionalities of the input vector influenced the classification accuracy. Feature extraction method using **Algorithm II**. (FFT and ROC analysis) had a prior performance especially in the case of 140-dimension input vector. The highest classification accuracy 97.5% was given by kernel SVM classifier, and DNN stood the second position with 95.37% using **Algorithm II** feature extraction method, respectively.

#### **4.1. BCI competition II data and experiment results**

BCI competition II data [16] were also used in the performance comparison of different feature extraction methods. There are two-class data named "Ia" and "Ib," which are EEG data obtained by a healthy subject and an amyotrophic lateral sclerosis (ALS) patient. In each data set, two kinds of mental tasks were required, respectively. One was to move a cursor up (class A) and another was to move the cursor down (class B). Details of these EEG data descriptions are shown in **Table 5**. Additionally, training samples and testing samples were chosen randomly with a

The bold values indicate the best recognition result between different feature extraction algorithms for one classifier in

**Algorithm II**

Mental Task Recognition by EEG Signals: A Novel Approach with ROC Analysis

http://dx.doi.org/10.5772/intechopen.71743

75

**140-D 1120-D 140-D 1120-D**

**(FFT and ROC analysis)**

The accuracies of classification of Ia and Ib by different feature extraction methods and classifiers are shown in **Tables 6** and **7**, respectively. **Algorithm II** (FFT and ROC analysis) showed the highest classifications for all classifiers. The highest accuracy for data Ia was 91.23%, given by

**Data set Mental tasks Trials Channels Samples/Ch. Sampling freq.**

Ia 2 135/133 6 896 256 Ib 2 100/100 7 1152 256

ratio of 240:28 for Ia and 180:20 for Ib.

**Table 4.** Classification results of benchmark data [14, 15].

**Table 5.** Description of EEG data of BCI competition II [16].

Unit: %.

the case of benchmark data.

**Figure 10.** Positions of EEG sensors with six channels [8].

**Classifier Feature extraction method**

**Algorithm I (Temporal FFT)**

Kernel SVM 59.58 70 **97.5** 75 MLP 49.58 38.33 **55.0** 52.92 k-Nearest neighbor 55.92 66.67 **73.33** 66.03 Deep neural network 61.67 71.67 **95.37** 94.58 Decision tree 34.5 35.5 **50.0 50.0**


**Table 3.** Mental tasks in a benchmark database [14, 15].

Mental Task Recognition by EEG Signals: A Novel Approach with ROC Analysis http://dx.doi.org/10.5772/intechopen.71743 75

**Figure 10.** Positions of EEG sensors with six channels [8].


Unit: %.

**4. Benchmark data and experiment results**

**Table 2.** Software R [17] and its function used in the experiment.

rpart decision tree (DT)

**Name Function**

74 Human-Robot Interaction - Theory and Application

ROCR ROC analysis/AUC calculation Kernlab Support vector machine (kernel SVM)

nnet Neural network (MLP) class k-nearest neighbor (kNN) h2o(+JavaVM) deep neural network (DNN)

**4.1. BCI competition II data and experiment results**

Baseline Relaxing as much as possible Multiplication Calculating multiplication mentally. Letter-composing Considering the contents of a letter Rotation Imagining rotation of a 3-D object Counting Imagining writing a number in order

**Mental task Contents**

**Table 3.** Mental tasks in a benchmark database [14, 15].

Open access free website of BCI laboratory of Colorado State University [14, 15] provides Benchmark EEG data with five kinds of mental tasks as shown in **Table 3**. The data were measured by six channels with EEG sensors (See **Figure 10**) and one channel data of an EOG sensor (to measure the movement of an eye). The sampling rate is 250 Hz, and EEG data are recorded in 10 seconds, that is, 2500 time series data obtained by one trial. EEG signals of each mental task are recorded in 10 trials of five subjects. For the ROC analysis classifies two classes data, "Baseline" (relaxing state) and "Multiplication" (Multiplication calculation mentally) data, were used in our experiment. Additionally, training samples and testing samples used

The classification accuracies of **Algorithm I** [8], and **Algorithm II** [9] by different classifiers are shown in **Table 4**. In **Table 4**, it is also shown that different dimensionalities of the input vector influenced the classification accuracy. Feature extraction method using **Algorithm II**. (FFT and ROC analysis) had a prior performance especially in the case of 140-dimension input vector. The highest classification accuracy 97.5% was given by kernel SVM classifier, and DNN stood the second position with 95.37% using **Algorithm II** feature extraction method, respectively.

BCI competition II data [16] were also used in the performance comparison of different feature extraction methods. There are two-class data named "Ia" and "Ib," which are EEG data obtained

EEG data of the same subject, which were chosen randomly with a ratio of 15:5.

The bold values indicate the best recognition result between different feature extraction algorithms for one classifier in the case of benchmark data.

**Table 4.** Classification results of benchmark data [14, 15].

by a healthy subject and an amyotrophic lateral sclerosis (ALS) patient. In each data set, two kinds of mental tasks were required, respectively. One was to move a cursor up (class A) and another was to move the cursor down (class B). Details of these EEG data descriptions are shown in **Table 5**. Additionally, training samples and testing samples were chosen randomly with a ratio of 240:28 for Ia and 180:20 for Ib.

The accuracies of classification of Ia and Ib by different feature extraction methods and classifiers are shown in **Tables 6** and **7**, respectively. **Algorithm II** (FFT and ROC analysis) showed the highest classifications for all classifiers. The highest accuracy for data Ia was 91.23%, given by


**Table 5.** Description of EEG data of BCI competition II [16].


intervals of the raw EEG time series data (temporal information) was extracted at first, and the averaged power spectra of frequencies given by FFT within the interval (frequency information) were used as the discriminant features. In **Algorithm II**, event-related frequencies of EEG's FFT were extracted by ROC analysis with high AUCs. The input space for classifiers was composed by all features extracted by two algorithms from multiple channels, so the

Mental Task Recognition by EEG Signals: A Novel Approach with ROC Analysis

http://dx.doi.org/10.5772/intechopen.71743

77

Pattern recognition of EEG signals has been studied for decades, and it plays an important role in the field of human robot interaction (HRI). So, we expect that the feature extraction methods introduced in this chapter can be adopted in the real HRI systems in the near future.

We would like to thank dear Editors for their appropriate advices during the revision of this paper. This work was supported by Grant-in-Aid for Scientific Research (JSPS No. 26330254 &

, Shingo Mabu<sup>1</sup>

[1] Malmivuo J, Plonsey R. Bioelectromagnetism: Principles and Applications of Bioelectric and Biomagnetic Fields. Oxford University Press, Oxford; 1995. http://www.bem.fi/book/

[2] Lotte F, Congedo M, Lecuyer A, Lamarche F, Arnaldi B. A review of classification algorithms for EEG-based brain-computer interfaces. Journal of Neural Engineering. 2007;**4**:

[3] Cheng SY, Hsu HT. Mental Fatigue Measurement Using EEG, Risk Management Trends.

[4] NakayamaK, Inagaki K. A brain computer interface based on neural network with efficient pre-processing. In: Proceedings of 2006 International Symposium on Intelligent

Signal Processing and Communication Systems (ISPACS 2006). 2006. pp. 673-676 [5] Li J, Zhang L. Regularized tensor discriminant analysis for single trial EEG classification

In: Nota G, editor. InTech, Rijeka, Croatia; 2011. pp. 203-228

in BCI. Pattern Recognition Letters. 2010;**31**:619-628

and Kunikazu Kobayashi2

spatial information was also included in these feature extraction methods.

\*, Masanao Obayashi<sup>1</sup>

\*Address all correspondence to: wu@yamaguchi-u.ac.jp

**Acknowledgements**

No. 25330287).

**Author details**

Takashi Kuremoto<sup>1</sup>

**References**

24-48

1 Yamaguchi University, Japan

2 Aichi Prefectural University, Japan

Unit: %.

The bold values indicate the best recognition result between different feature extraction algorithms for one classifier in the case of data Ia.

**Table 6.** Classification results of BCI competition II data Ia [16].


Unit: %.

The bold values indicate the best recognition result between different feature extraction algorithms for one classifier in the case of data Ib.

**Table 7.** Classification results of BCI competition II data Ib [16].

kernel SVM using 1120 dimensions of input vector, which were discriminant features extracted by **Algorithm II**, and the same methods yielded the highest classification rate 77.65% for data Ib. These accuracies are higher than the best classification rates 90.10 and 56.67%, which are the results of a state-of-the-art method of EEG signal recognition [13]. The future work of the improvement of **Algorithm II** is to find the optimal dimensionality of the discriminant feature space. It is hard to consider higher dimensionality results higher classification accuracy as shown in these experiments. It was better to choose 140-D in the case of benchmark data (**Table 4**), and oppositely, 1120-D was more suitable for BCI competition II data (**Tables 6** and **7**).
