Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 4 (March 2018) 283–286___________________________________________________________________________________________________________Enhancing EEG Signals Recognition Using ROC Curve
Takashi Kuremoto1, Yuki Baba2, Masanao Obayashi1, Shingo Mabu1, Kunikazu Kobayashi3
1

Graduate School of Science and Technology for Innovation, Yamaguchi University, Tokiwadai 2-16-1,Ube, Yamaguchi 755-8611, JAPAN
2
Graduate School of Science and Engineering, Yamaguchi University, Tokiwadai 2-16-1,Ube, Yamaguchi 755-8611, JAPAN3

School of Information Science and Technology, Aichi Prefectural University, 1522-3 Ibaragabasama,Nagakute, Aichi 480-1198, JAPANE-mail: {wu, v033vk, m.obayas, mabu}@yamaguchi-u.ac.jp, kobayashi@ist.aichi-pu.ac.jp

Abstract
Mental tasks, such as calculation, reasoning, motor imagery, etc., can be recognized by the pattern ofelectroencephalograph (EEG) signals. So EEG signal recognition plays an important role in brain-computer interaction(BCI). In this study, to enhance the ability of classifiers such as support vector machine (SVM), deep neural networks(DNN), k-nearest neighbor method (kNN), decision tree (DT), a feature extraction method is proposed using techniquesof fast Fourier transform (FFT) and receiver operating characteristic (ROC) curve. In the proposed method, the raw
EEG data was transformed into power spectrum of FFT at first, and then to find frequencies decided by area undercurve (AUC) of ROC between the value of spectrums of different classes of metal tasks. Experiment results using
benchmark data and BCI competition II data showed the effectiveness of the proposed method for all above classifiers.
Keywords: EEG, FFT, ROC, AUC, SVM

characterized phases of raw EEG signals in our previousworks [6].
In this paper, we propose a novel method using
FFT and the value of area under curve (AUC) ofreceiver operating characteristic (ROC) curves to extract
the feature of EEG signal and verified its effectivenesswith kinds of classifiers: kernel-support vector machine(k-SVM), multi-layered perceptron (MLP), deep neuralnetworks (DNN), k-nearest neighbor method (kNN),
and decision tree (DT). Benchmark data of EEGclassification [7] and BCI competition II data [8] wereused in the experiments to confirm the effectiveness ofthe proposed feature extraction method.

1. Introduction
The electronic potential signals of electrodes,
which are arrayed on the surface of head, are measured
by electroencephalograph and these signals are called as“Electroencephalogram”, i.e., “EEG. EEG is also called
brain wave data. When different metal tasks such as
motor imagery, calculation, number counting, article
considering, and so on, different patterns of EEG signals
can be observed. So the analysis and recognition of
EEG signal is one of the way to realized brain computerinterface (BCI), or brain machine interface (BMI), i.e.,
people can control the machines or robots by theirimaginations [1] [2]. Feature extraction of the EEG
signal plays a very important role of mental task
recognition to enhance the accuracy and there have been
many studies of this theme [3] [4]. In [5], Obayashi et al.
proposed to use the nonlinear normalized feature spacesof fast Fourier transformation (FFT) of EEG signals.
And the method was improved by selecting the most

2. Method
To extract the feature vector space of EEG signal for
mental task recognition, we propose to use FFT andROC to find the limited frequencies which AUC values
are high when two classes EEG data are compared inCopyright © 2018, the Authors. Published by Atlantis Press.
This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-nc/4.0/).
283

Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 4 (March 2018) 283–286___________________________________________________________________________________________________________the training process, and the power spectrums of thesefrequencies are used as input vector of classifiers.

In Fig. 2, the area below the ROC curve is called“area under curve” (AUC). This value takes from 0.0 to1.0, and it is an indicator of the divisibility of the two
distributions. If the value of AUC becomes to 0.5, two
distributions completely overlapped. Conversely, whenthe value of AUC reaches 1.0 (or 0.0), it means that thetwo distributions are completely separated.
ROC was used to classify cDNA microarray
successfully [10] and applied to EEG classification withwavelet transformation (WT) recently [11]. Here, we
propose to use the value to AUC of ROC and FFT todistinguish the two classes EEG signals.

2.1. Fast Fourier Transform (FFT)FFT is a kind of discrete Fourier transform (DFT),
which is used for frequency analysis of signals in thefield of signal processing, invented in 1965 by J. Cooleyand J. Tukey at first, and improved continuously. The
function of FFT is to show the power spectrum ofdifferent frequencies of the time series signals as sameas the original Fourier transform but easily to berealized by computers. In this study, we used the FFTfunction provided by free software package R [9] toprocess the raw EEG signals.

3. Feature Extraction
3.1. Method of using FFT

2.2. Receiver operating characteristic (ROC) curve
Assume that two classes data class A and class B
have their probability density functions as shown in Fig.
1. The true positivity of class A will be the shadowed
area α in the left and the false positives area 1 – β inmore shadowed area. As α and 1 - β are plotted whilesliding the threshold along the x axis, a graph as shownin Fig. 2 is obtained. The curve in this graph is called
the ROC curve and it shows the divisibility of the twoprobability density functions. If two distributions
completely overlap, the for any position of thethreshold we have that α =1 – β.

Suppose that an EEG signal x m,n (m=1, 2, …, M,n=1, 2, …, N) is given. m indicates the number ofchannels, and n indicates the number of samples inchannel m. The procedure of the conventional method
using FFT to extract the feature of EEG [6] is as follows.
Step 1 Divides the EEG signal of all the channels m into
multiple windows l (l=1, 2, …, L) along the time
domain.
Step 2 Perform FFT on all of the divided windows, andlet the result be Fm ,l .
Step 3 Compare the power spectrum of the window l ofthe channel m to its adjacent window l + 1, andcalculate the difference Dm (l ) of the frequencyspectrum.
Dm , ( l ) l  L 1

 | Fm ,l 1  Fm ,l |(1)l 1

Step 4 From Step 3, the maximum Dm (l ) in the channel
m is determined, and power spectrum in a regionof 4 to 45 Hz in the frequency band of thewindow l is used as a feature space for classifiers
such as SVM, multi-layer perceptron (MLP), andso on.

Fig. 1 Overlapping of the probabilities of two classes data.

3.2. Method of using FFT and ROC Curve
Let the input signals be xk c , m , n (c=1 or 2, k=1, 2, …,K), where k indicates the kth EEG signal of a set of EEG
data, and c indicates the class of mental task. m and n
are the same as in section 3.1. The procedure of thenovel method is as follows.

Fig. 2 AUC of a ROC curve284

Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 4 (March 2018) 283–286___________________________________________________________________________________________________________Step 1 Perform FFT to all the EEG signals xk c , m , n andperformed. Two kinds of EEG data are used: (i) abenchmark data provided by Colorado State University[7] and (ii) BCI Competition II generated by Birbaumer[8]. In the case of (i), there are 5 kinds of mental tasks(see Table 1) were requested to subjects, and their EEG
data were obtained 10 trials with 7 channels. Meanwhilein (ii), there are 2 data sets named “Ia” and “Ib” which
are EEG data obtained by 2 kinds of tasks: Ia was askedto recognize visual objects displayed on the top orbottom of monitor and move a cursor up or down, andIb with the same tasks but with not only visuallypresentation but also auditorily. Details of EEG data
used in our experiments are listed in Table 2.

let the result be Fk c , m , p where p indicates theorder number of frequencies.
Step 2 Obtain Pk1 , m , p and Pk 2 , m , p , which are two
probability density functions of Fk c , m , p at p
frequency where class c = 1 and 2 of K signals ofchannel m.
Step 3 Calculate the ROC curve and its AUC Am, p of
Pk1 , m , p and Pk 2 , m , p .

Step 4 Repeat Step 2 and Step 3 on all channels, a set
Am, p of frequency p in channel m is obtained.
Step 5 Find P points of frequencies which Am, p is high.
Step 6 Power spectrum Em, p (p=1, 2, …, P) of theTable 1 Mental tasks in a benchmark database [7].

unknown EEG signal are used to as input feature
vector of a classifier.

Contents
Relaxing as much as possible
Calculating multiplication mentally.
Considering the contents of the letter
Imagining rotation of a 3-D object
Imagining writing a number in order

Mental Task
Baseline
Multiplication
Letter-composing
Rotation
Counting

Table 2 EEG data used in the experiments.
(a) The raw EEG data
Database

Mental Data
Tasks Sets

Benchmark[7]
Ia [8]
Ib [8]

Chan Samples
nels perChannelSampling
Freq.

51072500

250

22135/133
100

67896
1152

256256(b) FFT results
Table 3

Recognition rate (%) of Benchmark data [7]Methods(c) AUC of FFT of 2 kinds of mental tasks
Fig. 3 The procedure to obtain AUC

The procedure of how AUC of FFT of 2 kinds ofEEG data patterns is shown in Fig. 3 Frequencies withenough high values of AUC in Fig. 3 (c) are chosen as
input features to classifiers.
4.

285(proposed) 140 dim.

FFT 140 dim.

97.5

59.6

MLP

55.0

49.6

kNN

73.3

55.9

DNN

95.4

61.7

DT

50.0

34.5

Methods

Mental task recognition experiments using EEG data
and the methods introduced in Section 3 were

The change ofkSVM

Table 4Recognition Experiment

FFT with ROC

Recognition rate (%) of Ia data [8]FFT with ROC

The change of(proposed) 1120 dim.

FFT 1120 dim.

kSVM

91.2

59.0

MLP

70.9.

50.0

kNN

55.8

55.5

Journal of Robotics, Networking and Artificial Life, Vol. 4, No. 4 (March 2018) 283–286___________________________________________________________________________________________________________DNN

86.1

62.1

DT

73.2

43.2

recognition ability than the conventional methods
including the conventional FFT feature extraction
method and others. We also used ROC of raw EEG dataand ROC of wavelet transform (WT) as the input of kSVM, MLP, kNN, DNN, and DT, and experimentresults showed that the proposed method, i.e., featuresof EEG data extracted by ROC of FFT, were superior tothe conventional feature extraction method.

Kernel SVM (k-SVM), MLP, kNN, DNN, DT wereused as classifiers. Functions Kernlab, nnet, class,h2o(+JavaVM), rpart corresponding to the above
classifiers, and ROC package in R [9] were utilized inour experiments.
The recognition results by the different classifiers
and feature extraction methods for EEG signals areshown in Tables 3, 4, and 5. The classification rates of
the conventional method [6] (FFT) were lower than therecognition rate of the proposed method (FFT+ROC) inall cases of EEG data. Specially, kSVM showed thebest performance among these classifiers in the case of
the proposed feature extraction method.
Table 5Methods

This work was supported by JSPS KAKENHI Grant No.
26330254 and No.25330287.
References
1.

N. Birbaumer, L. G. Cohen, Brain-computer interfaces:
communication and restoration of movement in paralysis,
Journal of Physiology, Vol. 579, pp. 621-636, 2006
2. F. Lotte, M. Congedo, A.Lecuyer, F. Lamarche, B.
Arnaldi, A review of classification algorithms for EEGbased brain-computer interfaces, Journal of NeuralEngineering, Vol. 4, pp. 24-48, 2007
3. N. Jrad, M. Conedo, Identification of spatial andtemporal features of EEG, Neurocomputing, Vol. 90,
pp.66-71, 2012
4. A.S. Al-Fahoum, A. A. Al-Fraihat, Methods of EEG
signal features extraction using linear analysis infrequency and time frequency domains, ISRN
Neuroscience, Vol. 2014, 7 pages, 2014
5. M. Obayashi, K. Watanabe, T. Kuremoto, K. Kobayashi,
Development of a brain computer interface using
inexpensive commercial EEG sensor with one-channel,
Proceedings of the 17th International Symposium on
Artificial Life and Robotics (ISAROB 2012), pp. 714-717,
2012
6. T. Kuremoto, Y. Baba, M. Obayashi, S. Mabu, K.
Kobayashi, To extraction the feature of EEG signals formental task recognition, Proceedings of 54th Annual
Conference of the SICE, pp. 353-358, 2015
7. Colorado State University, Brain-Computer Interfaces
Laboratory: http://www.cs.colostate.edu/eeg/
8. BCI competition II:
http://www.bbci.de/competition/ii/#datasets
9. The R Project for Statistical Computing: https://www.rproject.org/
10. H. Mamitsuka, Selecting features in microarrayclassification using ROC curves, Pattern Recognition,
Vol. 39, Issue 12, pp. 2393-2404, 2006
11. T. Nguyen, A. Khosravi, D. Creighton, S. Nahavandi,
EEG signal classification for BCI applications bywavelets and interval type-2 fuzzy logic systems, Expert
Systems with Applications, Vol. 42, pp. 4370–4380, 2015

Recognition rate (%) Ib data [8]FFT with ROC

The change of(proposed) 1120 dim.

FFT 110 dim.

kSVM

77.7

53.9

MLP

49.1

53.4

kNN

57.8

48.3

DNN

75.3

DT

55.6

Table 6

Acknowledgements

49.3
48.0

Recognition rate (%) of BCI Competition II [8]DataKernel SVM using

Wavelet transform

proposed

andfeatureextraction method

fuzzylogicsystem [11].

Ia

91.23

90.10

Ib

77.65

56.67

The highest recognition rates of kSVM using ourfeature extraction method for Ia and Ib are 91.23% and77.65%, higher than the best classification rates 90.10%
and 56.67% of T. Nguyen et al. [11] respectively (Table6).
5. Conclusion
In this paper, we proposed a feature extraction
method for EEG pattern recognition. The proposed
method uses the AUC value of ROC curves of FFT
results for two classes EEG signals to decide the featurevector space for classifiers. Classification experiments
were performed using the Gaussian kernel SVM (kSVM) to confirm the proposed method. As the result ofthe experiments, the proposed method showed its higher286