International Journal of Biomedical Imaging

Volume 2018, Article ID 5812872, 12 pages

https://doi.org/10.1155/2018/5812872

## An Automated Approach for Epilepsy Detection Based on Tunable* Q*-Wavelet and Firefly Feature Selection Algorithm

^{1}Department of Computer Science, Faculty of Computers and Information, El-Mansoura University, Egypt^{2}Deanship of Scientific Research, Umm Al-Qura University, Mecca, Saudi Arabia^{3}Department of Computer Science, University College of Umluj, Tabuk University, Saudi Arabia^{4}Department of Computer Science, Faculty of Computers and Information, El-Zagazig University, Egypt

Correspondence should be addressed to Ahmed I. Sharaf; moc.liamg@48.farahs.demha

Received 20 April 2018; Revised 18 August 2018; Accepted 27 August 2018; Published 10 September 2018

Academic Editor: A. K. Louis

Copyright © 2018 Ahmed I. Sharaf et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Detection of epileptic seizures using an electroencephalogram (EEG) signals is a challenging task that requires a high level of skilled neurophysiologists. Therefore, computer-aided detection provides an asset to the neurophysiologist in interpreting the EEG. This paper introduces a novel approach to recognize and classify the epileptic seizure and seizure-free EEG signals automatically by an intelligent computer-aided method. Moreover, the prediction of the preictal phase of the epilepsy is proposed to assist the neurophysiologist in the clinic. The proposed method presents two perspectives for the EEG signal processing to detect and classify the seizures and seizure-free signals. The first perspectives consider the EEG signal as a nonlinear time series. A tunable* Q*-wavelet is applied to decompose the signal into smaller segments called subbands. Then a chaotic, statistical, and power spectrum features sets are extracted from each subband. The second perspectives process the EEG signal as an image; hence the gray-level co-occurrence matrix is determined from the image to obtain the textures of contrast, correlation, energy, and homogeneity. Due to a large number of features obtained, a feature selection algorithm based on firefly optimization was applied. The firefly optimization reduces the original set of features and generates a reduced compact set. A random forest classifier is trained for the classification and prediction of the seizures and seizure-free signals. Afterward, a dataset from the University of Bonn, Germany, is used for benchmarking and evaluation. The proposed approach provided a significant result compared with other recent work regarding accuracy, recall, specificity, F-measure, and Matthew’s correlation coefficient.

#### 1. Introduction

Epilepsy is a chronic brain disease that affects people of all ages. According to the World Health Organization (WHO), approximately 65 million people suffer from this disorder [1], the majority of whom reside in developing countries and cannot obtain adequate medical treatment. Epilepsy doubles or triples the probability of sudden death when compared with that for healthy people [2]. Moreover, epileptic patients suffer from social stigma and discrimination in their communities. This stigma has a negative impact upon the quality of life of patients and their families. Therefore, the investigation of epilepsy detection techniques and antiepileptic drugs could increase the probability of those coping with this disease to live healthily without social stigmas.

Epilepsy is usually characterized by two or more unprovoked seizures, which affect the ictal person at any time. An elliptic seizure is defined as an excessive electrical discharge in an arbitrary portion of the brain. This rapid discharge causes a disturbance and abnormal behavior in the nervous system. An adequate clinical tool used to recognize epileptic seizures is the EEG signal analysis, as it measures the electrophysiological signals of the brain in real time and measures brain conditions efficiently [3]. However, EEG signal analysis has some limitations in detecting elliptic seizures because of epilepsy behavior such as the following:(1)The occurrence of some seizures is not always because of the epilepsy disorder, as approximately 10% of healthy people may suffer from one seizure in their lifetime. These nonepileptic seizures are similar to epileptic seizures, but they are not related to epilepsy [2]. Hence, the classification of both epileptic and nonepileptic seizures is further significant.(2)Although qualified professional neurologists can visually detect epileptic seizures from an EEG data sheet, it is still considered a time-consuming process.

The diagnostics of epilepsy are usually performed by manual inspections of the EEG signals which not an easy task and requires a highly skilled neurophysiologist. Also, the manual inspection of a long interval recording is a tedious and time-consuming process. Therefore, an intelligent clinical computer-aided design (CAD) tool that analyzes the EEG signal and detects the epileptic seizure is required.

Various case studies have reported the advantages of using automated methods to recognize epileptic seizures from EEG signals. Many techniques are commonly employed for automated EEG analysis and epilepsy detection. Most of these techniques consist of two stages: the first is concerned with feature extraction from the raw EEG signal; the other is dedicated to classifying the features [2]. The feature extraction process is concerned with obtaining significant information from the raw EEG data as well, as it could be implemented in the time, frequency, and time-frequency domains. The time domain and frequency domain are used for signal processing when the EEG is assumed to be a stationary signal. On the other hand, when the EEG signal is considered nonstationary [4, 5], then the time-frequency domain is employed. Case studies demonstrated that the time-frequency domain is more suitable for EEG signal analysis and could obtain significant results [2]. Many algorithms have been proposed for elliptic seizure detection within the time-frequency domain such as empirical mode decomposition (EMD) [6, 7] and wavelet transformation [8–10]. The EMD methods provided a leading trend to detect elliptic seizures from the EEG signal. The EMD has been combined with 2D and 3D phase space representation (PSR) features to identify elliptic seizures. Then, a least-squares support vector machine (LS-SVM) is used to perform the classification process [11]. A combination of different intrinsic mode functions (IMFs) is constructed as a set of features to utilize the classification problem [12]. The EMD has also been used to decompose an EEG signal into a collection of symmetric and band-limited signals. Then, a second-order difference plot (SODP) is applied to obtain an elliptical area. The area under this shape with 95% confidence is used as a selection measure fed to an artificial neural network (ANN) to determine the seizures and seizure-free signals [6]. Although the EMD methods proved their effectiveness, these methods suffer from the mode-mixing problem, which produces intermediate signals and noise. Local Binary Pattern (LBP) based methods represents a different approach of the epilepsy detection. The work presented by [13] suggested a feature extraction based on one dimensional LBP to classify the epileptic seizure, seizure-free, and the healthy classes from the EEG signal. In [14], the researchers have implemented a technique based on the combination of the LBP and the Gabor filter of the EEG signals. Then, the k-nearest neighbor classifier was used for the classification of epileptic seizures and seizure-free signals. The wavelet transformation is usually employed with nonlinear measures to recognize seizures and seizure-free patients from raw EEG signals. An automatic epilepsy detection approach proposed by [15] used the discrete wavelet transformation (DWT) for signal decomposition and generated a feature set using improved correlation-based feature selection (ICFS). Then, the random forest classifier is applied for classification. The DWT has been used with many nonlinear features, and the effectiveness of this approach has been proved [16–23]. Although wavelet transformation is an effective method for EEG signal analysis, this transformation has some limitations [24]. The selection of an appropriate wavelet bias is vital in the time-frequency signal analysis.

A flexible wavelet transformation proposed by [25], namely, tunable* Q*-wavelet transformation (TQWT), controls the transformation of a discrete time signal by an easily tunable variable called the* Q*-factor. The TQWT solved the primary limits of the wavelet filter banks by providing a tunable* Q*-factor that controls the number of the oscillations of the wavelet transformation. Moreover, the TQWT decreased the search space of filter banks by providing three variables only for adjusting. Also, many researchers applied TQWT for physiological signal analysis and proved its effectiveness [21, 22, 26, 27]. However, the after-mentioned methods provided a static set of features (e.g., statistical, nonlinear, and spectral) and did not discuss the adaptive behavior of these features as a dynamical system.

In this paper, an intelligent computer-aided design (CAD) tool that analyses the EEG signal and classifies the epileptic seizure and the seizure-free signal from the input EEG. That provides an asset to the neurophysiologist in interpreting the EEG and reduces the diagnostics time. The proposed method is based on data fusion of a single-channel EEG signal and an image processing approach. In the single-channel EEG signal, the EEG data are processed as a time-frequency time series. The signal is divided into smaller segments of data using tunable Q-wavelet. Some statistical features are extracted from this time series in the time domain and frequency domain. On the other hand, an image processing technique extracts the significant texture from the medical image. Thus, the gray-level co-occurrence matrix is applied to the image, and the contrast, correlation, energy, and homogeneity are extracted. The data fusion approach is used to combine these features of the input EEG signal and construct a large dataset for each patient. Because of a large number of the extracted features, a feature reduction algorithm is needed to reduce the processing time by obtaining a compact subset of features instead of the original one. Moreover, the feature reduction algorithm selects the relevant features, removes redundant features, and discovers the dependency among these features. Therefore, the firefly algorithm is used to find the optimal subset of features. Consequently, bootstraps are obtained by resampling the compact subset to train the random forest classifier. The final decision is obtained by performing a vote for each decision tree of the forest. Hence, the classification of seizure and seizure-free is obtained. A real-world dataset from the University of Bonn is used for benchmarking and validation of the proposed method. A numerical experiment has been implemented, and a comparative study presented a promising efficiency of the proposed system regarding the overall accuracy, sensitivity, and specificity.

The remainder of this manuscript is organized as follows: the preliminaries concepts were introduced in Section 2. Section 3 introduced the combinational hybrid system of the epilepsy detection. The experiment and discussion were presented in Section 4. Lastly, the paper was concluded in Section 5.

#### 2. Preliminary Knowledge

##### 2.1. Tunable Q-Wavelet Transformation (TQWT)

The tunability of the* Q*-factor provided a proficient method to adopt the wavelet transformation [25]. The TQWT have three inputs:* Q*-factor denoted by , which determines the number of oscillations of the wavelet; the number of the oversampling rate, which is denoted by and which determines the number of the overlapping frequency responses; and the number of stages of decomposition, denoted by . For each decomposition stage, the target signal with a sample rate of could be represented by low-pass and high-pass subbands with sampling frequencies of and , respectively, where and are the parameters of signal scaling. The low-pass subband is presented by low-pass filter and low-pass scaling . Similarly, the high-pass subband is produced by and . The low-pass and high-pass subband signals are formulated as follows: where could be defined as follows: Both of and could be represented as filter-bank variables and as follows:

##### 2.2. Feature Sets

The feature sets used in this research are grouped into four main groups which are statistical, power spectrum, chaotic features, and gray-level co-occurrence matrix (GLCM). The first group contains a set of five features calculated from the time domain of the input signal. This feature set contains mean , standard deviation , variance , Shannon entropy , and approximate entropy . The mathematical formulation of each feature is shown as follows [28–31]: The second set of features calculates the power spectrum of the input signal based on the frequency domain analysis. This feature set contains spectral centroid , spectral speed , spectral flatness , spectral slope , and spectral entropy , where denotes the for the discrete Fourier transformation of the input signal . The mathematical formulation of each feature is shown as follows [32]: The third set of features contains chaotic measures to obtain the dynamic behavior of the EEG signal. This set includes Higuchi’s fractal dimension , Hurst exponent , and Katz fractal exponent . These features are formulated as follows [33–36]: The final set of features consists of statistical measures of an image represented as matrices called gray-level co-occurrence matrix (GLCM) where represents an entry in co-occurrence matrix and , where is the number of gray levels in the image. Those matrices represent the spatial dependencies between the gray levels of image reflecting the structure of the underlying texture. After the normalization of these matrices, the contrast, correlation, energy, and homogeneity are computed as follows:

##### 2.3. Firefly Optimization Algorithm

The firefly algorithm is a swarm based stochastic search technique [37]. The firefly optimization algorithm consists of a set of members called fireflies; each firefly represents a candidate solution. The most attractive firefly is considered to be the leader firefly that leads the other candidates to the best region. The attractiveness is calculated based on the light intensity which is usually determined by the objective fitness function. The attractiveness between two fireflies and is determined as follows: where denotes the problem dimension such that , denotes the distance between and . Parameter denotes the initial attractiveness at and denotes the light absorption factor such that . Each firefly is compared with the other fireflies where such that and denotes the count of the fireflies. If firefly is better (brighter) than , then firefly moves towards with a step movement formulated as follows: where represents uniform a randomly distributed variable such that and denotes the movement step such that .

#### 3. The Combinational Hybrid System of Epilepsy Detection from EEG Signal

In this research, a hybrid system was proposed to detect both seizures and seizure-free conditions from a raw EEG signal. Although some investigations focused on the feature extraction level, the proposed system was established based on four main levels. This system combined the data fusion approach with firefly optimization and random forest. The was applied for EEG signal decomposition; then the features were constructed using a data fusion technique. Due to the large number of features obtained for each subband (), a feature reduction was applied to reduce the features and to obtain a compact set of features instead of the original one. The obtained compact set of features was fed to a random forest algorithm to obtain the classification rules and hence used for training. After training, the classifier should be able to classify and estimate the preictal phase. The proposed system was divided into the following four levels of processing and then described in detail as shown in Figure 1.(i)EEG decomposition using TQWT(ii)Feature extraction using data fusion based on single-channel EEG signal and co-occurrence matrix(iii)Feature reduction using firefly optimization algorithm(iv)Training of random forest classifier to detect the seizures and seizure-free EEGs