You are on page 1of 10

DTD 5

Genetic programming for epileptic pattern recognition


in electroencephalographic signals
Heitor S. Lopes
*
Laboratorio de Bioinformatica, Universidade Tecnologica Federal do Parana, Av. 7 de setembro,
3165-Curitiba, Parana 80230-901, Brazil
Received 27 September 2004; received in revised form 12 May 2005; accepted 11 July 2005
Abstract
This paper reports how the genetic programming paradigm, in conjunction with pattern recognition principles, can be used to
evolve classiers capable of recognizing epileptic patterns in human electroencephalographic signals. The procedure for feature
extraction from the raw signal is detailed, as well as the genetic programming system that properly selects the features and
evolves the classiers. Based on the data sets used, two different epileptic patterns were detected: 3 Hz spike-and-slow-wave-
complex (SASWC) and spike-or-sharp-wave (SOSW). After training, classiers for both patterns were tested with unseen
instances, and achieved sensibility = 1.00 and specicity = 0.93 for SASWC patterns, and sensibility = 0.94 and speci-
city = 0.89 for SOSW patterns. Results are very promising and suggest that the methodology presented can be applied to other
pattern recognition tasks in complex signals.
# 2005 Elsevier B.V. All rights reserved.
Keywords: Genetic programming; Pattern recognition; Epilepsy; EEG
1. Introduction
According to the World Health Organization
(WHO) [1], up to 5% of the world population may
have some kind of epileptic event during lifetime.
Epilepsy is the commonest neurological disorder of
the brain and its incidence is not limited to a specic
age, race or geographical location. Epilepsy can have
several physical, psychological and social conse-
quences, including mood disorders, injuries and
sudden death. When correctly diagnosed, up to 70%
of epileptic patients can respond satisfactory to the
clinical treatment. Thus, efforts toward its diagnosis
and treatment are always of great importance.
This paper has a multidisciplinary nature, in the
crossroads of evolutionary computation, pattern
recognition and biomedical signal processing. It is
reported the application of the genetic programming
(GP) paradigm [2] to evolve a classier capable of
recognizing epileptic patterns in human electroence-
phalogram (EEG) signals recorded from the scalp of
real patients. This work was also motivated by the
difculty in the interpretation of clinical EEG tests.
www.elsevier.com/locate/asoc
Applied Soft Computing xxx (2005) xxxxxx
* Tel.: +55 41 3310 4694; fax: +55 41 3310 4683.
E-mail address: hslopes@cpgei.cefetpr.br.
1568-4946/$ see front matter # 2005 Elsevier B.V. All rights reserved.
doi:10.1016/j.asoc.2005.07.004
ASOC-198; No of Pages 10
Applied Soft Computing, v. 7, p. 343-252, 2007
Hopefully, this method can be useful in the automatic
detection of epileptic events, not only in the clinical
setting, but also in long-term electroencephalographic
monitoring.
Since around the 1980s, many researchers have
proposed methods for the quantitative analysis of the
EEG. Many statistical, syntactic or articial intelli-
gence based techniques were used for pattern
recognition, together or not with a variety of digital
signal processing methods. Due to the complexity of
the task, up to now, no method yet gave a widespread
support to identify consistently every possible pattern
of interest in the EEG. Therefore, proposed methods
are usually applied to particular patterns or conditions.
Some works related to the detection of epileptic events
in the EEG are cited below. There is no intention to
compare methods themselves or them with the current
work, but it is interesting to illustrate the diversity of
techniques previously used.
Many different approaches of neural networks to
detect epileptic patterns in the EEG were reported, for
instance, using simple multilayer perceptrons [3],
simple Kohonen maps [4], or self-organizing maps
with timefrequency analysis techniques [5,6]. Adap-
tive ltering based on digital signal processing
techniques were used by Stelle [7]. Wavelets were
used by Khan and Gotman [8], and also by Geva and
Keren [9], who hybridized wavelets with fuzzy
techniques. Gotman and co-workers [10,11] have
proposed an heuristic mathematical method, based on
the graphical similarity between EEG patterns that has
been cited frequently in the literature.
The objective of this work is to present a
methodology for pattern recognition, based on classi-
ers evolved by using genetic programming. The paper
is organizedas follows: rst, anbrief descriptionof EEG
and epileptic patterns is presented so as to allowreaders
to understand the nature of the application. Then, some
basic aspects of the genetic programming are presented,
since this is the technique used for problem solving.
Next, it is described in detail the methodology for the
application of GP to pattern recognition, including
database handling, data reduction and supervised
training. In the sequence, results of the application of
the proposed methodology for two different epileptic
patterns are shown. Finally, results are discussed and
conclusions are drawn, pointing future directions of
research and other possible applications.
2. Epilepsy and electroencephalography
The EEG signal is the recording of the electric
activity of the brain at the scalp, usually taken
concurrently with several electrodes. The EEG is a
very complex and nonstationary signal and its
characteristics are spatio-temporal dependent. The
EEG is different at every point of the scalp where it is
being recorded, and it is function of the underlying
brain activity of the region. Although nonstationary,
the EEG can be divided into epochs in which its
statistical properties are reasonably constant, accord-
ing to some specic criteria [12]. This is a key point
since, in this work, the analysis of the EEG is based on
predened epochs in which the pattern of interest can
be present.
EEG may be rich of different patterns that are
superimposed with the background activity and noise
from many sources, like the electrooculogram, the
electromyogram and movement artifacts. Many
diseases and clinical conditions can induce specic
categories of patterns in the EEG, as well as normal
events like mental activity, sleeping and eyes closure.
Due to the large biological variability from individual
to individual and other environmental inuences, little
progress has been done in establishing clear patterns
found in the EEG [13]. Notwithstanding, the analysis
of the EEG is still a valuable diagnostic procedure for
the clinician. The EEG is helpful in the diagnosis of
many diseases related to the central nervous system,
and particularly, to epilepsy. Briey, epilepsy can be
dened as an excessive and uncontrolled activity of
part (or the whole) of the central nervous system.
Epileptic seizures can be caused by several diseases,
mainly in the brain, as well as brain damage due to
external injury or tumor. Also, some extra-cerebral
transitory events like prolonged fever, hyperventila-
tion or hypoglycemia, eventually can lead to epileptic
seizures [14].
Epileptic seizures can cause a large variety of
patterns in the EEG, and there is no general method for
their identication. The objective of this work is to
detect some particular epileptic patterns in the EEG.
Amongst many different types of epileptic patterns, two
categories of such patterns are focused: the 3 Hz spike-
and-slow-wave-complex (SASWC) and the spike-or-
sharp-wave (SOSW). The rst case is well-known as
characteristic of the petit-mal epilepsy, and the
H.S. Lopes / Applied Soft Computing xxx (2005) xxxxxx 2
DTD 5
second is common to several different types of epilepsy
and is usually found in the inter-ictal period (time
between two consecutive epileptic seizures).
3. Genetic programming
Genetic programming (GP), rst proposed by
Koza [2], is a search and optimization technique
belonging to a class of computational models
collectively known as evolutionary algorithms, to
which also belong genetic algorithms (GA). These
techniques are roughly based on the evolution of
living beings centered in the Darwinian principle of
natural selection. Both GP and GA are based on the
concept of evolution, throughout generations, of a
population of candidate solutions. Individuals of this
population are selected according to their quality
(this is the application of the principle of the
survival of the ttest), and undergo the action of
genetic operators to create new individuals. As
generations proceed, it is expected that the popula-
tion, in average, will evolve to better and better
solutions.
The main difference between GP and GA is the
representation of an individual of the population. In
GA, the most usual representation is a xed-length
string of bits that is called the genotypical
representation, In GP, individuals are represented
as variable-length hierarchical structures called
programs, usually in the form of a tree. A priori,
GP does not limit the shape, size and structural
complexity of the solutions. This characteristic is
both an advantage and a drawback when compared
to GA. It is advantageous because very complex
structures can be represented. Such structures are
capable of doing not only mathematical and logical
operations, but also iteration, recursivity and
conditional branching. On the other hand, this
representation leads to an innite search space,
which requires computational power and an intel-
ligent and adaptive way to explore the solutions
search space. Despite of this problem, GP has been
successfully used for a large range of problems, not
only in engineering [15] and computer science [16],
but also in medicine (see, for instance [1721] for
some applications to diagnosis and prediction of
clinical conditions).
This work, as most of the current applications of
GP, is based on the seminal work of Koza [2], who has
proposed a general framework that is almost
independent of the nature of the application. The
application of GP to real-world problems encom-
passes some basic denitions:
The elements compounding the structure of a
solution for the problem in hand. As mentioned
before, the usual representation of a program is a
tree. In such tree, the internal nodes are functions
(operators) and the leaf nodes are terminal symbols.
Therefore, both the function and the terminal sets
must be dened by the user. The function set can
contain basic arithmetic operators, logical or
relational operators, complex mathematical func-
tions, etc., and the terminal set can contain the
independent variables (attributes) of the problem
and arbitrary numerical constants. In the next
sections, it is described the general framework for
the application of GP to the problem of evolving an
epileptic pattern recognition system based on
mathematical expressions.
A method for generating the initial population of
solutions. As default, initial solutions are randomly
generated, taking into account some construction
rules constrained by the function and the terminal
sets. Also, in order to create genetic diversity, it
must be ensured that in the initial population there
are no duplicates.
A method for evaluating a candidate solution
(individual of the population) with respect to its
ability to solve the target problem. This is done by
using a tness function that, probably, is the most
critical point in the design of a GP system. Since the
tness function is problem dependent, it will be
detailed later.
A method for modifying stochastically current
solutions so as to create other solutions. This role is
performed by genetic operators, namely reproduc-
tion and crossover. Unlike GA, the mutation
operator is not useful in GP. The reproduction
operator selects an individual from the current
population in proportion to its tness value, so that
the tter an individual, the higher the probability
that it will be selected to take part of the next
generation. Once selected, the individual is copied
without change to the new population. Reproduc-
H.S. Lopes / Applied Soft Computing xxx (2005) xxxxxx 3
DTD 5
tion is asexual, since only one individual is
necessary for the operation. The crossover operator
is called sexual recombination because it requests
two individuals to operate. Crossover replaces a
randomly selected subtree of an individual with a
randomly chosen subtree from another individual.
This procedure generates two offsprings that are
inserted in the new population. Once reproduction
and crossover have been applied according to given
probabilities, the newly created generation of
individuals is evaluated by the tness function.
A criterion for terminating the evolutionary process
and thus, designating the solution. The most
common criterion is generational. That is, the
program stops after a predened number of
generations. However, it is also useful to consider
stopping after a given number of generations when
no relevant improvement has been observed.
Designating the solution is again problem depen-
dent, and most times the solution is the best
individual found throughout generations.
Suitable values for the parameters that control the
GP run. Amongst the several qualitative and
quantitative parameters proposed by Koza [2], the
most relevant are the population size and the
number of generations.
4. Methodology
In this work, one is sought to categorize temporal
input data into predened classes. This is done by
means of extracting relevant features (or attributes)
from the data, out from the background of irrelevant
information. Therefore, an usual methodology for
pattern recognition was followed, comprising feature
extraction, feature selection and classication [22].
The rst step is feature extraction: the raw signal is
converted into features that are supposed to be more
condensed (in the sense of dimensionality) and more
meaningful than the rawdata. Here, feature extractionis
done as a preprocessing step, prior to the application of
GP, aiming at reducing the inherent complexity of data.
In the feature selection step the most important
features to the specic pattern recognition task are
identied and the remaining are discarded. This
process is automatically accomplished by the GP
algorithm during the evolution of a mathematical
expression (classier) to recognize the pattern of
interest.
Finally, classication is carried out after the
supervised training, using the evolved classier:
unseen time segments of EEG are assigned to one
of two classes, either having (positive class) or not
having (negative class) the pattern of interest.
It is worth to remark that this is a general method
that, in principle, could be applied to any kind of
temporal data.
4.1. Database handling
In this work, two case studies were done using
different data sets: detection of SASWC and SOSW.
For the rst case study, the database used is
publicly available in the Internet [23]. This database
has 15 pathological cases (les), each of then with a
generic qualitative diagnosis. The 3 Hz spike-and-
slow-wave-complex epileptic pattern is found in two
of those les. Originally, data in this database is in the
EDF format [24].
For the second case study, the database used was
donated by the Clinical Neurology section of a
primary hospital of Curitiba, Brazil. At the time this
work was done, the database had 26 cases (les) of
different adult patients. Files in this database were
recorded using the EBS format [25]. A total of 14 les
were selected from this database, where the epileptic
pattern found was isolated spike-or-sharp-waves in the
inter-ictal period.
Both databases were previously submitted to an
EEG expert in order to select channels and segments
of the signals containing the patterns of interest
(SASWC and SOSW) and those containing only
background activity. This procedure, although carry-
ing a certain subjectiveness, was based not only on the
previous experience of the expert, but also on some
denitions stated in the literature [13,14].
The clinical EEG is recorded in several electrodes
at the same time, called channels. Channels names
follows the International Federation 1020 system
[26]. This system uses certain anatomical landmarks
to standardize the placement of electrodes on the
scalp.
The two les selected for the SASWC case study
had four channels each. These les will be referred as
H.S. Lopes / Applied Soft Computing xxx (2005) xxxxxx 4
DTD 5
FAl and FA2. Channels F8-C4 and F7-C3 fromle FAl
and channels T6-O2 and T5-O1 from le FA2 were
selected for the training set. In the same way, channels
F8-C4 and F7-C3 from le FA2 and channels T6-O2
and T5-O1 from le FAl were selected for the testing
set. For all those channels, 10 segments containing the
pattern of interest (SASWC) and 10 segments of
typical background activity were selected by the EEG
expert. All segments were extracted from the raw
signal as 1 second frames (corresponding to 200
samples each). The result of this procedure is two sets
of 80 frames each. One of these sets is used for the
supervised training with GP, and the other for testing
the evolved classier. Notice that both sets have 40
frames with and 40 frames without the pattern of
interest. That is, classes are evenly balanced in both
training and testing sets. This balance avoids bias
during training and false tendencies in results.
For the second case study (SOSW detection), seven
les (referred as les FB1 to FB7), out of 14, were
randomly selected for the training set. In the same
way, the remaining seven les (referred as les FC1 to
FC7) were selected for the testing set. All channels of
les FB1 to FB7 were scanned by the EEG expert, and
48 segments with the pattern were found. Other 48
segments with only background activity were ran-
domly chosen from those les. Frames of 500 ms
(corresponding to 100 samples each) were extracted
from all the 96 segments selected, forming the training
set. The very same procedure was done with the other
les (FC1 to FC7) in order to build the testing set with
96 frames.
All frames, for the training and testing sets, of both
case studies were submitted to the feature extraction
procedure described in the next section.
4.2. Data reduction by feature extraction
The EEG is a very complex signal and has a very
low level of abstraction, from the point of view of its
interpretation. Prior to the application of a pattern
recognition methodology, a data reduction procedure
step is done to increase the abstraction level of the
signal, while decreasing the amount of information
conveyed in the representation. In fact, an EEG expert
automatically does a kind of data reduction when he/
she interprets the EEGof a patient: the analysis is done
by searching for short interesting segments instead of a
point-by-point basis. This last approach can be
excessively hard to be accomplished by pattern
recognition techniques, due to the degrees of freedom
involved.
Features are computed using the raw EEG signal of
a given channel, within a specied xed time window
(frame). The features aim at describing as best as
possible the signal (and hopefully, the pattern to be
recognized). In words, the transformation from the
signal domain to the features domain leads to an
information gain, and consequently, to dimensionality
reduction. The set of features used is based on signal
analysis and was chosen without any previous
knowledge about their discriminatory power to the
identication of patterns in EEG signals. Other
features (based on statistical analysis, for instance)
could be used either, but the investigation of the most
useful ones is outside the scope of this work. Seven
features were used, drawn from previous works on
biosignal pattern interpretation [27,28], and are
detailed as follows.
In order to dene the features used in this work, let
x be a sampled signal in a time window of N samples,
where x
k
is the kth sample, x
k1
the previous one and
x
k+1
the next.
Two features account for the DC value of the signal
present in the window: the mean absolute value
MAV (given by Eq. (1)) and the average valueAV
(given by Eq. (2)).
MAV
1
N
X
N
k1
jx
k
j (1)
AV
1
N
X
N
k1
x
k
(2)
The signal is supposed to span from some negative
value to some positive value and vice versa. Therefore,
feature ZC dened by Eq. (3), is the number of zero
crossings of the wave. This counter is incremented
either when condition c
1
(crossing zero downwards) or
condition c
2
(crossing zero upwards) is met, and this is
not a noise-condition c
3
. The threshold is used to make
the counter less sensible to noise.
ZC
ZC 1; if c
1
_c
2
^c
3
ZC; otherwise

(3)
H.S. Lopes / Applied Soft Computing xxx (2005) xxxxxx 5
DTD 5
where
c
1
x
k
0 ^x
k1
<0
c
2
x
k
0 ^x
k1
>0
c
3
jx
k
x
k1
j threshold
8
<
:
(4)
The number of slope sign changes is counted by
feature SSC, dened by Eq. (5). SSC, like the previous
ZC, roughly accounts for the frequency contents of the
signal. This feature is incremented when the current
data point is either a positive peak (condition c
4
) or a
negative peak (condition c
5
), and this is not a noise
conditions c
3
(previously dened) and c
6
.
SSC
SSC 1; if c
4
_c
5
^c
3
_c
6

SSC; otherwise

(5)
where
c
4
x
k
>x
k1
^x
k
>x
k1

c
5
x
k
<x
k1
^x
k
<x
k1

c
6
jx
k
x
k1
j threshold
8
<
:
(6)
Eq. (7) denes the waveform length WL, that gives
some reference about the complexity of the wave
within the window:
WL
X
N
k1
jx
k1
x
k
j (7)
The number of up slopes (US) and down slopes (DS),
dened, respectively, by Eqs. (8) and (9), are features
that account for the number of samples that are,
respectively, in ascending and descending segments
of the waveform.
US
US 1; if x
k
x
k1
>0
US; otherwise

(8)
DS
DS 1; if x
k
x
k1
<0
DS; otherwise

(9)
A given channel of the EEG under analysis is divided
into time windows of xed size (frames). After, fea-
tures described by Eqs. (1)(9) are computed using the
sampled data in the frame, to form a seven-dimen-
sional vector {MAV, AV, ZC, SSC, WL, US, DS} that
is further used by the GP algorithm.
4.3. The GP system
4.3.1. Function and terminal sets
For both case studies, the terminal set consists of
the features computed for every frame, and an
ephemeral random constant (R) created at the
beginning of the run and dened in the interval
[1.0,1.0]. Therefore, the terminal set is dened by:
T = {MAV, AV, ZC, SSC, WL, US, DS, R}.
The function set is the same proposed by Koza [2]
for many symbolic regression problems, and include
the basic arithmetic operators and some mathematical
functions, i.e., F = {+,,*,%, sin, cos, exp, rlog}.
Symbols % and rlog stand, respectively, for
protected division and protected logarithm. It is not
possible to use the ordinary division and logarithm
because the function set has to obey the closure
property of GP, that states that every possible value
generated by any combination of the terminal and
function sets has to be accepted as operand of every
function. Therefore, given two real numbers a; b 2R,
by default, a%b = 0 if b = 0, and a%b = a/b, other-
wise. In the same way, rlog(a) = 0 if a = 0, and
rlog(a) = log(jaj) otherwise.
4.3.2. Fitness function
The tness function evaluates the quality of an
individual regarding its ability to correctly classify a
set of instances of the problem (tness cases). The
tness function is normalized in such a way that it can
assume values in the range [0,1], where the higher the
value, the better the individual as a possible solution to
the problem. In Eq. (10), tness_cases is the
number of instances in the training set (80 for SASWC
and 96 for SOSW) and hits is the number of correct
classications (including positive and negative cases)
achieved by the current individual.
fitness
1
1 fitness cases hits
(10)
The frames of both training and testing sets were
previously labelled by the EEG expert with 1 for
negative cases (without the pattern) and +1 for positive
cases (with the pattern). The result of the application
of an individual (mathematical expression) to a given
set of data is a numerical value in the range [1,
+1]. Therefore, a wrapper function [2] was used so as
H.S. Lopes / Applied Soft Computing xxx (2005) xxxxxx 6
DTD 5
to reinterpret the output value of the tness function
making a mapping: all values less than or equal to 1
means that the frame was classied as not having the
pattern (negative class), whereas all values greater
than or equal to +1 means that the frame was classied
as having the pattern (positive class). Any output in the
gap ]1,1[ is interpreted as undened. Dividing the
feature space into three different regions is useful for
separating classes so as to reduce the possibility of
overlapping results during the evolutionary process.
4.3.3. GP running parameters
In all the experiments reported in this paper the
initial randompopulation of individuals was generated
by Kozas ramped half-and-half method [2], which
creates an equal number of trees for tree-depth values
varying from 2 to the maximum depth 6. During the
run, the maximum depth of a tree was set to 17,
whereas the maximum number of nodes was not
limited. The selection method of an individual as well
as of its mate was the usual tness-proportionate (also
known as roulette wheel). Experiments with other
types of selection methods like tournament selection
and ranking did not show any signicant improvement
in the performance of the GP. As usual, probabilities
for the reproduction and crossover operators were set
to 10 and 90%, respectively. The GP was run for 50
complete generations (not including the initial
population) always using 500 individuals in the
population. There were two stop criteria: when the
maximum number of generations was achieved or
when an individual with the maximum number of hits
was found ( tness = 1, see Eq. (10)). The best
individual ever found in the run was designated as
the result. The GP system was written using standard
C programming language and run on a Sun Sparcsta-
tion-20 workstation. It took around 50 s for training
the SASWCclassier, and around 300 s for the SOSW
classier.
5. Results
5.1. Supervised training
After running the GP algorithm, for both case
studies, mathematical expressions (classiers) were
found. The best S-expressions found by GP are shown
in Table 1. For the rst case study, the corresponding
expression has 36 nodes (19 operators, 13 terminals
and 4 numerical constants) and only features WL, SSC
and ZC were found to be relevant. The corresponding
mathematical expression, after algebraic simplica-
tion, is shown in Eq. (11). For the second case study,
the S-expression found has 100 nodes (58 operators,
41 terminals and one numerical constant) and all
features were used. The corresponding simplied
mathematical expression is given in Eq. (12). It can be
seen that few can be done to simplify this expression.
In Eqs. (11) and (12) recall that both division and
logarithm are protected functions, as mentioned
before. Also, the output class should be interpreted
according to Section 4.3.2.
class ZC:cosc a
where
a 0:08966:LEN SC
b 0:08966:LEN
2
:a SC
c b:LEN:log0:9394:SC SC
8
>
>
>
>
<
>
>
>
>
:
(11)
class LEN a b:c DOWN
where
a
2:ZC
LEN 1 d
b logUP:SC
c coscoscosMAV cosSC
logSC:logMAV
d logUP:ZC:log f DOWN
f SC: cosg
logLEN
ZC

g LEN log2:SC:ZC
b cosh
LEN
h
MAV
AVG
5.2. Testing
The generalization capability of the evolved
classiers was further tested on unseen instances
using the testing sets (80 for SASWC and 96 for
SOSW). When classifying an instance, depending on
the class predicted by the classier and on the true
class of the instance, four types of results can be
observed for the prediction, as follows:
H.S. Lopes / Applied Soft Computing xxx (2005) xxxxxx 7
DTD 5
true positive (tp)the classier predicts that the
pattern is present in the frame, and it really is;
false positive (fp)the classier predicts that the
pattern is present in the frame, but it is not;
true negative (tn)the classier predicts that the
pattern is not present in the frame, and indeed it is
not there;
false negative (fn)the classier predicts that the
pattern is not present in the frame, but in fact it is.
The accuracy of a classier can be described more
precisely using two indicators frequently used in data
classication [29,17,21], namely, sensitivity (Se) and
specicity (Sp). These indicators take into account not
only the number of correct classications, but also the
relationship between positive and negative classes.
Sensitivity is dened as Se = tp/(tp + fn) and speci-
city as Sp = tn/(tn + fp). Sensitivity measures the
fraction of positive instances (frames with the
epileptic pattern) that will be correctly classied.
Specicity measures the fraction of negative instances
(frames without the pattern) that will be correctly
classied as background activity.
Results of the application of the evolved classiers
to the testing sets of the two case studies are presented
in Table 2 in the form of a confusion matrix, where
class ( ) and real ( ) represent, respectively, the
outcome of the classier and the real class. Briey,
Se = 1.00 and Sp = 0.93 for SASWC patterns, and
Se = 0.94 and Sp = 0.89 for SOSW patterns.
6. Discussion and conclusions
The number of elements (functions and term-
inals) of the resulting classiers for both case
studies is an estimate of the hardness of the pattern
recognition task. For the second case study (SOSW),
the classier found is much more complex than the
rst. This is a consequence of the underlying
difculty to identify unequivocally SOSW patterns
(when compared with SASWC patterns). This is
consistent with the fact that SOSW patterns are
often misinterpreted by EEG experts as artifacts and
vice versa [13].
Comparing the obtained S-expressions and the
corresponding simplied mathematical expressions,
it is seen the proliferation of useless code. This
characteristic of most GP implementations reveals
the bloat effect, whose consequences are still
controversial. Although a strategy for automatically
simplifying S-expressions during search would help
to nd shorter solutions, it is not possible to
assure that they would be better. Notwithstanding,
using a parsimony term [17] in the tness function
could be benecial for obtaining more compact
solutions without losing signicant accuracy. In
most GP applications, and also conrmed in this
work, it is a very difcult issue the balance between
simplicity and accuracy of evolved programs [30].
This seems to be an open question for further
investigation.
In an attempt to interpret results obtained by the GP
algorithm for the rst case (SASWC), it should be
noted that the features selected suggest somehow the
presence of high frequency components (fast activity).
This nding is in accordance with Gotman and Gloor
[10] who described an heuristic algorithm that uses
similar features for the detection of epileptic spikes.
Regarding results for the second case study (SOSW),
its complexity precludes any interpretation.
H.S. Lopes / Applied Soft Computing xxx (2005) xxxxxx 8
DTD 5
Table 2
Results for the testing sets: SASWC and SOSW
Real (+) Real ()
SASWC Class (+) 40 3
Class () 0 37
SOSW Class (+) 45 5
Class () 3 43
Table 1
Best S-expressions found for the two case studies
SASWC (+(*ZC(cos((*(*LEN((*(LEN(*(*LEN 0.08966) ((*LEN 0.08966)SC)))SC))(rlog(*(cos 0.08966) SC)))SC))
(rlog(*(cos((*LEN 0.08966)SC))
SOSW ((+LEN(%(+ZC ZC)((+LEN(%(*(cos(cos(*((+LEN(+UP ZC))UP)(+LEN(MAV 0.64722)))))SC)(LEN LEN)))
(*rlog(*UP ZC))(+(+(*(LEN LEN) (sin(*UP SC)))(rlog(*SC+(cos((+LEN(%((rlog(*UP SC))
(cos(%MAV AVG)))LEN)) (rlog(*SC(+ZC ZC)))))(%(rlog LEN)ZC))))) DOWN)))))(*(rlog(*UP SC))
(+(+(cos(cos(cos(MAV(SC(SC(cosSC)))))))(rlog(*SC (rlog MAV))))DOWN)))
Despite the complexity of the results, the
accuracy achieved demonstrate the excellent per-
formance of the classiers for both case studies.
This is true not only for recognizing ill-dened
patterns, but mainly for rejecting background
activity as epileptic patterns. Recall that frames
were visually selected from the raw signal by an
expert, based on his own experience. Nevertheless,
in the context of data analysis, both training and
testing sets were relatively small, if one takes into
account the biological variability of the EEG
Therefore, the use of the evolved classiers to
other patients may not give the same accuracy. In
the EEG pattern recognition literature the difculty
in generalizing methods and results is common-
place. Consequently, the proposed methodology
does not intend to be a gold standard for
detecting epileptic patterns in the EEG. Also, it
was not the objective to propose a competitive
method regarding other computational approaches.
The main objective of the paper was achieved: to
demonstrate how GP (in conjunction with pattern
recognition principles) can be successfully used for
complex pattern recognition in a noisy environment.
For both case studies, the computation of the
classiers are reasonably fast, but the features take
much more time to be calculated. Nevertheless, using
an updated desktop computer, the system can be fast
enough to process in realtime a multi-channel EEG.
Therefore, we believe that the overall methodology
can be very promising, particularly for the on-line
analysis of long-term EEG monitoring.
The methodology described in this work, compris-
ing feature extraction and evolutionary model con-
struction, is simple to implement and has generality to
be applied to the recognition of other patterns in time-
varying signals like geophysical, radar, speech,
meteorological and others, opening a wide eld for
further research.
Further work will comprise an automatic feature
generation by the GP system, as well as the use of a
parsimonious term in the tness function in order to
reduce the complexity of the classier. Also, a
more powerful evolutionary technique, like gene-
expression programming [31], could be also inter-
esting to be considered. In the near future, this
methodology shall be extended to other pattern
recognition tasks.
Acknowledgments
The author would like to thank all the people that
anonymously contributed to the availability of the
EEG databases used in this work This work was
partially supported by a research grant from the
Brazilian National Research CouncilCNPQ (Pro-
cess No. 305720/04-0).
References
[1] http://www.who.org/.
[2] J.R. Koza, Genetic Programming: on the Programming of
Computers by Means of Natural Selection, MIT Press, Cam-
bridge, 1992.
[3] W.R.S. Webber, R.P. Lesser, R.T. Richardson, K. Wilson, An
approach to seizure detection using an articial neural network
(ANN), Electroencephalogr. Clin. Neurophysiol. 98 (1996)
250272.
[4] C. Kurth, B.J. Steinhoff, Automated seizure detection in
continuous EEG recordings by a Kohonen feature map, Epi-
lepsia 38 (Suppl. 3) (1997) 154.
[5] T. Kalayci, O

. O

zdamar, Wavelet preprocessing for automated


neural network detection of EEGspikes, IEEE Eng. Med. Biol.
Mag. 14 (1995) 160166.
[6] A.J. Gabor, R.R. Leach, F.U. Dowla, Automated seizure
detection using a self-organizing neural network, Electroen-
cephalogr. Clin. Neurophysiol. 99 (1996) 257266.
[7] A.L. Stelle, Real-time computer aided analysis of the electro-
encephalogram: a two-dimensional approach, Ph.D. Thesis,
Centre for Information Engineering, The City University,
London, 1991.
[8] Y.U. Khan, J. Gotman, Wavelet based automatic seizure
detection in intracerebral electroencephalogram, Clin. Neuro-
physiol. 114 (2003) 898908.
[9] A.B. Geva, D.H. Kerem, Forecasting generalized epileptic
seizures from the EEG signal by wavelet analysis and dynamic
unsupervised fuzzy clustering, IEEE Trans. Biomed. Eng. 45
(1998) 12051216.
[10] J. Gotman, P. Gloor, Automatic recognition and quantication
of interictal epileptic activity in the human scalp EEG, Elec-
troencephalogr. Clin. Neurophysiol. 76 (1976) 513529.
[11] H. Qu, J. Gotman, A patient-specic algorithm for the detec-
tion of seizure onset in long-term EEG monitoring: possible
use as a warning device, IEEE Trans. Biomed. Eng. 44 (1997)
115122.
[12] J. McEwen, G.B. Anderson, Modelling the stationarity and
gaussianity of spontaneous electroencephalographic activity,
IEEE Trans. Biomed. Eng. 22 (1975) 361369.
[13] P.K.H. Wong, Digital EEG in Clinical Practice, Lippincott-
Raven, Philadelphia, 1996.
[14] E. Niedermeyer, Epileptic seizure disorders, in: E. Nieder-
meyer, F. Lopes da Silva (Eds.), Electroencephalography:
Basic Principles, Clinical Applications, and Related Fields,
Urban & Schwarzenberg, Baltimore, 1987, pp. 405510.
H.S. Lopes / Applied Soft Computing xxx (2005) xxxxxx 9
DTD 5
[15] V. Oduguwa, A. Tiwari, R. Roy, Evolutionary computing in
manufacturing industry: an overview of recent applications,
Appl. Soft Comput. 5 (2005) 281299.
[16] B.J. Ross, A.G. Gualtieri, F. Fueten, P. Budkewitsch, Hyper-
spectral image analysis using genetic programming, Appl. Soft
Comput. 5 (2005) 147156.
[17] C.C. Bojarczuk, H.S. Lopes, A.A. Freitas, Genetic program-
ming for knowledge discovery in chest pain diagnosis, IEEE
Eng. Med. Biol. Mag. 19 (2000) 3844.
[18] F. Fernandez de Vega, L.M. Roa, M. Tomassini, J.M. Sanchez,
Multipopulation genetic programming applied to burn diag-
nosing, in: Proceedings of the Congress on Evolutionary
Computation, vol. 2, IEEE Press, Piscataway, 2000 , pp.
12921296.
[19] L. Chuang, J. Hwang, B. Chien, J. Lin, C. Chang, C. Yu, F.
Chang, Predicting fetal birth weight by ultrasound with the use
of genetic programming, Ultrasound Med. Biol. 29 (Suppl. 1)
(2003) S16.
[20] M. Podbregar, M. Kovacic, A. Podbregar-Mars, M. Brezocnik,
Predicting debrillation success by genetic programming in
patients with out-of-hospital cardiac arrest, Resuscitation 57
(2003) 153159.
[21] C.C. Bojarczuk, H.S. Lopes, A.A. Freitas, E.L. Michalkiewicz,
A constrained-syntax genetic programming system for disco-
vering classication rules: application to medical data sets,
Artif. Intell. Med. 30 (2004) 2748.
[22] R. Schalkoff, Pattern Recognition: Statistical, Structural and
Neural Approaches, John Wiley & Sons, New York, 1992.
[23] ftp://sigftp.cs.tut./pub/eeg-data/.
[24] B. Kemp, A. Varri, A.C. Rosa, et al. A simple format for
exchange of digitized polygraphic recordings, Electroence-
phalogr. Clin. Neurophysiol. 82 (1992) 391393.
[25] G. Hellmann, M. Kuhn, M. Prosch, M. Spreng, Extensible
biosignal (EBS) le format: simple method for EEG data
exchange, Electroencephalogr. Clin. Neurophysiol. 98
(1996) 426431.
[26] H.H. Jasper, The tentwenty electrode system of the Interna-
tional Federation in Electroencephalography and Clinical
Neurophysiology, EEG J. 10 (1958) 371375.
[27] K. Englehart, B. Hudgins, A robust, real-time control scheme
for multifunction myoelectric control, IEEE Trans. Biomed.
Eng. 50 (2003) 848854.
[28] J.J. Fernandez, K. Farry, J.B. Cheatham, Waveform recogni-
tion using genetic programming: the myoelectric signal recog-
nition problem, in: Proceedings of the Genetic Programming
Conference, MIT Press, Cambridge, 1996, pp. 6371.
[29] H.S. Lopes, M.S. Coutinho, W.C. de Lima, An evolutionary
approach to simulate cognitive feedback learning in medical
domain, in: E. Sanchez, T. Shibata, L.A. Zadeh (Eds.), Genetic
Algorithms and Fuzzy Logic Systems, World Scientic, Sin-
gapore, 1997, pp. 193207.
[30] B.T. Zhang, H. Muhlenbein, Balancing accuracy and parsi-
mony in genetic programming, Evol. Comput. 3 (1995) 1738.
[31] H.S. Lopes, W.R. Weinert, EGIPSYS: an enhanced gene
expression programming approach for symbolic regression
problems, Int. J. Appl. Math. Comput. Sci. 14 (2004) 375384.
H.S. Lopes / Applied Soft Computing xxx (2005) xxxxxx 10
DTD 5

You might also like