Académique Documents
Professionnel Documents
Culture Documents
RMP 2015
Torrey Pines High School, 3710 Del Mar Heights Road, San Diego, CA 92130
e-mail address: priya.pm2@gmail.com
2
Dept. of Electrical and Computer Engineering, University of California, Santa Barbara, 93106, USA
A new computational approach to signal processing permits the detection of epileptic seizures prior to
their onset through the identification of the seizure transition period. While existing technologies can
recognize seizures seconds before they occur, what we are proposing is a method to predict one minutes
before. To do this, we implement a regression technique that contour fits the data points representing brain
signals from before and after a seizure. These signals appear different in the two states, subsequently
altering the regression line. By applying our algorithm, the variance will become evident, allowing us to
recognize the transition period and predict the seizure. Specifically, we look at calculating the error signal
that illustrates the accuracy with which our algorithm can predict the next brain signal.
Keywords: electroencephalogram data, contour fitting, seizure transition period, interpolation, quadratic approximation
I. INTRODUCTION
Seizures are notorious for occurring without warning and
for causing irreversible damage physically to patients and
emotionally to the family. According to the Epilepsy
Foundation, people with epilepsy are up to three times more
likely to die early as a result of seizures that occur close to
time of death. Current advancements in medicine allow
doctors to prescribe patients with anticonvulsant drugs,
such as Carbamazepine or Divalproex, which can help
mitigate the affects of a seizure, but not before it procures.
[1] In addition, electrical stimulation of the vagus nerve and
adopting a Ketogenic diet are possible treatments, but these
become useful only if the seizure is predicted prior to its
onset.
A new approach to seizure detection explored in The
Epilepsies: Seizures, Syndromes and Management uses
electroencephalogram (EEG) data to produce an
incontrovertible diagnosis on an epileptic patient. We
believe that EEG data can also be used to predict a seizure
by studying the discrepancies between signals from before
and after a seizure. Prior to a seizure, brain signals will
form a very chaotic plot, while during a seizure, the signals
will present a more organized graph. By finding a general
pattern to the movement, we may be able to foresee the
period directly before a seizure, the seizure transition
period, and therefore, pinpoint any abnormalities ahead of
time.
Unfortunately, there is no significantly developed method
for anticipating a seizure. One reason for this is it would
require an algorithm that can plot real-time brain signals
and make an inference purely based on these signals.
Furthermore, brain signals come with a myriad of other
information that can obscure the seizure transition period
and hinder our ability to identify it. This perplexing topic,
RMP 2015
II. STEPS
Current technological advancements have allowed
doctors to prescribe patients with anticonvulsant drugs and
perform medical operations, but only after a seizure has
procured. The existing method of diagnosing epileptic
patients using EEG data unfortunately requires at least one
severe seizure to transpire in order for the results to be
accurate. As a result, our algorithm analyzed preprocessed
EEG data that quantified each brain signal as a threedimensional point in order to try and predict a seizure
before it occurs entirely.
The algorithm initially formulated bins or clusters by
interpolating the predefined matrix of time into one
hundred sections. To create the bins, we generated a matrix
with the first hundred integers and then multiplied each
entry by the interval, or the length of each bin. The interval
was the maximum value of time subtracted by the
minimum value of time, divided by the number of clusters.
In our case, this number was 0.01. To make sure that time
started equal to zero, after completing the calculations, we
manually made zero the boundary of the first bin. We then
computed the average point and time in every cluster and
plotted the resulting values on top of the plot showing all
the data points. For the initial stages of this experiment we
also calculated the mean value, with the value being
defined as a binary number: 0 if the point was not during a
seizure and 1 if it was. The resulting one hundred data
points, represented by the black data points in FIG. 1.,
successfully eliminated the noisy EEG data and clearly
defined the universal trend of the data. In addition, this new
matrix of points was used for the derivation of the
regression line so that the line could easily and accurately
capture the data. To devise the regression line, the
algorithm used derivatives to estimate how the XY position
was changing
! = + ( ) the
algorithm
!
!
created a cohesive connection between the respective
slopes that took both the first and second derivative into
account. The resulting information allowed us to elongate
certain parts of the regression line based on the changes in
slope, effectively fitting the curve, as shown in FIG. 2.
By implementing an error analysis on the difference
between the approximation and the actual line fitting the
curve, we were able to determine the accuracy of the
regression line or contour fit. The actual line was found
using one-dimensional interpolation. A low error would be
indicative of a very accurate contour fit. The analysis also
displayed the optimal number of bins that would best
represent the data. [4] This particular approach to creating a
regression line is based on Weierstrass Theorem, which
states that there exists a sequence of polynomials, Pn such
that as n , Pn(x) f(x) or the original function. After
figuring out a pattern of movement, the algorithm could
RMP 2015
(a)
(b)
(c)
FIG. 5. Shows the second error analysis that was conducted. Graph (a) was created using 5 bins and has a max error of
0.014. Graph (b) has 31 bins and a max error of 0.018. Graph (c) has 100 bins and has the smallest error of 0.012.
IV. CONCLUSION
Our algorithm used the Weierstrass Theorem to devise a
quadratic approximation that accurately contour fitted the
data. By using interpolation, we were able to reduce the
noise of the graph and extricate the important information.
The first and second derivative allowed us to plot a
regression line that took both the slope and the changes in
slope into account. We were able to calculate the precision
with which our algorithm can extrapolate the data using the
nearest neighbor tracking algorithm and by creating sample
RMP 2015
points between the bins. Our results proved that there was
no correlation between how often we sampled the data and
the accuracy of our prediction of the next brain signal. The
low error signal further validated the algorithm as it
confirmed that we are able to accurately estimate the next
point. In comparison to other methods, our algorithm has
the advantage of being able to analyze the brain signals in
real time by defining each signal as a three-dimensional
point. In addition, the program can be easily manipulated to
devise regression lines of a higher degree by simply
tweaking the existing definitions. With this new approach,
doctors could now study only the error signals the
algorithm produces and make a decision based on the value
of the error. This can greatly increase the probability of
identifying the seizure transition period and preventing a
seizure minutes before it occurs. In the future, we could
create our own functions that could increase the speed of
the algorithm. We could also implement machine learning
so that doctors no longer have to stare continuously at the
signals, but rather a computer could perform the same task.
Finally, the next step for the algorithm would be to
implement a variation of the SFS algorithm to not only
predict the seizure, but also the intensity of the seizure. This
would allow doctors to supply patient-specific treatments
based on the severity of the oncoming seizure.
ACKNOWLEDGEMENTS
I would first like to thank Mr. Abhejit Rajagopal and Mr.
Nithin Govindarajan for guiding me through this project.
They not only taught me a higher level of coding but also
introduced me to the math and theory behind what we were
doing. Next, I want to thank my TA, Raymond Valdes as
well as Dr. Lina Kim for showing me the fundamentals of
research and for editing my paper, poster and presentation
to make them the best that they could be. Lastly, I want to
thank my fellow RMP students for their support and
encouragement during these six weeks, especially Samara
Shaz for her help during the initial stages of the project,
Gitanjali Multani for her help throughout the project, and
Esha Gajjar, Ashlee Brown- Hillard, Ravel Leal, Maria
Calderon, and Olivia Ettlin for being amazing friends.
[3] R. Zhang, Height recovery from intensity gradient,
Proceedings of IEEE Conference on Computer Vision
and Pattern Recognition CVPR-94, pp. 508513.
[4] D. Eberly, Derivative Approximation by Finite
Differences, http://www.geometrictools.com/, 2001. .