Вы находитесь на странице: 1из 19






Contact us

My IOPscience

Comparison of fractal dimension estimation algorithms for epileptic seizure onset detection

This article has been downloaded from IOPscience. Please scroll down to see the full text article.
2010 J. Neural Eng. 7 046007
View the table of contents for this issue, or go to the journal homepage for more

Download details:
IP Address:
The article was downloaded on 25/10/2010 at 12:08

Please note that terms and conditions apply.




J. Neural Eng. 7 (2010) 046007 (18pp)

Comparison of fractal dimension

estimation algorithms for epileptic seizure
onset detection
G E Polychronaki1 , P Y Ktonas2 , S Gatzonis2,3 , A Siatouni2,3 ,
P A Asvestas4 , H Tsekou2,3 , D Sakas2,3 and K S Nikita1

School of Electrical and Computer Engineering, National Technical University of Athens, 9, Heroon
Polytechniou Str., Zografou, Athens 157 80, Greece
Greek Center for Neurosurgical Research Prof. Petros Kokkalis, 3, Ploutarxou Str., Athens 106 75,
Epilepsy Surgery Unit, Department of Neurosurgery, University of Athens, Evangelismos Hospital,
45-47, Ipsilantou Str., Athens 106 76, Greece
Department of Medical Instruments Technology, Faculty of Technological Applications, Technological
Educational Institute of Athens, Ag. Spyridonos Str., Egaleo, Athens 122 10, Greece
E-mail: gpoly@biosim.ntua.gr, knikita@cc.ece.ntua.gr and Periklis.Ktonas@mail.uh.edu

Received 19 October 2009

Accepted for publication 26 May 2010
Published 23 June 2010
Online at stacks.iop.org/JNE/7/046007
Fractal dimension (FD) is a natural measure of the irregularity of a curve. In this study the
performances of three waveform FD estimation algorithms (i.e. Katzs, Higuchis and the
k-nearest neighbour (k-NN) algorithm) were compared in terms of their ability to detect the
onset of epileptic seizures in scalp electroencephalogram (EEG). The selection of parameters
involved in FD estimation, evaluation of the accuracy of the different algorithms and
assessment of their robustness in the presence of noise were performed based on synthetic
signals of known FD. When applied to scalp EEG data, Katzs and Higuchis algorithms were
found to be incapable of producing consistent changes of a single type (either a drop or an
increase) during seizures. On the other hand, the k-NN algorithm produced a drop, starting
close to the seizure onset, in most seizures of all patients. The k-NN algorithm outperformed
both Katzs and Higuchis algorithms in terms of robustness in the presence of noise and
seizure onset detection ability. The seizure detection methodology, based on the k-NN
algorithm, yielded in the training data set a sensitivity of 100% with 10.10 s mean detection
delay and a false positive rate of 0.27 h1 , while the corresponding values in the testing data
set were 100%, 8.82 s and 0.42 h1 , respectively. The above detection results compare
favourably to those of other seizure onset detection methodologies applied to scalp EEG in the
literature. The methodology described, based on the k-NN algorithm, appears to be promising
for the detection of the onset of epileptic seizures based on scalp EEG.
(Some figures in this article are in colour only in the electronic version)

greater as newly available technologies generate increasing

demands. Surgical resection is nowadays evolving into a
broadly applied strategy for confronting some types of focal
epilepsies (Tellez-Zenteno et al 2005). Long-term video/EEG
monitoring during pre-surgical evaluation for epilepsy
surgery produces huge numbers of continuous multiple-day

1. Introduction
Epilepsy belongs amongst the most common neurological
diseases, second only to strokes (Annegers 1997). Although
computer detection of epileptic seizures is a relatively old
field of research (Gotman 1982), its significance becomes

2010 IOP Publishing Ltd Printed in the UK

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al

and multiple-channel digital electroencephalographic (EEG)

recordings, which need to be reviewed for the existence
of seizures. Similar needs arise from ambulatory EEG
monitoring (Waterhouse 2003). For that reason, various
automated seizure detection techniques have been developed
which aim to detect the presence of a seizure using both scalp
(Sazonov et al 2009, Schad et al 2008, van Putten et al 2005,
Wilson et al 2004, Liu et al 2002, McSharry et al 2002,
Schindler et al 2001, Gabor 1998, Gabor et al 1996, Gotman
1990, 1982) and intracranial EEG (Schad et al 2008, Bhavaraju
et al 2006, Gardner et al 2006, Meng et al 2004, Khan and
Gotman 2003, Schindler et al 2001, Harding 1993, Murro et al
Exhaustive pre-surgical evaluation should commonly
provide information about the localization of an epileptic
focus, which could be ascertained by the interaction of medical
staff with the patient during the first few seconds of the
evolving seizure. This leads to the more challenging task
of online seizure onset detection, with moreover as few false
detections (false positives (FP)) as possible. Systems capable
of defining seizures onsets with high sensitivity and low FP
rates could also be utilized for automatic seizure termination,
e.g. via electrical stimulation (Morrell 2006) or drug delivery
(Eder et al 1997). The patient-specific algorithm of Qu and
Gotman (1997) for the detection of seizure onset in long-term
scalp EEG monitoring was the first attempt at introducing such
a seizure warning system. Other important works in the field
of seizure onset detection include Meier et al (2008), Saab
and Gotman (2005) and Shoeb et al (2004) which have been
developed using scalp EEG, while intracranial EEG has been
used in Haas et al (2007), Grewal and Gotman (2005), Osorio
et al (2002, 1998).
The term fractal can be used to characterize objects
in space or fluctuations in time which show a form of selfsimilarity. A fractal is an object made of parts similar to
the whole and has the property that more fine structure is
revealed as the object is magnified (Klonowski 2000). The
fractal dimension (FD) is a measure of how complicated a
self-similar object is, taking greater values for increasing
complexity. Strict self-similarity is a property that only
artificially generated mathematical objects are characterized
by; the Sierpinski triangle is such an example (Kaplan and
Glass 1995). Natural objects show statistical self-similarity
(Klonowski 2000). In the statistical sense, an object is selfsimilar if its parts, on average, are similar to the whole (Kaplan
and Glass 1995), but there exist no exact replicas of particular
parts. In statistical self-similarity, a measure of complexity for
a given magnification will have the same statistical moments
as at any other magnification, although the details will not be
identical (Arle and Simon 1990).
In time series analysis, FD can be used to quantify the
irregularity or complexity of a waveform (Katz and George
1985). In this study, we compared different FD estimation
algorithms using scalp EEG data in order to assess their
usefulness in automatically detecting the onset of epileptic
seizures of patients with refractory mesial temporal lobe
(MTL) epilepsy. MTL epilepsy is the most common form
of human epilepsy and is typically medically refractory

(Engel 2001). Interictal (between seizures) EEG patterns

are described by electroencephalographers as low to medium
voltage, irregular and arrhythmic, while during the ictal period
(seizure) the EEG activity changes to have more organized,
rhythmic and self-sustained characteristics (Sackellares et al
2000). Therefore, intuitively, it seems that the FD is an
appropriate measure for the characterization of changes in such
EEG dynamics, as it could be expected to drop in value during
seizures as compared to interictal periods. In the current study,
the selection of scalp over intracranial EEG was motivated by
the fact that seizure detection using this type of EEG recordings
would be more practical in real life and, moreover, it would be
suitable for types of epilepsy that do not warrant intracranial
electrode implantation (Le Van Quyen et al 2001). It has to
be pointed out, however, that scalp EEG is subject to many
different types of artefacts (e.g. eye blinks, muscle activity,
etc) which make the detection of seizures onsets with a low
FP rate a challenging task.
The applicability of fractal analysis to EEG time series has
been examined in various studies (Andrzejak et al 2006, 2001,
Li et al 2005, Liu et al 2005, Klonowski 2002, Esteller et al
2001b, Accardo et al 1997, Bullmore et al 1994, Cabukovski
et al 1993, Arle and Simon 1990, and references therein)
using different FD estimators including, but not limited to,
algorithms by Petrosian (1995), Maragos and Sun (1993), Katz
(1988), Higuchi (1988), Richardson in Voss (1988), Pickover
and Khorasani (1986), Grassberger and Procaccia (1983). For
a review of applications of fractal time series analysis in
physiological research, not limited to EEG analysis, see Eke
et al (2002).
In the current study, two of the most widely used FD
methods in the literature, i.e. the algorithms proposed by Katz
(1988) and Higuchi (1988), are compared to the algorithm
introduced by our group (Asvestas et al 1999), called the
k-nearest neighbour (k-NN) algorithm. The former two
algorithms, or variations thereof, have been broadly applied
in various studies (Gomez et al 2009, Acharya et al 2005,
Berryman et al 2005, Accardo et al 1997, Esteller et al 2001b,
Bullmore et al 1994). In contrast, to the best of our knowledge,
this is the first time that the k-NN algorithm has been applied
in a time series analysis sense.
Few works in the literature have utilized FD methods
particularly for the study of epileptic seizures (Esteller
et al 2001b, 1999, Accardo et al 1997, Bullmore et al
1994, 1992). The main objective of those works was to
examine whether FD could provide a sensitive criterion for
discriminating the seizure from the non-seizure state by
observing whether distinct changes in the FD would arise
during seizures. Nevertheless, none of those studies used
long-term EEG data to assess the ability of different FD
algorithms to be not only sensitive but also specific in detecting
changes during seizures. In all studies, the results using
only short EEG segments containing seizures were reported
and no interictal data were analysed to provide a further
understanding of how FD values would change during the
different physiological states (e.g. sleep, chewing, etc) that
would normally exist during an inpatient or ambulatory setting.
Analysis of long interictal EEG records would be necessary

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al

Table 1. Presentation of patients characteristics and EEG data.



Age (years)

Seizure type


Length of recording (h)

No of seizures

Average seizure duration (s)









Sum training
Mean training

65.34 69.62




Sum testing
Mean testing

72.95 18.87


Sum overall
Mean overall

69.14 47.39







65.53 11.96
53.18 16.40
59.36 14.84

m, male; f, female. Seizure types: complex partial (CP), secondarily generalized tonicclonic (sGTC). Values presented are mean
standard deviation. The outcome is according to Engels classification.

in order to demonstrate that the FD changes during seizures

could be far more distinct as compared to those during other
physiological states and that, therefore, FD measures could be
utilized effectively for the purpose of seizure detection.
The main objective of the current work was to perform
a comparison of the three FD methods in terms of their
ability to detect the onset of epileptic seizures and at the
same time produce an acceptable number of FPs, using longterm, multichannel, continuous scalp EEG data, including
artefacts. In order to ensure an optimal EEG analysis using
the algorithms and to facilitate the interpretation of the results,
all three algorithms were first applied on synthetic signals
of known FD. This is related to the second objective of the
current work, which was, based on the synthetic signals, the
selection of appropriate values for the parameters involved
in FD estimation algorithms (i.e. in Higuchis and the k-NN
algorithms) and the comparison of the different algorithms
based on the assessment of their estimation accuracy and
robustness in the presence of noise.
In section 2, the EEG data set used in the current
study is presented and an outline of the FD estimation
algorithms utilized is provided. Moreover, the seizure
detection methodology developed based on FD is described.
This is followed in section 3 by the evaluation of the FD
algorithms and the selection of the parameters involved in
FD calculations, using synthetic signals of known FD. The
application of the FD algorithms to scalp EEG data and a
comparison of the different algorithms seizure onset detection
ability are presented in section 4. Discussion of the results and
suggestions for further work follow in section 5.

the Epilepsy Telemetry Unit, Department of Neurosurgery,

University of Athens, Evangelismos Hospital, during longterm video/EEG for pre-surgical evaluation. For the data
acquisition, a Beehive Millennium Digital Recording System
with Grass Telefactor Twin Recording and Analysis Software
was used. The low- and high-pass filters of the amplifiers
allowed EEG frequencies between 0.1 and 70 Hz to be
recorded. Data were acquired at a sampling rate of 400 Hz,
with 12 bits A/D resolution. The data set comprised 553.14 h
of EEG recording and included 55 seizures in total. Table 1
summarizes patients characteristics as well as details about the
EEG recordings. Making the rough assumption that between
11.30 p.m. and 7.30 a.m. the patient was asleep, 183.5 h were
sleep recordings, originating from seven of eight patients in the
data set. No exclusion of records with artefacts, such as those
introduced by movement of the patient or transient electrode
failure, was undertaken. Twenty-five gold disk electrodes were
placed according to the 1020 international system in addition
to six temporal electrodes. Two of these were sphenoidal,
and the rest consisted of T1, T2 (placed according to the
international extended 1020 system) and 27, 28, which were
placed at mastoid hilus. A referential electrode montage was
used both for the recording and the analysis, with the reference
electrode being placed between Cz and Pz.
In order to design and develop the automatic seizure
detection methodology, the EEG records were divided into
a training and a testing data set. After sorting the patients in
the chronological order of admission for long-term video/EEG
monitoring, we selected the first four patients as our training
data set (261.34 h, 37 seizures) and the remaining four as the
testing data set (291.8 h, 18 seizures). Seizure onset times
were marked by a single expert as the time points at which the
first EEG changes occurred which led to a clear EEG seizure
discharge. Seizure offset times were also marked.

2. Materials and methods

2.1. EEG data description

2.2. Fractal dimension estimation algorithms

Continuous long-term scalp EEG data from eight patients

suffering from refractory epilepsy with mesial temporal
sclerosis were used.
All the data were collected in

All the algorithms utilized in the current study, i.e. Katzs,

Higuchis and the k-NN FD estimation algorithms, do not

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al

require a state-space reconstruction prior to FD estimation.

This is a great advantage when a detailed temporal evolution
of the signal is of interest, as in our case where we wished
to detect the presence of seizures as closely to their onset as
possible. Such time-domain approaches (as opposed to the
phase-space approaches which actually calculate FD in phase
space) require a significantly lower number of points in order to
provide an estimate of the FD (Bullmore et al 1992, Accardo
et al 1997, Esteller et al 2001b). This has the additional
advantage that stationarity of EEG segments analysed can be
more easily assumed for shorter time windows. Moreover, the
techniques are faster in terms of required computational time
(Esteller et al 2001b) and, therefore, could be better candidates
for a possible online implementation.
The k-NN algorithm was considered an appropriate
candidate for scalp EEG analysis for epileptic seizure detection
for two reasons: first, the aforementioned low demands in
input data points, and second, the fact that in image analysis,
where it was originally applied, it proved to be superior
in terms of accuracy, dynamic range and computational
time (Asvestas et al 1999) as compared to other traditional
FD estimation methods (e.g. box-counting dimension and
correlation algorithm).

2.2.2. Higuchis algorithm. Higuchis (1988) algorithm for

FD estimation is also based on curve length measurement.
The algorithm estimates the mean length of the curve, by
using a segment of k samples as a unit of measure. In practice,
Higuchis method is a modification of an older similar FD
estimation approach proposed by Burlaga and Klein (1986).
In more detail, Higuchis FD estimation technique consists of
the following steps.
Step 1. Let us define the values of a finite set of time series
observations, which are taken in a regular interval as
y1 , y2 , y3 , . . . , yi , . . . , yN = y(1), y(2), y(3), . . . ,
y(i), . . . , y(N ), where i = 1, 2, . . . , N (N: number of points
in the time series). In our case, y would be the successive
EEG values. For a range of k values ranging from 1 to kmax ,
construct k new times series yk m defined as follows:
yk m : y(m), y(m + k), y(m + 2k), . . . , y(m + ik), . . . ,


N m
k , where m = 1, 2, . . . , k.
y m + int
Step 2. Calculate the length Lm (k) of each curve yk m as follows:

int( k )

|y(m + i k) y(m + (i 1) k)|
Lm (k) =

2.2.1. Katzs algorithm. Waveforms can be viewed as

collections of points p
 i = (xi , yi ) with xi < xi+1 , i = 1, 2, . . . ,
N (N: number of points), and they are special cases of planar
curves (moving only forward in the x direction). Katz (1988)
based his method of FD estimation on the measurement of the
length of such curves. He incorporated Mandelbrots original
contribution (Mandelbrot 1982), in combination with a unit of
measure or yardstick definition, in order to take into account
that, to calculate FD, space must be discretized. According to
Mandelbrot (1982), the FD of a planar curve is given by
FD = log(L)/log(d),

N 1

k 1 .


The term (N 1) int Nm
serves as a normalization
factor for the curve length of yk m . For an illustrative example
of Lm (k) calculation, the interested reader may refer to Accardo
et al (1997).


Step 3. Calculate the mean length of the curve for each k,

L(k), as the average value
 over k sets of Lm (k), for m = 1,
2, . . . , k, as L(k) = k1 km=1 Lm (k). Repeat the calculation
for k ranging from 1 to kmax .


where L is the total length of the curve and d is its diameter.

For waveforms, the total length L is the sum of the distances
between successive points

d = max 
pi p
 1 .

Step 4. If L(k) k FD , then the curve is fractal with

dimension FD. In that case, the plot of ln(L(k)) against
ln(k) should fall on a straight line with slope equal to FD.
Therefore, FD can be calculated by means of a least-squares
linear best-fitting procedure.
One important point that Higuchi did not extensively
elaborate on in his original work (Higuchi 1988) is the selection
of kmax . In this study, we attempted to provide a means for
selecting an optimum kmax , as illustrated in section 3.2.1.

According to Katz, (1) needs to be corrected by making use

of the average step a of the waveform (which is the average
distance between successive points) viewed as a yardstick.
Using a, (1) becomes
FD =
Defining n as the number of steps in the curve (1 less than
the number of points N), n = L/a. Substituting n in (2), FD
according to Katzs approach is expressed as
FD =
log(n) + log(d/L)

2.2.3. k-nearest neighbour algorithm. In contrast to Katzs

and Higuchis algorithms, which are based on measurements
of the length of the waveform under investigation, the k-NN
algorithm belongs to a class of algorithms, called fixed-mass,
according to which FD estimation is based on the sizes of cubes
which are scaled appropriately as to contain the same number
of points (fixed-mass) (Asvestas et al 1999, and references
therein). The average distance, rk , of a point from its
kth nearest neighbour can be expressed as a function of k
as (Grassberger 1985)
rk = G(k, )(k/N ) /D( ) ,



pi+1 p
 i ,


where . is the Euclidean distance. The diameter (planar

extent) d can be considered to be the farthest distance between
the starting point and any other point of the waveform:

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al

where = (1 q)Dq , D( ) = Dq , Dq is the multifractal

dimension of order q, N is the number of points and G(k, ) is
a function of k and , which is near unity for large k. For q =
0, the FD is obtained, that is FD = D0 , which means that FD
is the fixed point of the function D( ), namely FD = D(FD)
(for more details see Asvestas et al (1999)).
The FD of a waveform is estimated iteratively, using (3),
for k = kmin , . . . , kmax (k integer), as follows (Asvestas et al

Table 2. EEG channels for which the results are presented for each
FD algorithm. Td denotes the value of the threshold which was used
in order to select those channels. Patients 14 are the training and
58 the testing data set.

Step 1. An initial value of , i.e. 0 , is chosen arbitrarily and

G(k, ) is set to unity for every k (G(k, ) was set to unity in
Asvestas et al (1999) and we follow the same assumption in the
current study). Since the FD of waveforms lies theoretically
between 1 and 2 (Klonowski 2000), it would be better to choose
0 in this range, i.e. 0 = 1.5.
Step 2. For every point p
 i = (xi , yi ), i = 1, 2, . . . , N,
we calculate the Euclidian distances rki from its k-nearest
neighbours, k = kmin , . . . , kmax .


Td = 1.89

Td = 1.39

Td = 1.27





of which corresponded to one FD estimation for each 2 s

data window. Five FD time profiles were generated using a
standard set of five EEG traces for each patient, depending on
the lateralization of the seizure origin (EEG channels T1, T3,
T5, F7, 27 were used for left temporal epilepsy, and T2, T4, T6,
F8, 28 for right temporal epilepsy). The procedure described
above was repeated using all three different FD algorithms.
The results presented for each FD algorithm and each
patient are the ones produced by the EEG channels which
achieved the earliest seizure detections. Those channels were
selected on the basis of a threshold Td. A different value for
Td was defined for each FD algorithm based on the recordings
of the training data set as follows: we used the seizures of
the channels associated with the maximum FD drops during
seizures and Td was computed as the average of the median
FD values during those seizures (all seizures of all patients
in the training data set were used for the averaging). Td
was then applied to every patient in the training data set
in order to detect seizures and define associated detection
delays (DD) (the exact procedure for calculation of DDs is
explained in the next paragraph). The channel selected for each
patient in the training data set was the one which detected the
largest number of seizures and at the same time produced the
minimum average DD calculated using all detected seizures of
the patient. The channels in the testing data set were similarly
selected, based on application of Td on the first two seizures of
each patient. Channels selected and used for analysis as well
as the Td value for each FD method are depicted in table 2.
In order to detect seizure onset in the selected channels,
a generic threshold Tg (different for each FD algorithm)
was applied to the FD time profiles of both the training
and the testing data set (the procedure for Tg selection will
be explained in the next paragraph). In order to produce
alarms related to automatically detected seizures, a two-step
procedure was followed. In the first step, a parameter w
was defined as the number of FD values (i.e. number of 2 s
windows) that should have remained under the threshold in
order for a detection mark to be produced and placed at
the end of the last 2 s window. This parameter w, which
has been used in a similar manner in the seizure detection
literature (Osorio et al 1998), was incorporated in order to
eliminate possible detections due to short bursts of EEG

Step 3. For j = 1, 2, . . . , the following recursive relations are

j 1
j = D(j ),
D(j ) =
sj 1
sj 1 is the slope of the best-fitting line at the points

ln(k/N ), ln rk j 1 (least-squares sense) and

1  j 1

rk j 1 =
r .
N i=1 ki

The calculation of (4) is repeated until the quantity

 D( )
j 1 

 2 [D(j ) + j 1 ] 
drops below a certain value or a maximum number of iterations
is reached. FD is calculated as D( j ) for the last j before the
above criterion is met.
Similarly to Higuchis algorithm, the k-NN algorithm
is also parametric: kmin and kmax need to be defined. In
section 3.2.2 we propose a method of selecting an optimum
pair of kmin and kmax .
2.3. Description of the seizure detection methodology based
on FD
The first step of our approach included band-pass filtering of
the EEG data between 3 and 30 Hz. The reason for this was
threefold: (a) seizure activity during seizure onset lies more
often between 3 and 29 Hz (Gotman 1982); (b) occurrences
of 03 Hz activity can be frequent in non-ictal sleep EEG
(Saab and Gotman 2005) and (c) this filtering removed highamplitude slow post-ictal EEG activity, which in our analysis
of the training data proved to be the cause of a great number
of FPs (which were eliminated after filtering). A zero-phase
Butterworth filter of order 4 was utilized. After filtering, a
sliding-window approach was employed for the production
of FD time profiles: 2 s length windows (corresponding to
800 points) with no overlap were used. This led to the
production of FD time profiles (time series), individual points

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al



Figure 1. Demonstration of the automatic seizure detection methodology using the k-NN algorithm. (a) FD time profile for 1.5 h of
recording of patient 4, including one seizure starting at about 3370 s (the start and the end of the seizure are denoted by solid vertical lines).
Note the clear drop of the k-NN FD time profile during the seizure, as compared to interictal activity. (b) Detail of (a), zoomed around the
seizure (again the start and the end of the seizure are denoted by solid vertical lines, while the seizure start is aligned with t = 0). A star
indicates the FD value which is estimated based on the EEG values of the 2 s data window which starts at the point in time that the star lies.
The solid horizontal line denotes the threshold. Dotted vertical lines depict the times that a detection mark is produced, before the
grouping of detection marks is performed. The first of them, which in the figure is dotted in bold, is the alarm. Note that the alarm is
produced only after 2 FD points are found to be below the threshold.

activity or short artefacts. Using w was inspired by what

electroencephalographers employ for visual inspection of EEG
data records: according to their assessment, whether some
epileptiform activity is actually a seizure or an interictal
discharge critically depends on the duration of this activity. In
the present study, we used w = 2 which ensured a reduction in
FPs without significantly affecting the DDs. During seizures,
multiple successive 4 s windows (defined by w = 2) produced
detection marks, since many successive FD values were
smaller than the threshold Tg. Therefore, in the second step
towards producing alarms related to automatically detected
seizures, detection marks separated by less than 40 s were
grouped in a single alarm (the same approach as in Saab
and Gotman (2005)). This alarm was located at the same
position in time as the first detection mark of the group, i.e.
at the end of the first 4 s window with corresponding FD values
below the threshold Tg. The value of 40 s was selected based
on the fact that seizures in the examined data set (table 1)
had durations that mostly exceeded 40 s. This grouping
identified detection marks that should be attributable to the
same event (the user should be notified about one seizure with
only one alarm). Alarms were then categorized as true
positives if they appeared during the seizures duration or as
FPs otherwise. In the case of a true positive detection, DD was
defined as the time elapsed between the beginning of a seizure,
as found by the EEG specialist, and the position in time of the
alarm. The FP rate was calculated for each patient as the total
number of FPs generated divided by the total duration of the
recording after excluding the seizures duration. The FP rate
provided a measure of specificity: the lower the FP rate, the
higher the achieved specificity. An example of the automatic
detection procedure for a seizure is illustrated in figure 1.
In the detection framework described so far, the selection
of threshold Tg for each FD method is of crucial importance.
Since both the FP rate and DD are of interest, ideally a
threshold should provide 100% success in the detection of

the seizures, with zero FPs and DDs as small as possible. In

a more realistic scenario, some FPs can be allowed, and the
threshold can be defined based on a maximum allowed number
of FPs per hour. In the recent seizure detection literature
using scalp EEG, FP rates in the range 0.02 h1 (Qu and
Gotman 1997) to 0.86 h1 (Saab and Gotman 2005) have been
reported, with corresponding sensitivities/DD of 100%/9.35 s
and 77.9%/9.8 s. In the current work, 0.3 h1 was set as
the maximum FP rate allowed, following Saab and Gotman
(2005). To that end, Tg was defined for each FD method as
the maximum threshold whose application produced a mean
FP rate <0.3 h1 in the training data set (the mean FP rate was
calculated using the channels selected based on the threshold
Td, as explained earlier in this section). The value of Tg for
each FD method is provided in section 4 and in the caption of
figure 13.

3. Evaluation on synthetic signals

3.1. Purpose of study with synthetic signals and signal
In this section, Katzs, Higuchis and the k-NN FD estimation
algorithms were applied to synthetic signals of known FD. The
purpose of this application was twofold: in the first step, the
definition of an objective and systematic way for determining
the parameters of each of the parametric algorithms studied,
i.e. Higuchis and the k-NN algorithms, was pursued; in the
second step, using the selected parameter values, the different
algorithms were assessed in terms of accuracy and noise
For the synthetic signal generation, a deterministic
Weierstrass cosine function (Tricot 1995), sampled at N
equidistant points, was used:

iH cos(2 i x),
0 < H < 1,
WH (x) =

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al



Figure 2. Weierstrass cosine function for two different theoretical FD values (FDth = 1.2 (a) and FDth = 1.5 (b)).

where > 1 and we fixed = 5, M = 26, following

Esteller et al (2001b), and x [0,1]. N = 800 was used.
The above-defined function is Weierstrasss example of a
continuous function that is nowhere differentiable and has a
known theoretical FD (Falconer 2003). More specifically,
parameter H, and this parameter alone, is connected to
the theoretical FD (FDth) of the Weierstrass waveform by
FDth = 2 H. Using (5), Weierstrass sequences, each having a
different theoretical FD value (i.e. 1.1, 1.2, 1.3, . . . , 1.9), were
generated. In figure 2, two of those sequences are depicted.
In the current study, N = 800 was used both for the synthetic
signals and the EEG data analysis. This data window length
was selected as an acceptable compromise between including
an adequate number of points for accurate FD estimation and
being relatively short in time, as to enable us to reasonably
assume that the EEG signal is stationary during that data

Figure 3. MSE for Higuchis FD estimations for increasing kmax

values. MSE takes minimum values for kmax equal to 9, 25 and 50.

assess the estimation accuracy of the algorithm for different

kmax values, a mean square error (MSE) was estimated
according to (6)
(FDei FDthi )2
MSE = i=1
where FDth is the theoretical FD value for the synthetic signals,
FDe is the estimated one and n is the number of Weierstrass
sequences (of different theoretical FD values) used for the
MSE estimation. Figure 3 shows the MSE against kmax . Values
of kmax lower than 5 led to a clearly poor FD estimation which
resulted in very high MSEs (one order of magnitude higher, up
to 0.085, not displayed in the figure). According to figure 3,
there are three troughs of lower MSE values, and for increasing
kmax values past 50 the FD estimations only get worse. The
lowest MSE values for each trough correspond to the following
values of kmax : 9, 25 and 50. All these values were considered
as candidates for FD estimation using Higuchis algorithm
when applied to the EEG data, as they correspond to similar
MSE values. Therefore, all three of them were tested and the
results are presented in section 4.2.

3.2. Selection of parameters for FD estimation algorithms

3.2.1. Higuchis algorithm. Even though Higuchi did not
elaborate extensively on the selection of kmax in his original
work (Higuchi 1988), it seems that this parameter has a
decisive role for the FD estimation when utilizing his method,
as illustrated in the current work. A few studies in the past have
attempted to address the issue of kmax selection: the authors
in Accardo et al (1997) selected kmax = 6 as the optimum
kmax value in the range kmax = 310. Other studies have
suggested that the selection of the kmax range should probably
be subjected to further consideration if a large N is to be
used. In his paper Higuchi selected in illustrative examples
much greater values of kmax , i.e. kmax = 211 , for N = 217 .
In another study (Paramanathan and Uthayakumar 2008), the
authors provided an algorithmic estimation of kmax , inspired by
a divider method for FD estimation. In their approach, kmax of
Higuchis method was recalculated for every FD estimation.
In that study too, the authors suggested increasing kmax for
increasing N.
In the current study, a wide range of kmax values was
considered, i.e. 280 (recall N = 800 is used). Using each
of those values, the FDs using Higuchis algorithm were
calculated for different Weierstrass sequences. In order to

3.2.2. k-NN algorithm. The same procedure as described

for Higuchis algorithm, based on the MSE of estimations,

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al

Calculate of DF:
Best: FD Higushi.

Figure 4. MSE of FD estimations using the k-NN algorithm for all

possible (kmin , kmax ) combinations of values examined. For (kmin ,
kmax ) = (1, 173) the minimum MSE = 6.5 104 is achieved.

Figure 5. Estimated FD values of Weierstrass synthetic signals

(FDe) plotted against the corresponding theoretical FD values
(FDth), using all three FD estimation algorithms.

was applied for estimating (kmin , kmax ) for the k-NN algorithm.
Again, a wide range of possible (kmin , kmax ) values was tested,
i.e. kmin was assigned values in the range 15 and kmax in
the range 100250. The MSE was calculated for all possible
(kmin , kmax ) combinations (and it only increased for values of
(kmin , kmax ) outside the range presented here). The results are
presented in figure 4. In the case of (kmin , kmax ) selection for the
k-NN-based estimation, the problem of multiple troughs with
similar MSEs, such as in figure 3, did not appear. In contrast,
there existed a single minimum towards which all MSE values
converged, which was achieved for the combination (kmin ,
kmax ) = (1, 173). Therefore, this pair of values was selected
as the optimal and was used for all the calculations in the rest
of this work, both with synthetic signals and with scalp EEG.

the FD values of the 100 sequences with a particular theoretical

FD and SNR were estimated, and the mean value and standard
deviation of the estimates were calculated. Again, for the
estimation of FDs using Higuchis algorithm, kmax = 50 was
used, while for k-NN, (kmin , kmax ) = (1, 173) were used.
The results for all different noise levels and FD algorithms
are presented in figures 6(a)(c). In figure 6(d), the MSEs
of all algorithms plotted against decreasing noise power are
shown (MSEs estimated as described in section 3.2). The
results presented in figure 6 are discussed in section 3.5.
The calculations of figure 6(b) (Higuchis algorithm) were
repeated for kmax = 9 and kmax = 25. The analysis revealed
that, for increasing kmax values, the accuracy of estimation
achieved improved, as the estimated points tended to better
approach the diagonal. This result provided a first indication
that selection of kmax = 50 might be more appropriate for the
calculations with EEG data. More about this selection follows
in section 4.2.

3.3. Evaluation of the accuracy of FD estimation with the

different algorithms
In order to assess the accuracy of the three algorithms
under examination, Weierstrass functions were generated as
described in section 3.1. For the estimation of FDs using
Higuchis algorithm, kmax = 50 was used, while for the
k-NN algorithm, (kmin , kmax ) = (1, 173) were used. Figure 5
shows the estimated FD values, calculated using each of
the algorithms and plotted against the corresponding known
theoretical FD values of the synthetic signals. The results
presented in figure 5 are discussed in section 3.5.

3.5. Comparison of algorithms based on synthetic signal

The most desirable characteristic of an FD estimation
algorithm is its ability to clearly discriminate among signals
of different complexities. For instance, in the framework
described in this section, we would ideally expect an algorithm
to provide FD estimates that fall onto a straight line of slope
equal to one and going through the axes origin (indicated in
figure 5 by a bold line). It can be deduced from figure 5 that
Katzs algorithm yielded the worst estimation as compared
to Higuchis and the k-NN algorithms since it overestimated
the FD values for the whole range of theoretical FD values
examined. Higuchis algorithm provided the most accurate
estimations for the whole range of theoretical FD values.
On the other hand, the k-NN algorithm provided satisfactory
estimations for almost the whole range of theoretical FD
values, slightly overestimating the lower and higher FDs and
underestimating the middle ones. All algorithms demonstrated
a wide dynamic range, in contrast to other FD estimation
algorithms, such as Petrosians algorithms (Esteller et al

3.4. Noise sensitivity

The EEG is frequently contaminated by electrophysiological
potentials generated by muscle activity (Vergult et al 2007).
Muscle artefacts, due to their broad frequency spectrum
(Goncharova et al 2003), may be considered as white noise
(De Clercq et al 2006). In the current study, we assessed the
reliability and robustness of each FD algorithm in the presence
of noise, using Weierstrass signals with added white Gaussian
noise of different signal-to-noise ratios (SNRs). Eleven noise
levels were used, i.e. 3010 dB with step 2 dB. For each
noise level, 100 Weierstrass sequences of the same theoretical
FD with additive noise were produced. Using each algorithm,

Better results.

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al

additive white
Gaussian noise

mas ruido





Figure 6. Mean FD estimates using Katzs (a), Higuchis (b) and the k-NN (c) algorithms using 100 Weierstrass cosine functions with
additive white Gaussian noise of increasing power (FD estimations were averaged for 100 Weierstrass cosine functions for each theoretical
FD value and each noise level). Error bars indicate the standard deviation of the FD estimates. (d) MSE estimates plotted against SNR for
all different algorithms.

2001b); therefore, we expect them to discriminate between

signals of different complexities.
The results presented in figure 6 reveal that, not
surprisingly, the accuracy of estimation for all FD algorithms
decreases with increasing noise power. For all FD algorithms,
their estimates move towards higher values. This is in
agreement with results presented in Accardo et al (1997),
where noise was directly added to EEG signals. This
effect is more prominent for the lower FD values. That is
reasonable since noise addition to signals with higher FD
values, which are already complicated enough, would not
be expected to have a decisive impact on their estimated
complexity. Katzs and Higuchis algorithms failed to provide
monotonically increasing estimates in the range 1.11.6 and
1.11.5, respectively, for SNR = 20 and 10 (figures 6(a) and
(b)). The k-NN algorithm, on the other hand, maintained its
ability to discriminate among different FD values, even for the
lower theoretical FD values and for SNR levels down to 10 dB
(figure 6(c)). Additionally, figure 6(d) reveals that the smaller
MSEs for all SNR levels are achieved by the k-NN algorithm
which seems to be the most robust and reliable in the presence
of noise.

4. Results using scalp EEG

4.1. Katzs algorithm
FD time profiles using Katzs algorithm were produced as
described in section 2.3. Indicative results derived from the
recordings of two patients from the training and two patients
from the testing data set are depicted in figure 7. The values
of the FD time profiles away from the seizures have a mean
value of around 1.92.2, which appear to be limiting values
for the FD of an EEG signal. This is in agreement with the
overestimations of the true FD values of the synthetic signals
using Katzs algorithm (see section 3.3, figure 5). In the
case of patient 1 (figure 7(a)), no important changes during the
seizures were observed. During the first two seizures of patient
4 (figure 7(b)), a slight drop was evident, but the existence of
this drop was not consistent for all the seizures of that patient.
In the case of patient 7 (figure 7(c)), a slight rise of FD was
recorded around the seizures (but not strictly localized to the
seizure duration), while a similar situation was observed when
patient 8 was examined (figure 7(d)). Similar FD profiles were
produced from the analysis of the other four patients.

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al





Figure 7. FD time profiles using Katzs algorithm for patients 1 (a) and 4 (b) from the training data set and patients 7 (c) and 8 (d) from the
testing data set. Solid vertical lines indicate the start and end of seizures (seizure starts are aligned with t = 0), while dashed vertical lines
indicate the times of alarms. Solid horizontal lines indicate the generic threshold for Katzs algorithm Tg = 1.48.

mentioned that if (L(k))kD , then the curve is fractal with

dimension D and, in that case, the plot of ln(L(k)) against
ln(k) should fall on a straight line with a slope equal to D.
When analysing real data (e.g. EEG), it is possible that the
points (ln(k), ln(L(k))) might not fall on a straight line for the
whole range of k values. In that case, kmax must be selected
appropriately in order for the estimated slope to optimally
approximate the slope of the linear part of the ln(L(k)) versus
ln(k) plot. An example is provided in figure 8, where ln(L(k))
is plotted against ln(k), as estimated using 2 s of EEG data from
patient 1. In figure 8(b), the least-squares fits for kmax = 9, 25,
50 are presented. The straight line that best approximates the
linear part of the ln(L(k)) versus ln(k) curve for a broad range
of k values is the one corresponding to kmax = 50. Similar plots
were acquired when using different EEG segments from the
same patient and also from different patients.
FD time profiles using Higuchis algorithm were produced
as described in section 2.3. Figures 9(a)(c) depict 2000 s of
Higuchis FD time profiles obtained from the first recording
of patient 1 (containing a seizure) and estimated using kmax =
9 (figure 9(a)), 25 (figure 9(b)) and 50 (figure 9(c)). It can be
observed that as kmax increases, the estimated FD values also
increase. This can be explained by figure 8, where, for the same

Using Katzs algorithm, application of the seizure

detection methodology described in section 2.3 produced the
results presented in figure 13. Using the generic threshold
value Tg = 1.48, no seizures were detected for either the
training or the testing data set, resulting in a 0% sensitivity.
Nevertheless, the FP rates produced were, in four patient cases,
close to or above 0.3 h1 . From both visual analysis (figure 7)
and numerical results (figure 13), it becomes clear that Katzs
algorithm did not produce FD changes which were pronounced
enough to enable seizure detection.
4.2. Higuchis algorithm
As already discussed, based on synthetic signal analysis, the
performance of Higuchis algorithm depends on the selection
of the parameter kmax . In section 3.2.1, it was illustrated that
there are three troughs in the plot of MSE versus kmax (figure 3).
The MSE minimum values appeared at kmax = 9, 25, 50, and it
was mentioned that those three values could all be considered
as candidates for FD estimation using Higuchis algorithm
when applied to the EEG data. According to Higuchis
algorithm, the FD of a curve is estimated by means of a leastsquares linear best-fitting procedure. In section 2.2.2, it was

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al



Figure 8. (a) 2 s of EEG from patient 1. (b) Least-squares best fit lines calculated from the (ln(k), ln(L(k))) points as estimated using the
EEG data segment presented in (a), using different values of kmax . Those lines lead to estimates of the FD (with Higuchis algorithm) which
are equal to slope (slope is defined in the legend), for each value of kmax .







Figure 9. 2000 s of FD time profiles estimated using Higuchis algorithm, taken from the first recording of patient 1 (containing a seizure),
and estimated using kmax = 9 (a), 25 (b), 50 (c). Part of FD time profiles depicted in (a)(c), zoomed around the seizure, using kmax = 9 (d),
25 (e), 50 (f) (beginning and end of seizure is indicated by vertical lines).

Figure 10 illustrates indicative FD time profiles derived

using Higuchis algorithm with kmax = 50, from the recordings
of two patients from the training and two patients from the
testing data set (same as in figure 7). In this case, the values
of the FD time profiles away from the seizures had a mean
value of around 1.31.7. In the case of patient 1, there was a
short drop in the Higuchi FD profile at the beginning of each
seizure (figure 10(a)), but during the rest of the seizure the
FD values ranged at similar levels as in the interictal periods.
Similar profiles, displaying a short drop at the beginning of
a seizure, were produced for some seizures of patient 6. In
contrast, the FD values derived from the EEG data of patient
4 (figure 10(b)) exhibited a drop during most of the duration
of the seizures, for all seizures. Drops were also recorded
during most of the duration of the seizures of patient 2 and
during the second half of the seizure duration of patients 3
and 7 (figure 10(c), upper two subplots). However, for some

EEG data window, use of a higher k (increasing kmax values)

leads to greater slopes and, therefore, higher FD estimates.
As can be seen in figures 9(a)(c), selection of kmax = 50
provided FD values closer to the ones estimated using the
k-NN algorithm (as will be shown in figure 11). Moreover,
when zooming into the seizure part displayed in figures 9(d)
(f), it is clear that during the seizure, the value kmax = 50
(figure 9(f)) is the one which achieves better discrimination
of the beginning of the seizure (bigger drop in the FD values
during the beginning of the seizure as compared to the time
interval immediately preceding the seizure) amongst kmax =
9, 25, 50. The same was observed for other seizures from
the same patient and from different patients. Moreover, recall
from section 3.4 that analysis of synthetic signals with added
noise revealed that the most robust estimates were generated
for kmax = 50. Based on these observations, the value kmax =
50 was selected for the analysis of the EEG data.

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al





Figure 10. FD time profiles produced using Higuchis algorithm for patients 1 (a) and 4 (b) from the training data set and patients 7 (c) and
8 (d) from the testing data set. Solid vertical lines indicate the start and end of seizures (seizure starts are aligned with t = 0), while dashed
vertical lines indicate the times of alarms. Solid horizontal lines indicate the generic threshold for Higuchis algorithm Tg = 1.29.

the high value of 19.27 h1 was produced. This was observed

because, in that case, the FD time profiles away from the
seizures had a mean value of around 1.3 (figure 10(d)), i.e.
a value very close to Higuchis generic threshold Tg = 1.29.
Similarly, the use of a generic threshold for seizure detection
in Saab and Gotman (2005) resulted in some patients having
higher FP rates than others. In order to remedy that, the authors
proposed a threshold-tuning mechanism. A similar approach
could be applied to our seizure detection methodology and will
be discussed in section 5.3.

seizures of patients 6 and 7 (figure 10(c), lower subplot) and

for the seizures of patients 5 and 8 (figure 10(d)), either an
increase or no particular change in FD values was observed. It
is interesting to note that this increase was not specific to the
seizure and also appeared in other parts of the recording as well
(as an example, see the rise of FD after the seizure in the last
seizure data displayed for patient 8 in figure 10(d)). This could
be attributed to higher frequency components present during
those recording parts, as discussed in section 5.2. Similarly
to Katzs algorithm, Higuchis algorithm failed to produce
consistent changes of a single character (either a drop or an
increase) that could provide a systematic and specific criterion
indicative of a seizure. In addition, in some seizure cases,
the drops or increases were of short duration in comparison to
the seizure duration and, therefore, did not provide a distinct
characteristic of the dynamics of the whole seizure.
Using Higuchis algorithm, application of the seizure
detection methodology described in section 2.3 produced the
results presented in figure 13. Using the generic threshold
value Tg = 1.29, 24 of 37 seizures were detected in the training
and 1 of 18 seizures in the testing data set. The FP rates were
for six patients well below 0.3 h1 , while for one patient
(patient 3) the FP rate approached 1. However, for patient 8,

4.3. k-NN algorithm

k-NN FD time profiles were produced as described in section
2.3. Figure 11 illustrates indicative FD time profiles, derived
using the k-NN algorithm with (kmin , kmax ) = (1, 173). The
recordings of two patients from the training and two patients
from the testing data set are depicted (same patients as in
figures 7 and 10). In almost all cases, the FD values during
the seizures were of clearly different mean amplitude in
comparison to what happened away from the seizures where
the mean FD value for all patients was above 1.4. This clear
distinction of the ictal period that the k-NN algorithm achieves

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al





Figure 11. FD time profiles produced using the k-NN algorithm for patients 1 (a) and 4 (b) from the training data set and patients 7 (c) and
8 (d) from the testing data set. Solid vertical lines indicate the start and end of seizures (seizure starts are aligned with t = 0), while dashed
vertical lines indicate the times of alarms. Solid horizontal lines indicate the generic threshold for the k-NN algorithm Tg = 1.27.

is very important when it comes to applying a simple threshold

for seizure detection.
As can be seen in figure 11, the k-NN FD for some data
windows took values greater than 2 (when, theoretically, the
FD of a curve can only have values between 1 and 2). These
overestimations occurred in cases where the EEG in the time
window under investigation included some values that were
outliers when regarding the amplitude distribution of the rest
of the EEG data points in the window (those were mostly
due to artefacts, e.g. chewing activity). An example of an
EEG segment causing overestimations in the k-NN FD time
profile is illustrated in figure 12. It is worth noting that those
overestimations did not affect the result of the seizure detection
methodology, as production of alarms was associated with
FD points being below the threshold.
Using the k-NN algorithm, application of the seizure
detection methodology described in section 2.3 produced the
results presented in figure 13. Using the generic threshold
value Tg = 1.27, all seizures were detected both for the training
and the testing data set, resulting in 100% sensitivity. Of all
seizure detections, 89.09% were achieved within the first third
of the corresponding seizure duration. Only 6 of 55 seizures
were detected late, 5 of which were of patient 3 and 1 of

patient 4. Relatively low mean FP rates were produced both

for the training and the testing data set.

5. Discussion
5.1. General comments on the contribution of the current
In epileptogenesis, according to most of the theories
commonly accepted today, neuronal synchronization is
considered to be decisive (Mormann et al 2000 and references
therein). In epileptic EEG, seizures are usually characterized
by rhythmic patterns (Meier et al 2008). This fact points to the
possible usefulness of fractal analysis in the context of seizure
detection. Synchronized, rhythmic activity during the seizures
is expected to lead to a reduction in complexity, as compared to
the more disorganized interictal activity. This reduction can,
in principle, be quantified utilizing nonlinear measures such
as the FD, which is expected to show a drop in values during
the seizure period, in comparison to the interictal period.
As presented in the introduction, the idea of analysing
EEG recordings using FD methods for epileptic seizure
detection has been examined in a few past studies (Esteller et al

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al



Figure 12. (a) EEG data segment of patient 1 contaminated with muscle artefact due to chewing. (b) Overestimations (FD k-NN>2) in the
k-NN FD time profile. A star indicates the FD value which is estimated based on the EEG values of the 2 s data window which starts at the
point in time that the star lies. Dashed vertical lines in (a) mark the time window which produced the first overestimated FD value indicated
by a dashed vertical line in (b). A second overestimated value follows in the next window.




Figure 13. Performance of the seizure detection methodology using Katzs, Higuchis and the k-NN FD estimation algorithms.
(a) Sensitivity achieved for each FD algorithm using the generic threshold values Tg = 1.48 (Katzs algorithm), 1.29 (Higuchis algorithm)
and 1.27 (k-NN algorithm). In the bars, the number of detected seizures over the total number of seizures for each patient is depicted. (b)
Mean values and standard deviations of DDs for the patients in the training and testing data sets. (c) FP rates for the patients in the training
and testing data sets. Mean values for sensitivity, DD and FP rate for both the training and the testing data set are presented at the right end
of each bar chart.

onset of epileptic seizures in such a context, achieving both

high sensitivity and specificity, accompanied by low DDs. To
this end, three waveform FD estimation algorithms were used.
In order to pursue the goal of seizure onset detection,
a careful and extensive evaluation of the algorithms utilized
using synthetic data of known FD was found to be necessary.
This evaluation was the second objective of the current study,
and it was twofold. On the one hand, parameters involved
in the calculation of Higuchis and the k-NN algorithms were

2001b, Accardo et al 1997, Bullmore et al 1994, and references

therein). Nevertheless, to the best of our knowledge, no
extensive study has been published to date on an FD estimation
algorithm for seizure onset detection applied on multi-day
scalp or intracranial EEG, including all different physiological
states that could exist in a long-term EEG monitoring setting
(e.g. eating, sleeping, etc) as well as several possible artefacts.
The main objective of this study was to examine and compare
the ability of different FD estimation algorithms to detect the

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al

As already mentioned, both Katzs and Higuchis

algorithms failed to produce consistent changes of a single
type (either a drop or an increase) that could provide a
systematic and specific criterion indicative of seizures. It is
worth noting that Katzs algorithm, in general, produced less
distinct changes in FD time profiles as compared to Higuchis
algorithm. In quite a few cases, no clear change would be
observed using Katzs algorithm. This probably explains the
failure of Katzs algorithm to detect any seizures both in the
training and the testing data set.
The FD time profiles produced based on both Katzs
and Higuchis methods, though, seemed to follow a similar
underlying trend: during seizures where Higuchis FD time
profile would show a drop (or increase), something similar
(but less pronounced) would happen for Katzs FD time profile
(figures 7 and 10). This could be attributed to the common
approach behind FD estimation used in both algorithms, which
is estimation of the length of a curve. The superiority of
Higuchis algorithm might be related to a more accurate curve
length estimation or to its superior robustness in the presence
of noise.
On the other hand, the k-NN algorithm exhibited a FD
drop which was evident during most seizures of all patients
and was also specific to the seizures. This could be attributed to
the different underlying approach that the k-NN algorithm uses
for FD estimation, which is a fixed-mass approach, instead of
a curvelength estimation approach. The fixed-mass approach
for estimation might also be the reason that, when using
synthetic signals contaminated with noise, the k-NN algorithm
proved to be superior in terms of robustness of estimation, as
illustrated in section 3.4 (figure 6).
Why would the FD time profiles using Katzs and
Higuchis algorithms show in some seizure cases an increase
instead of a drop? Investigation of the frequency content of the
EEG signal during those seizures revealed that this increase
might be associated with the presence of higher frequency
components in the EEG (above the alpha EEG rhythm range),
which were not present during seizures for which a drop was
observed. This observation is in agreement with a previous
study using a line-length metric for seizure detection (Esteller
et al 2001a), according to which the line-length metric grew
as the data sequence frequency or magnitude increased. Such
higher frequency components also appeared in our EEG data
set away from seizures, for instance due to artefacts or muscle

estimated based on minimization of the MSE of the FD using

the synthetic data. To the best of our knowledge, such an
approach for selecting the parameters for both algorithms has
not been presented in the literature before. The results of the
current study, however, emphasize the importance of these
parameters selection. On the other hand, the accuracy of the
algorithms and their robustness in the presence of noise was
assessed. A similar comparison between Katzs and Higuchis
algorithms, based on synthetic data, has been attempted in the
past (Esteller et al 2001b), but the current work is enhanced
with the inclusion of the k-NN algorithm in the comparison,
which was found to be the most robust in the presence of noise.
The results of the current work indicate that fractal
analysis can indeed be useful for epileptic seizure onset
detection with high sensitivity and specificity, but only when
using the k-NN algorithm. Katzs and Higuchis algorithms
failed to produce systematic and specific changes in FD time
profiles and showed non-satisfactory numerical results. The
reason that seizure onset detection was feasible in the current
study using a simple threshold (Tg) on the k-NN FD time
profiles is twofold. On the one hand, the k-NN FD values
started dropping immediately after the seizure onset in most
seizures. On the other hand, the separation between the k-NN
FD values corresponding to seizures and those corresponding
to non-seizure periods was big enough and allowed us to use
a simple threshold to distinguish between the two, without the
production of an unacceptable number of FPs.
Utilizing the k-NN algorithm as a time series analysis
methodology in the current work brought out its potential
usefulness for other time series analysis applications. Its high
discriminatory power, illustrated in the context of consistently
identifying the dynamics of the seizure state, indicates that it
can be applied to other signals besides the EEG (e.g. financial
time series) in order to provide a characterization of possibly
different states of the system generating the signal.
5.2. Comparison of FD algorithms based on scalp EEG
The main purpose of our work was to compare the suitability
of different FD methods for detecting seizures of MTL origin.
In that vein we provided evidence supporting the superiority
of the k-NN method, application of which resulted in 100%
sensitivity accompanied by relatively low DD times and
relatively low FP rates. On the other hand, Katzs method
produced relatively low mean FP rates in both the testing
and the training data sets, but failed to detect any seizures.
Higuchis method did not detect all the seizures in the training
data set and detected only one seizure in the testing, and at
the same time produced a higher mean FP rate and DD as
compared to the results of the k-NN method in both the training
and the testing data set. The success of the k-NN method could
be attributed to its ability to produce lower FD values during the
seizures even in the presence of higher frequency activity, in
contrast to Katzs and Higuchis methods. Therefore, the k-NN
method is expected to be successful in detecting seizures with
high-frequency content, such as those of neocortical origin
(Worrell et al 2004).

5.3. Seizure onset detection methodology

Due to the very different nature of scalp and intracranial EEG,
we could only compare the results of the present study to those
of seizure onset detection studies based on scalp EEG (Meier
et al 2008, Saab and Gotman 2005, Shoeb et al 2004, Qu and
Gotman 1997). The system of Saab and Gotman (2005) aimed
at detecting the onset of epileptic seizures in scalp EEG, based
on wavelet decomposition and Bayesian probabilities. Using
a threshold-tuning mechanism, they reported in their testing
data set (360 h of scalp EEG, which included 69 seizures
in 16 patients suffering from various epilepsy types) 76%

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al

sensitivity, a FP rate of 0.34 h1 and a median DD of 10 s.

The results without tuning were 77.9%, 0.86 h1 and 9.8 s,
respectively. Our methodology based on the k-NN algorithm,
applied to our testing data set, seems to compare favourably
in terms of sensitivity (100%), FP rate (0.42 h1 ) and (mean)
DD (8.82 s). However, a direct comparison might not be
appropriate since, on the one hand, we only included seizures
of MTL origin in our study, and, on the other hand, we did not
use any techniques for automatic artefact rejection.
Saab and Gotman (2005), in addition to filtering the
data between 3 and 30 Hz, applied various artefact rejection
techniques prior to automatic detection production, to confront
common sources of FP for their system, such as alpha EEG
activity, EMG and electrode failure of different kinds. In
our work, no artefact rejection techniques were applied, other
than filtering the data between 3 and 30 Hz and making
use of the parameter w. The most common sources of
FPs using our methodology were artefacts mainly caused
by chewing, movement of the reference electrode or other
electrode artefacts, and bursts of rhythmic EEG activity. In a
few cases, sleep rhythmic EEG activity and activity of epileptic
origin caused some FPs. The latter, nevertheless, were not
actual epileptic seizures. Therefore, they were categorized
as FPs. Inclusion of some artefact rejection techniques might
improve the performance of the seizure detection methodology
of the current study.
In a recent study (Meier et al 2008), the authors attention
was focused on detecting different seizure morphologies,
rather than just seizures originating from different epilepsy
types. Using 91 seizures, representing the most common
ictal morphologies, from 57 patients, they reported FP rates
<0.5 h1 (for specific ictal morphologies even <0.25 h1 ),
with average sensitivity >96% and very short DDs, of about
1.6 2.8 s. Nevertheless, they defined the seizure onset as the
beginning of the first observable seizure pattern in the EEG
rather than the time point at which the first EEG changes
occur which lead to a clear seizure discharge as defined in the
current study. Thus, direct comparisons in terms of DDs may
not be appropriate.
The authors in Qu and Gotman (1997) designed a system
based on a seizure template for each patient and achieved a
seizure onset detection rate of 100%, with an average delay
of 9.35 s after onset, accompanied by an FP rate of 0.02 h1
(method evaluated in 12 patients with a total of 47 seizures). In
their system, at least one seizure, as well as a broad variety of
the patients background EEG patterns had to be available for
tuning the method on each patient separately before actually
applying the method. In Shoeb et al (2004), the authors
utilized wavelet decomposition and support vector machines to
detect 131 out of 139 studied seizures of different types (94%
sensitivity) within 8.0 3.2 s of seizure onset. In 60 h of EEG,
15 false detections were declared (FP rate of 0.25 h1 ). Those
results were fairly satisfactory, but their system required 24
seizures to be a priori available for each patient, in addition to
non-seizure EEG segments separating the seizure occurrences
for each patient.
The proposed seizure detection methodology does not
require a priori information about the morphology of the

seizures analysed or about the interictal content of the EEG

records of a patient. After an initial calculation of a generic
threshold Tg from the training data, the same threshold can
be applied to any patient and the value of this threshold is
the only information needed for producing alarms using one
EEG channel. Nevertheless, the selection of the appropriate
EEG channel to be used, as described in section 2.3, requires
the recording of at least one seizure. Note though that this
does not affect the way the FD time profiles are generated.
It only affects the post-processing of the FD time profiles for
Saab and Gotman (2005) described a seizure detection
methodology which was also based on the application of a
generic threshold. Application of their methodology to scalp
EEG revealed that some patients had higher false detection
rates than others. In order to improve performance for those
patients in a clinical setting, the authors described the idea
of properly tuning the threshold in order not to exceed a
predefined FP rate (see above for their results). This tuning
could be applied to our seizure detection methodology. The
reasoning behind the applicability of a tuning mechanism is
the following: first, different seizures, even if they all originate
from MTL, can exhibit a wide range of morphologies. If the
seizures of a patient are characterized by high rhythmicity,
the corresponding FD values can be significantly lower as
compared to the interictal FD values and could, therefore,
be detected using relatively low threshold values. However,
seizures of not enough rhythmic content could be missed.
Secondly, during the interictal period, there may exist different
rhythmic EEG patterns related or unrelated to epilepsy, which
can lead, for some patients, to interictal FD values closer to
the generic threshold, thus causing a high number of FPs. The
tuning mechanism can provide a means for correcting for
the different characteristics of each patient.
It should be pointed out that direct comparison between
different seizure onset detection algorithms would be
appropriate only if the algorithms were to be applied on the
same data set. Differences in the length of data and type
of epilepsies under investigation, the variability of seizure
patterns, the presence of different uncontrollable technical
artefacts in the EEG, and even different recording settings
during data acquisition could make a direct comparison
5.4. Future work
For future work towards automatic seizure onset detection,
application of our method to EEG data from more patients and
of more epilepsy types is needed. Appropriate modification
of the k-NN FD estimation methodology as to include
information from multiple channels would address the issue of
initialization which requires the selection of a single electrode
channel for the analysis to be performed. Utilization of
multiple channels would also facilitate the inclusion of some
artefact removal techniques. Additionally, analysing the EEG
data using different frequency bands could prove useful for
some types of seizure morphologies. Finally, since the k-NN
FD estimation algorithm, using a simple thresholding

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al

operation, was shown to be quite a robust detector of seizures,

its inclusion as a feature in more sophisticated seizure detection
systems using, for instance, artificial neural networks, support
vector machines or other artificial intelligence tools (e.g. expert
systems) could possibly lead to improved performance of
seizure detection methodologies.

Eder H G, Jones D B and Fisher R S 1997 Local perfusion of

diazepam attenuates interictal and ictal events in the
bicuculline model of epilepsy in rats Epilepsia 38 51621
Eke A, Herman P, Kocsis L and Kozak L R 2002 Fractal
characterization of complexity in temporal physiological
signals Physiol. Meas. 23 138
Engel J 2001 Mesial temporal lobe epilepsy: What have we
learned? Neuroscientist 7 34052
Esteller R, Echauz J, Tcheng T, Litt B and Pless B 2001a Line
length: an efficient feature for seizure onset detection Proc.
23rd Annual Int. Conf. of the IEEE Engineering in Medicine
and Biology Society (Istanbul, Turkey, 2528 October 2001)
vol 2 pp 170710
Esteller R, Vachtsevanos G, Echauz J, Henry T, Pennell P,
Epstein C, Bakay R, Bowen C and Litt B 1999 Fractal
dimension characterizes seizure onset in epileptic patients Int.
Conf. on Acoustics, Speech, and Signal Processing (Phoenix,
AZ, 1519 March 1999) vol 4 pp 23436
Esteller R, Vachtsevanos G, Echauz J and Litt B 2001b A
comparison of waveform fractal dimension algorithms IEEE
Trans. Circuits Syst. I 48 17783
Falconer K J 2003 Fractal Geometry: Mathematical Foundations
and Applications (Chichester: Wiley)
Gabor A A, Leach R R and Dowla F U 1996 Automated seizure
detection using a self-organizing neural network
Electroencephalogr. Clin. Neurophysiol. 99 25766
Gabor A J 1998 Seizure detection using a self-organizing neural
network: validation and comparison with other detection
strategies Electroencephalogr. Clin. Neurophysiol. 107 2732
Gardner A B, Krieger A M, Vachtsevanos G and Litt B 2006
One-class novelty detection for seizure analysis from
intracranial EEG J. Mach. Learn. Res. 7 102544
Goncharova I, McFarland D, Vaughan T and Wolpaw J 2003 EMG
contamination of EEG: spectral and topographical
characteristics Clin. Neurophysiol. 114 158093
Gotman J 1982 Automatic recognition of epileptic seizures in the
EEG Electroencephalogr. Clin. Neurophysiol. 54 53040
Gotman J 1990 Automatic seizure detection: improvements and
evaluation Electroencephalogr. Clin. Neurophysiol.
76 31724
Hornero R, Abasolo D and Fernandez A
Gomez C, Mediavilla A,
2009 Use of the Higuchis fractal dimension for the analysis of
MEG recordings from Alzheimers disease patients Med. Eng.
Phys. 31 30613
Grassberger P 1985 Generalizations of the Hausdorff dimension of
fractal measures Phys. Lett. A 107 1015
Grassberger P and Procaccia I 1983 Measuring the strangeness of
strange attractors Physica D 9 189208
Grewal S and Gotman J 2005 An automatic warning system for
epileptic seizures recorded on intracerebral EEGs Clin.
Neurophysiol. 116 246072
Haas S M, Frei M G and Osorio I 2007 Strategies for adapting
automated seizure detection algorithms Med. Eng. Phys.
29 895909
Harding G W 1993 An automated seizure monitoring system for
patients with indwelling recording electrodes
Electroencephalogr. Clin. Neurophysiol. 86 42837
Higuchi T 1988 Approach to an irregular time series on the basis of
the fractal theory Physica D 31 27783
Kaplan D and Glass L 1995 Understanding nonlinear dynamics
Textbooks in Mathematical Sciences ed T F Banchoff et al
(New York: Springer)
Katz M J 1988 Fractals and the analysis of waveforms Comput.
Biol. Med. 18 14556
Katz M J and George E B 1985 Fractals and the analysis of growth
paths Bull. Math. Biol. 47 27386
Khan Y U and Gotman J 2003 Wavelet based automatic seizure
detection in intracerebral electroencephalogram Clin.
Neurophysiol. 114 898908

The work of GEP was supported by the Hellenic State
Scholarships Foundation.

Accardo A, Affinito M, Carrozzi M and Bouquet F 1997 Use of the
fractal dimension for the analysis of electroencephalographic
time series Biol. Cybern. 77 33950
Acharya U R, Bhat P S, Kannathal N, Rao A and Lim C M 2005
Analysis of cardiac health using fractal dimension and wavelet
transformation ITBM-RBM 26 1339
Andrzejak R G, Lehnertz K, Mormann F, Rieke C, David P
and Elger C E 2001 Indications of nonlinear deterministic and
finite-dimensional structures in time series of brain electrical
activity: dependence on recording region and brain state Phys.
Rev. E 64 061907
Andrzejak R G, Mormann F, Widman G, Kreuz T, Elger C E
and Lehnertz K 2006 Improved spatial characterization of the
epileptic brain by focusing on nonlinearity Epilepsy Res.
69 3044
Annegers J 1997 The epidemiology in epilepsy The Treatment of
Epilepsy: Principle and Practice ed E Wyllie (Baltimore, MD:
Williams & Wilkins) pp 16572
Arle J E and Simon R H 1990 An application of fractal dimension to
the detection of transients in the electroencephalogram
Electroencephalogr. Clin. Neurophysiol. 75 296305
Asvestas P, Matsopoulos G K and Nikita K S 1999 Estimation of
fractal dimension of images using a fixed mass approach
Pattern Recognit. Lett. 20 34754
Berryman M J, Coussens S W, Pamula Y, Kennedy D,
Lushington K, Shalizi C, Allison A, Martin A J, Saint D
and Abbott D 2005 Nonlinear aspects of the EEG during sleep
in children Proc. SPIE: Fluctuations and Noise in Biological,
Biophysical, and Biomedical Systems (Austin, TX, 2426 May
2005) vol 5841 pp 408
Bhavaraju N C, Frei M G, Osorio I, Sci F H and Lawrence K S 2006
Analog seizure detection and performance evaluation IEEE
Trans. Biomed. Eng. 53 23845
Bullmore E, Brammer M, Alarcon G and Binnie C 1992 A new
technique for fractal analysis applied to human, intracerebrally
recorded, ictal electroencephalographic signals Neurosci. Lett.
146 22730
Bullmore E T, Brammer M J, Bourlon P, Alarcon G, Polkey C E,
Elwes R and Binnie C D 1994 Fractal analysis of
electroencephalographic signals intracerebrally recorded
during 35 epileptic seizures: evaluation of a new method for
synoptic visualisation of ictal events Electroencephalogr. Clin.
Neurophysiol. 91 33745
Burlaga L F and Klein L W 1986 Fractal structure of the
interplanetary magnetic field J. Geophys. Res. 91 34750
Cabukovski V, Rudolf N M and Mahmood N 1993 Measuring the
fractal dimension of EEG signals: selection and adaptation of
method for real-time analysis WIT Trans. Biomed. Health 1
De Clercq W, Vergult A, Vanrumste B, Van Paesschen W and
Van Huffel S 2006 Canonical correlation analysis applied to
remove muscle artifacts from the electroencephalogram
IEEE Trans. Biomed. Eng. 53 25837

J. Neural Eng. 7 (2010) 046007

G E Polychronaki et al

Klonowski W 2000 Signal and image analysis using chaos theory

and fractal geometry Mach. Graph. Vis. 9 40332
Klonowski W 2002 Chaotic dynamics applied to signal complexity
in phase space and in time domain Chaos Soliton. Fract.
14 137987
Le Van Quyen M, Martinerie J, Navarro V, Boon P, DHave M,
Adam C, Renault B, Varela F and Baulac M 2001 Anticipation
of epileptic seizures from standard EEG recordings Lancet
357 1838
Li X, Polygiannakis J, Kapiris P, Peratzakis A, Eftaxias K and
Yao X 2005 Fractal spectral analysis of pre-epileptic seizures
in terms of criticality J. Neural Eng. 2 116
Liu H S, Zhang T and Yang F S 2002 A multistage, multimethod
approach for automatic detection and classification of
epileptiform EEG IEEE Trans. Biomed. Eng. 49 155766
Liu J Z, Yang Q, Yao B, Brown R W and Yue G H 2005 Linear
correlation between fractal dimension of EEG signal and
handgrip force Biol. Cybern. 93 13140
Mandelbrot B B 1982 The Fractal Geometry of Nature (New York:
Maragos P and Sun F K 1993 Measuring the fractal dimension of
signals: morphological covers and iterative optimization IEEE
Trans Signal Process. 41 10821
McSharry P E, He T, Smith L A and Tarassenko L 2002 Linear and
non-linear methods for automatic seizure detection in scalp
electro-encephalogram recordings Med. Biol. Eng. Comput.
40 44761
Meier R, Dittrich H, Schulze-Bonhage A and Aertsen A 2008
Detecting epileptic seizures in long-term human EEG: a new
approach to automatic online and real-time detection and
classification of polymorphic seizure patterns J. Clin.
Neurophysiol. 25 11931
Meng L, Frei M G, Osorio I, Strang G and Nguyen T Q 2004
Gaussian mixture models of ECoG signal features for improved
detection of epileptic seizures Med. Eng. Phys. 26 37993
Mormann F, Lehnertz K, David P and Elger C E 2000 Mean phase
coherence as a measure for phase synchronization and its
application to the EEG of epilepsy patients Physica D
144 35869
Morrell M 2006 Brain stimulation for epilepsy: Can scheduled or
responsive neurostimulation stop seizures? Curr. Opin. Neurol.
19 1648
Murro A M, King D W, Smith J R, Gallagher B B, Flanigin H F
and Meador K 1991 Computerized seizure detection of
complex partial seizures Electroencephalogr. Clin.
Neurophysiol. 79 3303
Osorio I et al 2002 Performance reassessment of a real-time
seizure-detection algorithm on long ECoG series Epilepsia
43 152235
Osorio I, Frei M G and Wilkinson S B 1998 Real-time automated
detection and quantitative analysis of seizures and short-term
prediction of clinical onset Epilepsia 39 61527
Paramanathan P and Uthayakumar R 2008 An algorithm for
computing the fractal dimension of waveforms Appl. Math.
Comput. 195 598603
Petrosian A 1995 Kolmogorov complexity of finite sequences and
recognition of different preictal EEG patterns Proc. 8th Annual

IEEE Symp. on Computer-Based Medical Systems, IEEE

Computer Society (Washington, DC, 910 June 1995)
pp 21217
Pickover C A and Khorasani A 1986 Fractal characterization of
speech waveform graphs Comput. Graph. 10 5161
Qu H and Gotman J 1997 A patient-specific algorithm for the
detection of seizure onset in long-term EEG monitoring:
possible use as a warning device IEEE Trans. Biomed. Eng.
44 11522
Saab M E and Gotman J 2005 A system to detect the onset of
epileptic seizures in scalp EEG Clin. Neurophysiol.
116 42742
Sackellares J C, Iasemidis L D, Shiau D S, Gilmore R L and
Roper S N 2000 Epilepsy-when chaos fails Chaos in the
Brain ed K Lehnertz et al (Singapore: World Scientific)
pp 11233
Sazonov A V, Ho C K, Bergmans J W M, Arends J B A M,
Griep P A M, Verbitskiy E A, Cluitmans P J M and
Boon P A J M 2009 An investigation of the phase locking
index for measuring of interdependency of cortical source
signals recorded in the EEG Biol. Cybern.
100 12946
Schad A, Schindler K, Schelter B, Maiwald T, Brandt A, Timmer J
and Schulze-Bonhage A 2008 Application of a multivariate
seizure detection and prediction method to non-invasive and
intracranial long-term EEG recordings Clin. Neurophysiol.
119 197211
Schindler K, Wiest R, Kollar M and Donati F 2001 Using
simulated neuronal cell models for detection of epileptic
seizures in foramen ovale and scalp EEG Clin. Neurophysiol.
112 100617
Shoeb A, Edwards H, Connolly J, Bourgeois B, Ted Treves S
and Guttag J 2004 Patient-specific seizure onset detection
Epilepsy Behav. 5 48398
Tellez-Zenteno J F, Dhar R and Wiebe S 2005 Long-term seizure
outcomes following epilepsy surgery: a systematic review and
meta-analysis Brain 128 118898
Tricot C 1995 Curves and Fractal Dimension (New York: Springer)
van Putten M J A M, Kind T, Visser F and Lagerburg V 2005
Detecting temporal lobe seizures from scalp EEG recordings: a
comparison of various features Clin. Neurophysiol.
116 24809
Vergult A, De Clercq W, Palmini A, Vanrumste B, Dupont P,
Van Huffel S and Van Paesschen W 2007 Improving the
interpretation of ictal scalp EEG: BSS-CCA algorithm for
muscle artifact removal Epilepsia 48 9508
Voss R F 1988 Fractals in nature: from characterization to
simulation The Science of Fractal Images (New York:
Springer) pp 2170
Waterhouse E 2003 New horizons in ambulatory
electroencephalography IEEE Eng. Med. Biol. 22 7480
Wilson S B, Scheuer M L, Emerson R G and Gabor A J 2004
Seizure detection: evaluation of the reveal algorithm Clin.
Neurophysiol. 115 228091
Worrell G, Parish L, Cranstoun S, Jonas R, Baltuch G and Litt B
2004 High-frequency oscillations and seizure generation in
neocortical epilepsy Brain 127 1496506