Using CWT-Entropy Based Method
Hemalatha R J†
Department of Biomedical Engineering, Sathyabama University, Chennai.600 119, India.
Hari Krishnan G
Department of Biomedical Engineering, Sathyabama University, Chennai.600 119, India.
Mohandass G*
Department of Biomedical Engineering, Sathyabama University, Chennai.600 119, India.
Umashankar.G
Department of Biomedical Engineering, Sathyabama University, Chennai.600 119, India.
Abstract:
A novel analysis method for epileptic seizure prediction from scalp EEG data is described in this work. The method is based on the notion that, the moment a seizure begins there is a rapid transition from chaos to order which begins even before the onset of a seizure. The measurement of degree of chaos over time will provide the seizure susceptible period and brain vulnerability to seizure. We used Db4 wavelet transform as it provides a good platform for analyzing the significance in time frequency domain. To facilitate numerical comparison on degree of order during seizure we make use of Shannon entropy.
Keywords: EEG, Shannon entropy, Epilepsy & CWT
1. Introduction:
Around the world more than 60 million people are affected by epilepsy, which is the second most common chronic neurological disorder [1, 2]. Epilepsy is associated with seizures, which results from sudden disturbance of brain function. These disturbances occur due to abnormal discharges of cortical neurons recruiting neighboring cells into a critical mass [2]. In early 40s Neuro-scientists have found that the epileptic seizure is unpredictable, and they occurred abruptly, just few seconds before the clinical attacks [3]. Now a days evidences shows that seizures develop minutes or even hours before clinical onset [4].
Nowadays scalp EEG, intra-cranial recordings as well as MRI of patients can offer the most precise access to the location of the foci [5].automatic diagnosis of epileptic seizures using EEG has been the goal of several studies [7-10]. Although proposed seizure detection algorithms are not able to recognize most epileptic seizures in real time with high sensitivity and high specificity [6].
2. Methods:
According to Fourier theory, any signal can be expressed as a sum of infinite series of sines and cosines [9]. In signal processing it is given by the equation
∞
X (f) = ∫-∞ x (t) e -i2πft dt (1)
Where, the independent variable t represents time (with SI unit of seconds), the transform variable f represents ordinary frequency (in hertz). With this, only the frequency resolution of the signal is obtained and the time resolution is completely lost [11]. This is one of the prime reasons why Fourier transforms are not preferred for the analysis of non-stationary signals when the time localization of the spectral components is needed.
2.1. Wavelet transforms:
This linear time-frequency transform is a suitable analytical tool in pattern recognition and signal processing especially in the analysis of transient and non-stationary phenomena [9, 10]. Therefore, it has been widely used in bio medical signal processing [6, 8, and 11]. Wavelets are designed to give good time resolution and poor frequency resolution at high frequencies and good frequency resolution and poor time resolution at low frequencies.
2.1.1. Continuous Wavelet Transform (CWT):
CWT is a very powerful tool for signal analysis especially for non-stationary signals such as EEG, ECG or EMG. We have applied CWT daubechies wavelet in analyzing brain function and sleep stage diagnosis [12]. The wavelet function is multiplied with the signal and the transform is calculated for different segments of the time domain signal.
Γ(s,τ) = ∫ f(t) ψ *
S,T (t) dt (2)
Ψ S, T (t) = 1/√s ψ (t-τ/s) (3)
From this equation, we can see that, the transformed signal is a function of two variables tau (translation) and s (scale) parameters. psi(t) is the transforming function, and it is called the mother wavelet as it is used as a prototype for generating the other window functions. The wavelet function is of finite length and is oscillatory in nature.
The mother wavelet is chosen to serve as a prototype for all windows in the process. All the windows used here are the dilated (or compressed) and shifted versions of the mother wavelet. The computation starts from s=1 once the mother wavelet is chosen and the CWT is calculated for increasing and decreasing values of s. The most compressed wavelet will be the first value of s. As the value of s is increased, the wavelet will dilate. The wavelet is initially placed at the beginning of the signal which corresponds to time=0. The wavelet function at scale "1'' is multiplied by the signal and then integrated over all times. If the signal has a spectral component that corresponds to the current value of s, the product of the wavelet with the signal at that location gives a relatively large value. If the spectral component that corresponds to the current value of sis not present in the signal, the product value will be either zero or relatively less. The result of the integration is energy normalized, so that the transformed signal will have the same energy at every scale
Fig.1 Normal Time and Frequency domain plot
Fig.2. The EEG waveform is represented in Time and Frequency domain.
The Fig.1 shows an epileptic segment with its characteristic spikes. The Fig.2 is its Fourier Transform. It is clear from the plot that all the information related to time is completely lost due to which we can find what frequency is present and not when.
The final result is the value of the transformation, i.e., the value of the continuous wavelet transform at time zero and scale s=1. The wavelet at scale s=1 is then shifted towards the right by tau amount to the location t=tau, and the above equation is computed to get the transform value at t=tau, s=1 in the time-frequency plane. This procedure is repeated until the end of the signal after which the value of s in incremented. Every computation for a given value of s fills the corresponding single row of the time-scale plane. The CWT of the signal has been calculated when the process is completed for all desired values of s.
2.2. Shannon Entropy:
Epileptic seizures can be interpreted as manifestations of the brain transitions from chaos to order [13]. The dynamic changes can be characterized by monitoring the irregularity level of EEG [3]. The Fig. 3 shows the entropy waveform for positive zero-crossing intervals of the EEG signals. The probability density function (PDF) of positive zero-crossing intervals for the nth epoch in the EEG signal and its two derivatives are estimated. Then, the differential entropy of each PDF is calculated by
h(X) = -∮∞∞ ( ) log ( ) (4)
Fig. 3.The entropy waveform for positive zero-crossing intervals of the EEG signals (a) Inter-ictal period, (b) Several minutes before the seizure onset
We make use of Shannon entropy to compare the EEG of epileptic segments with the normal segments (numerically) in addition to the scalogram obtained. [16, 17]. There is a rapid transition from the chaos to order which begins even before the onset of a seizure. We would be able to identify seizure susceptible periods if we can measure the degree of chaos over time. And we can issue warnings as to when the brain becomes vulnerable to a seizure.
3. Results and Discussion:
The graphs shown below compare the difference in plots between a normal and epileptic segment when we apply wavelet transform to the data. In addition to that, the basis of randomness is compared numerically with the help of Shannon Entropy.
Fig.4 Normal EEG 2D Scalogram
Fig.5 In this graph, x axis represents the time and y axis represents the scale. Frequency can be calculated by the formula: Frequency = (5 / (2 * pi * scale). The amplitude is further represented by a color contrast which can indicate which frequency band is dominant at a particular instant of time.
3.1 Epileptic 3D scalogram
Clearly, this negates one of the main drawbacks of Fourier Transform which is the loss of information pertaining to time.
Fig.7 This graph aids in better visualization of the various frequency components present in the data. This being an epileptic segment, we can see the presence of high frequency components in addition to the lower frequencies.
The range of entropy values for epileptic segments was from -1.3568e+010 to -6.2167e+011. The mean entropy value of normal segments is -4.89E+09 and that of epileptic segments is -9.93E+10. The mean epileptic value varies considerably from the normal value agreeing with the fact that the moment a seizure begins there is a rapid transition within the epileptic brain from chaos to order which begins even before the onset of a seizure.
4. Conclusion:
In this work, we have proposed seizure prediction using surface EEG by wavelet and entropy based techniques. Using wavelet-based method, from the 2D and 3D scalograms we were able to find, the presence of high frequency spikes in the epileptic segment.
The wavelet used was db4 or Daubechies wavelet of fourth order. We chose this wavelet for computing the transform as previous studies show that db4 wavelet was best suited to analyze chaotic time series data.
In entropy-based approach by calculating the PDFs of the positive zero-crossing intervals in the EEG signal and its first and second derivatives, we were able to identify significant drops in the entropy of these distributions several minutes before the onset of seizure.
Evidently, the above graphs give a clear visual indication as to the difference between epileptic and normal segments however it is not practically possible to plot graphs for the entire length of the data. Hence in a bid to compare the data numerically we use Shannon Entropy.
References:
[1] A. Shahidi Zandi, G. A. Dumont, M. Javidan, R. Tafreshi, B. A.MacLeod, C. R. Ries, and E. Puil, “A novel wavelet-based index to
detect epileptic seizures using scalp EEG signals,” in 30th Annual International IEEE EMBS Conference, Aug. 2008, pp. 919–922.
[2] H. Witte, L. D. Iasemidis, and B. Litt, “Special issue on epileptic seizure prediction,” IEEE Transactions on Biomedical
Engineering,vol. 50, pp. 537–539, 2003.
[3] A. Lazo and P. Rathie, “On the entropy of continuous probability distributions,” IEEE Transactions on Information Theory, vol. 24,no.
1, pp. 120–122, 1978
[4] Durka, P. J., From wavelets to adaptive approximations: Time–frequency parameterization of EEG. Biomed. Eng. Online. 2:1– 30,2003.
[5] J. Gotman, “Automatic recognition of epileptic seizures in the EEG,” Electroencephalography and Clinical Neurophysiology, vol.
54,pp. 530–540, 1982
[6] Srinivasa, V., Eswaran, C., and Sriraam, N., Approximate entropybased epileptic EEG detection using artificial neural networks.IEEE Trans. Inf. Technol. Biomed. 11 (3)288–295, 2007.
[9] Osorio, M. G. Frei, and S. B. Wilkinson, “Real-time automated detection and quantitative analysis of seizures and short-term prediction of clinical onset,” Epilepsia, vol. 39, pp. 615–627, 1998.
[10] A. J. Gabor, “Seizure detection using a self-organizing neural network:validation and comparison with other detection strategies,”
Electroencephalography and Clinical Neurophysiology, vol. 107, pp. 27–32,1998.
[11] Y. U. Khan and J. Gotman, “Wavelet based automatic seizure detection in intracerebral electroencephalogram,” Clinical
Neurophysiology,vol. 114, pp. 898–908, 2003.
[12] L lasemidis, Epileptic Seizure Prediction and Control. IEEE Transaction on Biomedical Engineering, vol.50(5), pp. 549-558, 2003.
[13] B. Litt, R. Esteller, J. Echauz et al, "Epileptic seizures may begin hours in advance of clinical onset,"Neuron, vol.30(1), pp. 51-64, 2001.
[14] S. Sabesan, N. Chakravarthy, K. Tsakalis, P. Pardalos, and L. Iasemidis, “Measuring resetting of brain dynamics at epileptic Seizures:
application of global optimization and spatial synchronization techniques,” Journal of Combinatorial Optimization, vol. 17, no. 1, pp.74–97, 2009.
[15] C. S. Burrus, R. A. Gopinath, and H. Guo, Introduction to wavelets and wavelet transforms: A primer. Prentice-Hall, Upper Saddle
River,NJ, 1998.
[16] S. Mallat, A wavelet tour of signal processing. Academic Press, 1999.[11] A. S. Zandi and M. H. Moradi, “Quantitative evaluation of
a wavelet based method in ventricular late potential detection,” Pattern Recognition,vol. 39, pp. 1369–1379, 2006.