• 沒有找到結果。

Chapter 3 Methods

3.4 Wavelet Transformation

Wavelet transformation was developed to overcome the shortcomings of Fourier Transformation (FT). In general, FT only provides frequency information and not location information. This means that signal transformed using FT is susceptible to Heisenberg’s Uncertainty principle; information about the frequencies present in a signal could be obtained, but not where and when the occurrences took place. Wavelet Transform (WT) transforms signals in the time domain to a joint time-frequency domain.

This allows the capture of both frequency and location information which is useful in analyzing continuous signals such as EEG, EKG, and other bio signals. For the detection of spike waves in epilepsy analysis this is a very useful feature. It allows us to pinpoint the exact locale of epileptic spike occurrence.

Each discrete wavelet transformation operation takes input signal and decomposes the signal into low and high frequencies by passing the signal through a low-pass filter and high-pass filter convoluting with impulse response G. Filter masks vary depending on the purpose of application. The result of the operation yields two decomposed signals;

high frequency signal and low frequency signal. The transform of a signal x (length n) with filters g (high-pass filter) and h (low-pass filter) is shown in Equations 1 and 2.

The decomposition process halves the time resolution and removes half the frequencies of the signal, and therefore, according to Nyquist’s rule, half the samples can be discarded. The subsampling operator is used after each decomposition process. Since each decomposition process halves the signal sample size, the input signal must be a multiple of 2n where n is the number of levels. To further obtain lower frequency signal,

the low frequency output signal is used as input for next level of discrete wavelet transformation.

𝑌𝑙𝑙𝑙[𝑛] = �𝑘=−∞𝑥[𝑘]𝑔[2𝑛 − 𝑘] (1)

𝑌ℎ𝑖𝑖ℎ[𝑛] = �𝑘=−∞𝑥[𝑘]ℎ[2𝑛 − 𝑘] (2)

Our research EEG data are sampled at 200Hz discretely. We take 2 seconds of EEG signals as one epoch which translates to 400 samples per epoch. It is possible to increase the longitude of sample epoch. We choose to use 2-second intervals to comply with the sampling requirement for 4-level decomposition process. Discrete wavelet transformation was used to decompose the signals into the five primary EEG sub bands.

In practice, cascaded decomposition scheme with frequency reduced by half with each stage of decomposition is used to sequentially decompose the original signal, as shown in Figure 4. We decompose the signal four times to obtain the five major EEG sub-bands. Figure 5 shows an example of decomposed signal sample into the wanted sub-bands using Daubechies filter.

Figure 4 Wavelet Decomposition Scheme for EEG Signals

Figure 5 The decomposition results using the Daubechies filter

The input signal for wavelet transformation has been filtered to contain only frequencies below 60Hz. The decomposed bands D1, D2, D3, D4, and A4, have frequencies ranging from 30-60, 15-30, 8-15, 4-8, and 0-4Hz, respectively. These frequency ranges are the five primary EEG sub-bands that researchers use. The results D1, D2, D3, D4, and A4 are the Gamma, Beta, Alpha, Theta, and Delta sub-bands.

3.5 Feature Extraction

Once the five primary EEG sub-bands are obtained, we extract features from each of them. After consulting with Dr. Chiu of National Taiwan University Hospital’s Neurology Department we devised series of features which doctors consider physiologically meaningful for the classification of epileptic waveforms. The goal of this research is to be able to distinguish between three classes of waveforms; normal, seizure, and spike. Ultimately, the aim is to be able to forecast seizure events. According to Dr. Chiu, the occurrences of spike events might shed light on understanding seizure

more in depth and may even be used to predict seizure events. So the focus for this research is to increase spike recognition rate. With this in mind, together with the help of Dr. Chiu, we designed features specifically targeting at increase of spike recognition rate. Some of standard statistical features are also used. The following section discusses the two features we use that we believe have the most impact on spike detection.

3.5.1 Approximate Entropy (ApEn)

In analyzing the regularity of time-series data, approximate entropy (ApEn) is often used. ApEn was initially developed for analyzing medical data such as heart rate and endocrine secretion. ApEn quantifies the regularity and predictability of time-series data. We believe this is the key to effectively distinguish between different EEG patterns, especially seizure. Seizure is defined as a transient symptom of "abnormal excessive or synchronous neuronal activity in the brain". The synchronicity of neuronal activity should be distinguishable from normal activity using ApEn. The calculation of ApEn process is listed in equations (3) to (5) with a signal S (finite length N) was performed by following step 1 through step 6. The parameter m represents the length of the sampling window, which was the dimension of the vector to be shifted, and r is the value of the threshold representing the noise filter level chosen in the range 0.1 to 0.9.

Large ApEn values imply irregularity of a data sequence, whereas small values imply regularity. The section below describes the process of calculating ApEn for a vector of data sequence:

(1) S = [x(1), x(2), …, x(N)] is the vector of data sequence.

(2) x*(i) is a subsequence of S such that x*(i) = [x(i), x(i+1), …, x(i+m-1) ] for 1

i N – m + 1.

(3) Let r = k × SD for k = 0.1 to 0.9, where SD is the standard deviation of S.

(4) For each 1x*( )i , x*( )jN− +m 1, i ≠ j, d [ ] is the Euclidean distance

Finally, the ApEn is defined as follows:

( ) 1( )

m m

ApEn= Φ r − Φ + r (5)

3.5.2 Total Variation

In mathematics, total variation can have meanings and interpretations depending on usage. Total variation is used mainly in de-noising image, and differential equation analysis. The concept of total variation for a real-valued continuous function can be viewed as an integral involving the function on a defined domain. For complex measures total variation has different definition. Equation 6 shows the definition of total variation for single-measure (real values) functions.

𝑉𝑏𝑎(𝑓) = ∫ |𝑓′(𝑥)|𝑑𝑥𝑎𝑏 (6)

The definition of total variation can be interpreted as the sum of “acceleration” of a given function. A large value of total variation implies faster value fluctuation of values over the defined interval, and vice versa. After examining real examples of different EEG activities, we believe that total variation could be used as an indicator for spike detection.

3.5.3 Feature Extraction Summary

Aside from ApEn and total variation, we also included three other commonly used features for the analysis of bio signals, namely, energy, skewness, and standard deviation. Skewness measures the asymmetry of a distribution, energy measures the total energy displacement of neurons, and standard deviation measures the dispersion variation of the EEG waves. Each 2-second epoch consists of signals from all 16 channels. One of our main focuses is to study the effectiveness of using bipolar montage in the detection of epileptic waveforms. Therefore, 16 bipolar montage signals are calculated using the 16 unipolar montage signal values. The 4-stage wavelet transformation decomposes the filtered signal into 8 sub frequency ranges, among them are the five primary EEG sub-bands. The 8 decomposed signal parts go through the feature extraction process. Entropy, total variation, standard deviation, skewness, and energy are the five feature types that can be extracted from each decomposed signal.

Then each feature type extracted from each channel’s decomposition bands are taken for calculation of statistical features; sum, max, min, and average. The statistical features of different feature types might help us distinguish different epileptic states. If there is any abnormal activity across all EEG sub-bands, then the statistical features might magnify the anomaly.

Since bipolar EEG shows the potential difference in neighboring electrodes. A clinically defined spike is more clearly shown to neurologists under bipolar EEG montage. Therefore, theoretically, it is possible to use bipolar EEG montage directly without using wavelet transform for detection of spike waves. We test this hypothesis by also directly extracting features from bipolar EEG signal values. Table 1 summarizes all the possible features our system can extract from a 2-second EEG epoch. In total 1700

features can be extracted. We choose all or a subset of these features for experiment which is discussed in detail in the experiment design section.

Table 1 Feature Extraction Summary Feature

Entropy Skewness Energy

Unipolar Montage

Classification of instances can be done very accurately if there exist enough differences in some feature between classes. Often we do not know the degree of difference that exist across different classes in different features. The fisher score ranks the difference rate of the feature between different classes. It can determine the most relevant features for classification. This is done using discriminative methods and generative statistical models. Fisher score uses the fisher function to rank the feature value and sets the importance of the features. Features are iteratively tested to achieve high accuracy.

For example, assume that there are n training samples for a class, and each training

相關文件