DIMACSCenter for Discrete Mathematics & Theoretical Computer Science

Hello! I'm Megan and I attend school in Winona, MN, which is in the SE corner of the state. I originate from Eau Claire, WI, which is just over an hour from Winona. In the fall I will be in my fifth year at WSU, obtaining my B.S.T (Secondary Math Education) and B.A. (Psychology (my interest is neuroscience)). I also have a Statistics minor.

At the end of July I will be traveling with a group from Rutgers to Charles University in Prague, Czech Republic. After two and a half weeks of studying there, I will be traveling for an additional ten days on my own, which I am very excited about.

After fall classes, I will be student teaching in spring 2007 in either New Zealand, Australia or Norway.

Upon graduating I see myself attending graduate school, hopefully studying something math- and/or neuroscience-related.

Megan J. Olson

MJOlson5437_at_winona.edu

Office: CoRE 450, Rutcor 150

School of Origin: Winona State University; Winona, MN Math/Stat Page

Project: Classification of Epileptic Brain Activity

### Project Description

This study employed the use of wavelet transform and various entropy measures in hopes of discovering fundamental differences in EEG readouts from normal and epileptic patients (in the absence of seizure activity). These two approaches were based on the idea of pattern analysis, and the notion that the epileptic brain becomes more ordered when seizures occur. The purpose is to work toward an efficient method of screening for those not yet diagnosed with epilepsy. Given that this condition affects at least 40 million people worldwide and may be diagnosed at any age, the endeavor is noteworthy. Results from the quantified wavelet transform analysis suggest underlying differences in low-level frequencies between the two patient groups. Additionally, two of the five entropy measures yielded significantly different results, one of which in the direction of the hypothesis that the epileptic mind is more patterned, or well-ordered. Additionally, one entropy measure showed extreme variation in the range of values for the epileptic group, whereas the normal range was quite well defined. The basis of this approach was to sample various tools that may be used as an initial differentiation between affected and non-affected groups. The results have created a basis from which to explore further the condition of epilepsy.

### The Math Behind It All

Background
Wavelet Transform

One reason for using wavelet transform is that it gives good visual indication of patterns that may exist in data (including fractals) (Arneodo, D’Aubenton-Carafa, Audit, Bacry, Muzy, & Thermes, 1998). From the work of Chaovalitwongse, Prokepyev et al. (2005), the brain is well defined as a chaotic system. Given this knowledge, it seemed feasible that the frequencies in the brains of normal and epileptic patients could display different fractal patterns, as would be modeled well by wavelet plots. Frequently in literature regarding wavelets, the concept of “self-similarity” is mentioned (one such instance can be found in the work of Wornell & Oppenheim, 1992). In line with the concept of fractals, this means wavelet plots are very good at showing repeating patterns that exist in a data signal.

At this point I will branch out into a discussion of the mathematics behind wavelet transform. The main idea of this approach is that for a given time interval (a single point in time cannot be considered because of Heisenberg’s uncertainty principle. This notion states the position and momentum of a particle cannot be known simultaneously. For a time series signal like an EEG, this means the frequency (cycles/second) of a signal cannot be known at any one point in time.), we can establish a frequency band to represent what is occurring in the original signal during that interval (Polikar, 2001). Instead of analyzing the signal all at once (which yields no information about when a frequency occurs), we break up the signal into different “windows” and look at the frequencies in each, which then tells where (and thus when) frequencies are present. The window is shifted along the signal and the spectral components are established each time. The window size (scale) is changed and this process is repeated across the entire signal, each time picking up different ranges of frequencies (in this way it acts like a filter – this concept will be elaborated upon later in this section). The results from each of these separate windows thus can be put back together to recompose the original signal. The “generic” continuous wavelet (CWT) transform is as follows:

(Valens, 2004)

f(t) is the original signal, which is integrated over all time, but only after being multiplied by some wavelet function, (* is the complex conjugate) (Polikar, 2001). As one can see, this is a function of s and , which represent scale (the inverse of frequency) and translation, respectively. The integration acts as a summation, so if a lot of signal is “in sync” with the chosen wavelet (and set scale), the result of will be a high value (the more points that overlap, the larger the product between them). We will now accept as the “mother wavelet” (Valens, 2004, p. 5). Another way to think of this is the “prototype” from which all the other wavelets will be formed (Polikar, 2001, p. 3). Thus, if we take from the above equation simply to be a variation (due to it now taking into account s and ) of the mother wavelet and define it as , we will note it is only a matter of transforming by a scale ( s ) and translation () value to create as many wavelets (of the same shape, just different size) as desired (in order to draw out different frequencies at different points on the signal) (Valens, 2004). When s < 1, the wavelet is compressed, and when s > 1, it is dilated (think of how a sine curve acts as you change from sin(t) to sin(2t) to sin((1/2)t) for example). For clarification’s sake, is used as a way to “normalize the energy” so that when the values of s and are altered, it is not affected (Adeli et al., 2003). It is now clear why this equation is rather “generic” – the actual mother wavelet function is not specified ( just acts as a sort of “place holder” in the CWT function to represent some chosen wavelet yet to be determined). In fact, there exist many types of mother wavelets from which one can choose depending on the needs of the problem (db4 was specified for my epileptic case, as will be discussed in the Design/Procedure section). Each time the scale and position of the window is changed, the degree to which the new wavelet matches the shape of the actual signal is calculated, yielding what is known as the wavelet coefficient. On the plot, light colors represent high coefficients – dark, low. An example wavelet transform plot can be seen in Figure 1.

Figure 1: An arbitrary example wavelet plot (from epileptic patient)

Now for an elaboration on the concept of scale, s . The effect on the wavelet is the same that occurs with the sine function. Refer to Figure 2 and the function .

Figure 2: Effects of reducing the scaling factor, s , on a wavelet (The Mathworks/…/scaling)

The conclusion that can be drawn is when scale values are such that s < 1, the wavelet is compressed so that it becomes more sensitive to higher frequencies (more points overlap with high frequencies of the original signal). Likewise, when s > 1, the wavelet is dilated. Here, more low frequencies are picked up. This goes back to the idea of scale being the inverse of frequency – when the scale is high, it represents low frequencies, and when it is low, it represents high.

Entropy

In this case, entropy is modeled by the function where p is the probability density (Chaovalitwongse, Prokepyev et al., 2005).

Method

Participants/Materials

The EEG data was obtained from five normal and five epileptic patients. From each EEG, I had 17 channels of readout from scalp-level electrodes of various localities to work with (see Figure 3).

Design/Procedure

Each patient had varying amounts of EEG data available, the minimum being 17 minutes. Using this as the ceiling value, all patients were considered for this amount of time only. Additionally, one second of time corresponds to 250 EEG data points. Thus, 17 minutes of data are equivalent to 255,000 data points. Lastly, there was some setup time before the EEG began giving actual output, and thus the analysis skips the first 5,000 data points (20 seconds). The main analysis of this research utilized various toolboxes established in the Matlab computer application as described below. It should be noted that any artifacts in the data (coughing, blinking, etc., which affect scalp-level data significantly) were taken to be random among all patients. Given this, the data was not cleaned/filtered before analysis began.

Wavelet Transform. The first approach was to create wavelet plots for three randomly chosen channels from each patient. These channels were 1, 9 and 17 and translate to electrodes Fp1, P3 and T5 in Figure 3.

Figure 3: Placement of scalp electrodes

The purpose of this endeavor was to explore patterns within the frequencies of the EEGs, as wavelets give us information of the signal in terms of frequency and time (when the frequencies are occurring) (Polikar, 2001). The wavelet used was db4, or Daubechies wavelet of fourth order (Ismail & Asfour, 1999). I chose this wavelet because it had been used for analyzing chaotic time series data in previous research by Murguía and Campos-Cantón (2005), as well as by Adeli, Zhou, and Dadmehr (2003) in their exploration of epileptic EEGs using wavelets. Given the findings of Chaovalitwongse, Prokepyev et al. (2005) that supported the notion of the brain being a chaotic dynamical system, and the fact that EEGs are a form of time series data, this choice seemed well founded. Concrete support is seen as Adeli et al. (2003, p. 85) state specifically, “Daubechies order 4 wavelet was found to be the most appropriate for analysis of epileptic EEG data.”

Returning to the research procedure – with the aforementioned justification, the channels were analyzed from data points 5,000 to 255,000. In order for the wavelet plot to show patterns, relatively small segments of time were chosen (500 points, which is equivalent to 2 seconds). Additionally, in order to span the whole signal without having an overwhelming number of plots, I skipped 25,000 points (100 seconds) in between each. Thus, for example, the first plot I considered for each channel was from data points 5,000 to 5,500, the second from 30,000 to 30,500, etc., up to 230,000-230,500, which gave me ten plots for each channel (despite having originally set the ceiling at 255,000 points), or 30 plots for each patient (over the three channels). The y-axis of each plot is the scale. I chose to plot every other point on the scale from values of 2 to 400, as this was beneficial in terms of computing time as well as plot clarity. An example Matlab function used was c = cwt(cha1(5000:5500),2:2:400,‘db4’,‘plot’);, where cwt means “continuous wavelet transform,” the channel used was 1 with data points 5,000-5,500, a scale as described above, and the wavelet db4.

I was also interested in quantifying the wavelet plots so I could compare them numerically instead of only on an observational level. In order to accomplish this, I looked at the plots as a whole and decided that scale values of about 262-400 gave the most contrast information (provided the lighter areas of the plot). Since the scale is plotted as every other point, this translates to values of 131-200. I did not restrict the time axis. Thus, for the analysis, I loaded the channel of interest for a normal patient and ran it through the cwt as c = cwt(cha_(5000:5500),2:2:400,’db4’);. Now I had the wavelet information from data points 5,000-5,500 of the signal loaded in array c . I then created array a by restricting c as follows: a = c(131:200,:) (Matlab uses order (y,x), the colon alone means no restriction is placed on x). I then loaded the same channel for a random epileptic patient, and ran it through the same wavelet transform, and restricted it on the same basis. The mean of each was calculated and a t-test conducted in order to compare these values.

Entropy. Entropy was analyzed in five different ways. I will discuss only the significant results in the Results section.

Results

Wavelet Transform

Upon creating the aforementioned wavelet plots, they did not seem to reveal any concrete differences in patterns, but there did exist contrast variation. Overall, the normal patients’ plots seemed lighter than those of the epileptic (in the high scale (low frequency) portion of the plot (scale range of 262-400)). As discussed in the Methods section, I quantified various plots to see if what seemed to be occurring visually was actually taking place numerically. Of five randomly chosen patients/channels (disregarding the first two plots due to their irregularity in the normal patients as discussed below), three were significant. This was simply a small test sample, and obviously much more data would need to be collected in order to support the notion that these plots really do differ significantly and regularly.
Entropy

Entropy Overall (shannon). Shannon refers to a certain entropy function that I used in addition to the standard. Upon using a t-test to compare the average values from these two groups, I found the mean entropy value of the epileptic patients ( m = -2.976E+14) was significantly lower than that of the normal ( m = -1.017E+13), t (168) = -129.02, p < .001, as was predicted.

Without going into too much detail, I would like to note the range of values for the epileptic group was very wide and much more erractic than the normal. More on this in the Discussion section.

Each Channel Overall (entropy). Of the 17 channels, four were significantly different between the normal and epileptic groups: 9, 13, 16, 17 (which correspond to locations 9 = P3, 13 = F7, 16 = T4 and 17 = T5 from Figure 3). However, for 9 and 13, the normal patients experienced more entropy than the epileptic, whereas for 16 and 17, the opposite was true.

Discussion

Wavelet Transform

Since the difference between groups is seen at the higher scale values (low frequency), and the most important data about a signal is found within its lower frequencies, this could mean the normal and epileptic brains have fundamentally different EEG signals when both brains are operating in normal ways (free of seizures). It will be beneficial to quantify more wavelet coefficient plots in the future in order to obtain a large enough sample with which to draw any concrete conclusions.

Entropy

Entropy Overall (shannon). The significant results here are promising considering shannon entropy is that which is commonly used when analyzing bits of data for their similarity to one another (known as information theory/entropy, see Information entropy). However, it is unclear to me at this time how this analysis differs fundamentally from the other entropy function used, and why I did not come up with significant results for that analysis as well. The process was exactly the same, only the function changed. In this way, I would’ve expected significant results from both or neither, but this did not occur. It may be beneficial, then, to explore further the differences between these functions as a means of determining which is more appropriate for this study.

The fact that the shannon entropy values for the normal and epileptic groups were so different was quite interesting in and of itself. Again, these only showed up in this one analysis, which makes me wonder about their reliability and validity. If one interprets the jumping around of values in the epileptic patients to be an indication of instability within the brain (more entropy in some places than others), it contradicts the notion that the epileptic mind is in fact more ordered. However, it is possible these different values could give us the ability to localize seizure activity, which often times remains elusive for some epileptic patients. If some areas repeatedly seem to show more order than others, it is possible the seizures originate in this region. In this light, maybe not the entire epileptic mind that is more ordered, but rather just the locations imperative to the development of ictal events.

Each Channel Overall (entropy). The fact that two of the channels tell us the normal patients had higher entropy (9 = P3 and 13 = F7), and two tell us the opposite (16 = T4 and 17 = T5) , I am not able to draw any meaningful conclusions. The location of these electrodes also doesn’t yield much interpretive information. Both significant normal electrodes are on the left side of the brain, but one epileptic is on the right, one on the left. Additionally, while both of the epileptic electrodes are by the ears, one of the normal is toward the front of the brain (P3), while the other is toward the rear (F7). Again, no consistent results between the two groups are presented. However, this does not mean that possible consistency within the groups could not be studied further as a way, again, to localize seizure activity. As one will note, the methods for measuring entropy were quite diverse on many levels (this was discussed in the paper, not here, but some differences were the function used, breaking up the data into smaller segments vs. analyzing channels as a whole and sample size). It is for this reason that further clarification on which measurement methods are best will be required in order to understand better what the data can tell us.

Other Considerations

I will mention lastly some additional seemingly noteworthy approaches and issues. The first is the “cleanliness” of the data. As was stated previously, no artifacts (sneezing, etc.) were removed from the data prior to analysis, and were, in fact, considered to be randomized. In this instance, it does promote some problems since the sample size was relatively small. For this reason, it may be beneficial to employee various filtering methods to “de-noise” the signals before their analysis commences. Other options would be to obtain more data to work with, thus increasing the sample size and decreasing the effects of such artifacts. It also is possible to work with intracranial data, which is known to be cleaner (less susceptible to the activities of the patient). However, this data is not usually readily available from normal, healthy individuals. Given this study must have data with which to compare the epileptic to, intracranial doesn’t offer much help. Additionally, we eventually would like to develop a screening method that can be administered in a timely fashion with a quick visit to a doctor, and thus working with non-scalp data only sets us back in this approach.

Other approaches overall that exist are things such as trend analysis (long-term activity) and pattern recognition (other than wavelet). It seems feasible that either of these approaches could yield important information about EEG data, and thus could be utilized in future studies. Developing new functions that better model our specific needs could also prove to be beneficial.

These initial results give a good starting point that can be expanded upon in future analyses. However, obtaining more data, or designing parameters with which to use the data more effectively and efficiently will be important in establishing any sound conclusions.

Acknowledgements

This research was made possible through a partnership between Rutgers, The State University of New Jersey, and the National Science Foundation (NSF), which funds a program called Research Experience for Undergraduates (REU).

Additionally, Dr. Rajesh C. Sachdeo, director of the Comprehensive Epilepsy Center for St. Peter’s University Hospital in New Brunswick, NJ, provided the EEG data with which I conducted my analysis.

I would also like to thank my mentor at Rutgers University, Dr. W. Art Chaovalitwongse for his insight and guidance, as well as the faculty at my home institution, Winona State University, Winona, MN, for their inspiration and gracious support of my endeavors.

References

Adeli, H., Zhou, Z., & Dadmehr, N. (2003). Analysis of EEG records in an epileptic patient using wavelet transform. Journal of Neuroscience Methods, 123, 69-87.

Arneodo, A., D’Aubenton-Carafa, Y., Audit, B., Bacry, E., Muzy, J. F., & Thermes, C. (1998). What can we learn with wavelets about DNA sequences? Physica A, 249, 439-448.

Chaovalitwongse, W., Iasemidis, L. D., Pardalos, P. M., Carney, R. R., Shiau, D. –S., & Sackellares, J. C. (2005). Performance of a seizure warning algorithm based on the dynamics of intracranial EEG. Epilepsy Research, 64, 93-113.

Chaovalitwongse, W., Prokopyev, O. A., & Pardalos, P. M. (2005). Electroencephalogram (EEG) time series classification: Applications in epilepsy. Kluwer Academic Publishers, 1-31.

Chen, K., Baram, T. Z., & Soltesz, I. (1999). Febrile seizures in the developing brain result in persistent modification of neuronal excitability in limbic circuits. Nature Medicine, 5, 888 – 894. Retrieved July 15, 2006, from http://www.nature.com/nm/ journal/v5/n8/abs/nm0899_888.html).

Information entropy. (n.d.). Retrieved July 17, 2006 from http://en.wikipedia.org/wiki/ Shannon_entropy

Ismail, A. R., & Asfour, S. S. (1999). Discrete wavelet transform: A tool in smoothing kinematic data. Journal of Biomechanics, 32, 317-321. Retrieved July 15, 2006, from Science Direct database.

Murguía, J. S., & Campos-Cantón, E. (2005). Wavelet analysis of chaotic time series. Revista Mexicana de Física, 52, 155-162.

Polikar, R. (2001). The wavelet tutorial: The engineer’s ultimate guide to wavelet analysis. Retrieved June 18, 2006, from Rowan University, College of Engineering web servers: http://users.rowan.edu/~polikar/WAVELETS/WTtutorial.html

Saitz, R. (1998). Introduction to alcohol withdrawal. Alcohol Health & Research World, 22, 5-12.

The Mathworks: Documentation: Wavelet Toolbox: Scaling. (n.d.). Retrieved July 16, 2006, from http://www.mathworks.com/access/helpdesk/help/toolbox/wavelet/

The Mathworks: Documentation: Wavelet Toolbox: wentropy. (n.d.). Retrieved July 17, 2006 from http://www.mathworks.com/access/helpdesk/help/toolbox/wavelet/wentropy.html

Valens, C. (2004). A really friendly guide to wavelets. Retrieved June 23, 2006, from http://perso.orange.fr/polyvalens/clemens/clemens.html

Wornell, G. W., & Oppenheim, A. V. (1992). Wavelet-based representations for a class of self-similar signals with applications to fractal modulation. IEEE Transactions on Information Theory, 38, 785-800.