Sleep Stage Classiﬁcation Using EEG Signal Analysis: A Comprehensive Survey and New Investigation

: Sleep specialists often conduct manual sleep stage scoring by visually inspecting the patient’s neurophysiological signals collected at sleep labs. This is, generally, a very difﬁcult, tedious and time-consuming task. The limitations of manual sleep stage scoring have escalated the demand for developing Automatic Sleep Stage Classiﬁcation (ASSC) systems. Sleep stage classiﬁcation refers to identifying the various stages of sleep and is a critical step in an effort to assist physicians in the diagnosis and treatment of related sleep disorders. The aim of this paper is to survey the progress and challenges in various existing Electroencephalogram (EEG) signal-based methods used for sleep stage identiﬁcation at each phase; including pre-processing, feature extraction and classiﬁcation; in an attempt to ﬁnd the research gaps and possibly introduce a reasonable solution. Many of the prior and current related studies use multiple EEG channels, and are based on 30 s or 20 s epoch lengths which affect the feasibility and speed of ASSC for real-time applications. Thus, in this paper, we also present a novel and efﬁcient technique that can be implemented in an embedded hardware device to identify sleep stages using new statistical features applied to 10 s epochs of single-channel EEG signals. In this study, the PhysioNet Sleep European Data Format (EDF) Database was used. The proposed methodology achieves an average classiﬁcation sensitivity, speciﬁcity and accuracy of 89.06%, 98.61% and 93.13%, respectively, when the decision tree classiﬁer is applied. Finally, our new method is compared with those in recently published studies, which reiterates the high classiﬁcation accuracy performance.


Background and Motivation
Sleep is the primary function of the brain and plays an essential role in an individual's performance, learning ability and physical movement [1][2][3][4][5][6][7][8][9].Sleep is a reversible state in which the eyes are closed and several nervous system centers are inactive.Hence, sleep renders the individual either partially or completely unconscious and makes the brain a less complicated network [10][11][12][13].Humans spend around one-third of their lives sleeping and conditions such as insomnia and Obstructive Sleep Apnea (OSA) are frequent and can severely affect physical health [14][15][16][17].According to a survey, 50-70 million people suffer from sleep disorders in the United States [18,19].In addition, according to [6,20], more than 90% of depressive disorder patients In addition, nonlinear parameters and complexity measures have been used successfully [14,48,55].In some ASSC systems, feature selection and/or dimensionality reduction is performed prior to the classification stage [9, 45,47].The purpose of this component is to reduce the number of features and to generate low-dimensional features that are derived from the input features.A wide range of machine learning-based methods such as Linear Discriminant Analysis (LDA) [50,56], Artificial Neural Networks (ANN) [57,58], Support Vector Machine (SVM) [4,34,53], K-Nearest Neighbor (KNN) [32,37] and Decision Trees (DT) [15,17,43] have been proposed for classification problems, which have also been widely used for sleep stage classification.
Most of the previous ASSC approaches may not have gained full consideration or acceptance from sleep physicians because of the concerns associated with the accuracy, sensitivity and specificity of these systems.The classification accuracies vary largely among the ASSC methods reported in the literature, ranging from 70% to 94%, and the sensitivity and specificity remain lower than 90%.However, several real challenges such as suitable and efficient sleep feature extraction methods, improved classification algorithms and portability for convenient long-term, home based monitoring and remain partially unsolved for these systems.In addition, many techniques involve multifaceted methodologies or mathematical procedures and bring about long computational times, poor generalization and poor suitability, which are not feasible for hardware implementation in real-time systems such as driver fatigue and drowsiness detection systems.Moreover, some studies require multiple EEG channels or EEG associated with other PSG recording methods, such as ECG and EMG, which can be uncomfortable for subjects and affect the system's suitability.Although some studies on ASSC have considered using a single EEG channel, some epoch ambiguity problems remain unsolved.For example, the characteristics of the EEG signal in S1 and REM stages are very similar [17,42,59], which has resulted in a low classification performance.

Contribution and Paper Organization
This paper summarizes the variety of methods that have been used for ASSC and the detection of sleep stages and relevant sleep disorders using EEG signals.Specifically, this paper provides an overview of the processing techniques taxonomy required for the analysis of sleep stages, which includes pre-processing, feature extraction, feature selection, dimensionality reduction and classification.The aim of providing this overview is to identify the signal processing methods utilized in different ASSC systems and to present guidelines for selecting the appropriate techniques that can also serve as a general reference for sleep researchers.In addition, this article proposes an interesting automatic method for sleep stage classification using single-channel EEG.The work focuses on an easy, fast and efficient technique that can be implemented into hardware to differentiate sleep stages.The proposed approach will enable physicians to identify certain patterns in sleep, such as fatigue, drowsiness and sleep disorders (e.g., apnea, insomnia and narcolepsy).A key feature of this proposed methodology is the choice of filtering techniques with regards to decomposing the 10 s EEG signal into various sub-bands and developing new time-domain features with less computational time for the purpose of classification.First, Butterworth band-pass filters are designed to breakdown the EEG signal into five frequency sub-bands: delta, theta, alpha and beta and gamma waves.Then, the characteristic parameters of the filtered EEG signal are measured based on two new statistical features namely EnergySis and Maximum-Minimum Distance generated for each 10 s EEG epoch.Finally, the sleep stage classification is performed using the most commonly used machine-learning based classifiers in literature, namely multiclass SVM, DT, NN (Nearest Neighbor), KNN, Naive Bayes (NB) and LDA.The proposed methodology achieves an average classification sensitivity, specificity and accuracy of 89.06%, 98.61% and 93.13% respectively, when the DT classifier is applied.As for the remainder of this paper, Section 2 gives a brief description of the general ASSC structure and EEG signals.Section 3 presents a literature review of ASSC.Section 4 elaborates on the proposed method and procedures.Section 5 discuses briefly the prepossessing techniques employed in ASSC schemes.Experimental results of this work are described in Section 6.Finally, the concluding remarks are given in Section 7.

General Structure of ASSC
The general ASSC system usually includes three main phases: pre-processing, feature extraction and classification.Its aim is to translate sleep activity into meaningful information through a series of well-designed components.To illustrate this, initially the user's brain activity is recorded to generate the polysomnographic signals that are used to evaluate the ASSC scheme.After the data is recorded, they undergo a pre-processing phase including filtering and artifact rejection to enhance the PSG signal.Then, the resultant signals are transformed through a feature extraction to derive informative attributes that are used in the classification stage.In some ASSC systems, feature selection and/or dimensionality reduction is performed prior to the classification stage to reduce the number of features, or generate new low-dimensional features that are derived from the input features.Examples can be found in [9, 41,51,60].Finally, the extracted attributes are passed to one or more classifiers to categorize human sleep stages.

Electroencephalogram
The human brain is considered a complex dynamic system that consists of millions of neurons interconnected by axons and dendrites [61][62][63].These neurons are responsible for communicating information to and from the brain.Figure 1 shows the general structure of a neuron.The general ASSC system usually includes three main phases: pre-processing, feature extraction and classification.Its aim is to translate sleep activity into meaningful information through a series of well-designed components.To illustrate this, initially the user's brain activity is recorded to generate the polysomnographic signals that are used to evaluate the ASSC scheme.After the data is recorded, they undergo a pre-processing phase including filtering and artifact rejection to enhance the PSG signal.Then, the resultant signals are transformed through a feature extraction to derive informative attributes that are used in the classification stage.In some ASSC systems, feature selection and/or dimensionality reduction is performed prior to the classification stage to reduce the number of features, or generate new low-dimensional features that are derived from the input features.Examples can be found in [9, 41,51,60].Finally, the extracted attributes are passed to one or more classifiers to categorize human sleep stages.

Electroencephalogram
The human brain is considered a complex dynamic system that consists of millions of neurons interconnected by axons and dendrites [61][62][63].These neurons are responsible for communicating information to and from the brain.Figure 1 shows the general structure of a neuron.According to [65], the brain can be divided anatomically into three primary structures: The cerebrum, cerebellum and brain stem (Figure 2a).The cerebrum, which is the largest of these three parts, is divided into two hemispheres that have an outer surface called the cerebral cortex.The cerebral cortex is organized into four lobes: the frontal, parietal, temporal and occipital lobes [62] (Figure 2b).Various methods have been developed to measure the signal activity generated in the human brain, including EEG, Magnetoencephalography (MEG), functional Magnetic Mesonance Mmaging (f-MRI), function Near-Infrared Spectroscopy (fNIRS) and Positron Emission Tomography (PET) [61,[66][67][68][69][70][71][72].Among them, EEG is one of the strongest biomedical signals that has significance and a high practical value for applications in clinical neurology [57].EEG is a noninvasive method for According to [65], the brain can be divided anatomically into three primary structures: The cerebrum, cerebellum and brain stem (Figure 2a).The cerebrum, which is the largest of these three parts, is divided into two hemispheres that have an outer surface called the cerebral cortex.The cerebral cortex is organized into four lobes: the frontal, parietal, temporal and occipital lobes [62] (Figure 2b).The general ASSC system usually includes three main phases: pre-processing, feature extraction and classification.Its aim is to translate sleep activity into meaningful information through a series of well-designed components.To illustrate this, initially the user's brain activity is recorded to generate the polysomnographic signals that are used to evaluate the ASSC scheme.After the data is recorded, they undergo a pre-processing phase including filtering and artifact rejection to enhance the PSG signal.Then, the resultant signals are transformed through a feature extraction to derive informative attributes that are used in the classification stage.In some ASSC systems, feature selection and/or dimensionality reduction is performed prior to the classification stage to reduce the number of features, or generate new low-dimensional features that are derived from the input features.Examples can be found in [9, 41,51,60].Finally, the extracted attributes are passed to one or more classifiers to categorize human sleep stages.

Electroencephalogram
The human brain is considered a complex dynamic system that consists of millions of neurons interconnected by axons and dendrites [61][62][63].These neurons are responsible for communicating information to and from the brain.Figure 1 shows the general structure of a neuron.According to [65], the brain can be divided anatomically into three primary structures: The cerebrum, cerebellum and brain stem (Figure 2a).The cerebrum, which is the largest of these three parts, is divided into two hemispheres that have an outer surface called the cerebral cortex.The cerebral cortex is organized into four lobes: the frontal, parietal, temporal and occipital lobes [62] (Figure 2b).Various methods have been developed to measure the signal activity generated in the human brain, including EEG, Magnetoencephalography (MEG), functional Magnetic Mesonance Mmaging (f-MRI), function Near-Infrared Spectroscopy (fNIRS) and Positron Emission Tomography (PET) [61,[66][67][68][69][70][71][72].Among them, EEG is one of the strongest biomedical signals that has significance and a high practical value for applications in clinical neurology [57].EEG is a noninvasive method for value for applications in clinical neurology [57].EEG is a noninvasive method for measuring the electrical activity of the cerebral cortex [73][74][75][76].EEG has been widely used since its discovery by Berger in 1929 [77].EEG is measured using multiple electrodes that are placed on the scalp at multiple locations according to the international 10/20 placement system [78][79][80][81][82].This system was extended to the 10/10 system with more electrodes since the multi-channel EEG hardware systems have been developed [83].As shown in Figure 3 [84], the black circles indicate positions in the 10/20 system; and gray circles indicate extended positions in the 10/10 placement system.measuring the electrical activity of the cerebral cortex [73][74][75][76].EEG has been widely used since its discovery by Berger in 1929 [77].EEG is measured using multiple electrodes that are placed on the scalp at multiple locations according to the international 10/20 placement system [78][79][80][81][82].This system was extended to the 10/10 system with more electrodes since the multi-channel EEG hardware systems have been developed [83].As shown in Figure 3 [84], the black circles indicate positions in the 10/20 system; and gray circles indicate extended positions in the 10/10 placement system.The EEG waveform can be differentiated into five frequency bands, namely δ, θ, α, β and γ.These bands can provide valuable information for diagnosing, monitoring, and managing neurological characteristics and disorders.Table 1 shows the amplitude and frequency ranges of the decomposed EEG signal in different frequency bands [3,62].

State of the Art
Many single-or multichannel-based techniques for automated sleep stage scoring have been reported in literature.Some of the studies are reviewed here.The study by [5] segmented two-channel (Fp1 and Fp2) EEG signals in quasi-stationary components, extracted features based on Short Time Fast Fourier (STFT), performed Fuzzy C-Means (FCM) algorithm based dimension reduction and used multiclass SVM to develop an ASSC system.The result of this work provided 70.92% accuracy.Mustfa et al. [10] employed six different EEG signals and various signal processing features, such as time domain, frequency domain and non-linear features.Additionally, Random Forests (RF) and SVM were considered as classifiers for five sleep stages.The aim of this work was to develop an online algorithm for an automatic sleep stage classification using a single EEG channel.The results showed that the best performance has been found using the frontal EEG signals, with spectral linear features and a RF led to the optimal performance higher than SVM.A Bootstrap Aggregating (Bagging) algorithm with various statistical and spectral features extracted from a single EEG channel was used by [11] to classify The EEG waveform can be differentiated into five frequency bands, namely δ, θ, α, β and γ.These bands can provide valuable information for diagnosing, monitoring, and managing neurological characteristics and disorders.Table 1 shows the amplitude and frequency ranges of the decomposed EEG signal in different frequency bands [3,62].

State of the Art
Many single-or multichannel-based techniques for automated sleep stage scoring have been reported in literature.Some of the studies are reviewed here.The study by [5] segmented two-channel (Fp1 and Fp2) EEG signals in quasi-stationary components, extracted features based on Short Time Fast Fourier (STFT), performed Fuzzy C-Means (FCM) algorithm based dimension reduction and used multiclass SVM to develop an ASSC system.The result of this work provided 70.92% accuracy.Mustfa et al. [10] employed six different EEG signals and various signal processing features, such as time domain, frequency domain and non-linear features.Additionally, Random Forests (RF) and SVM were considered as classifiers for five sleep stages.The aim of this work was to develop an online algorithm for an automatic sleep stage classification using a single EEG channel.The results showed that the best performance has been found using the frontal EEG signals, with spectral linear features and a RF led to the optimal performance higher than SVM.A Bootstrap Aggregating (Bagging) algorithm with various statistical and spectral features extracted from a single EEG channel was used Entropy 2016, 18, 272 6 of 31 by [11] to classify different sleep states.The authors reported the accuracy results of 6-stages, 5-stages, 4-stages, 3-stages and 2-stages as 85.57%, 86.53%, 87.49%, 89.77% and 95.05%, respectively.
Similarly, a study by [12] proposed a single-channel-EEG-based method for sleep stage scoring using Complete Ensemble Empirical Mode Decomposition (EMD) with Adaptive Noise (CEEMDAN).Bagging was employed to classify the sleep states.This work achieved an accuracy of 86.89%, 90.69%, 92.14%, 94.10% and 99.48% for 6-Class, 5-Class, 4-Class, 3-Class and 2-Class, respectively.Sotelo et al. [16] used entropy metrics features, the Q-algorithm as a dimensionality reduction method and J-mean clustering as a classifier for two EEG-channel-based automatic sleep stage scoring.The performance for the automatically discriminated data achieved an optimal classification accuracy of up to 80%.Another study from [17] extracted many spectral features based on Fast Fourier Transform (FFT) of multichannel PSG data to classify the sleep stages using a rule-based DT classifier and achieved an accuracy of 84%.
In [28], an SVM classifier based approach was used to distinguish between wake and drowsy states using three channels of EEG waveforms.The drowsy state was defined as a combination of both sleep Stage 1 and Stage 2. The results of the drowsiness detection approach indicated a high accuracy and precision of 98.01% and 97.91%, respectively.Fraiwan et al. [29] developed a methodology for automatic sleep stage scoring based on extracted entropy features of the Wigner-Ville Distribution (WVD), Hilbert-Hough Spectrum (HHS) and Continuous Wavelet Transform (CWT) using a single EEG channel and ANN.The classification accuracy of the WVD was 84%, which outperformed the other approaches using the other features in their work.Renyi's entropy features were extracted from a single EEG channel for sleep stage identification [30] using three time-frequency techniques.The performance of the proposed approach was tested by a RF classifier and attained an accuracy rate of 83%.
Moreover, the study from [36] performed sleep stage classification based on extracting nine graph domain features from a Visibility Graph (VG) and a Horizontal VG (HVG) using a single channel of the EEG signal, and multiclass SVM as the classifier.The accuracy of the classification of six sleep stages achieved 87.5% using the SVM classifier.Hsu et al. [38] classified five sleep stages based on six energy features from a single EEG channel using the Elman recurrent neural classifier with 87.2% classification accuracy.Shuyuan et al. [40] utilized 4 EEG, 2 EOG and 1 EMG signals to extract ratio, power and Zero Crossing (ZC) features, respectively.Then, an enhanced k-means clustering algorithm was used to classify the sleep data into five stages.The algorithm showed an accuracy of 75%, which was higher than the original k-means clustering algorithm.A wide range of time and frequency-domain features have been explored by [41] from PSG signals that included two EEG channels, two EOG channels and one EMG channel for automatic sleep stage scoring.The proposed method led to 94% specificity, 82% sensitivity and 92% accuracy using a Dendrogram-SVM (DSVM).Correspondingly, an ASSC addressed by Karkovská and Mezeiova [42] extracted 14 features of PSG signals such as entropy, variance, coherence, prediction error and ZC from 6 EEG, 2 EOG and 1 EMG channel and classified the data using a quadratic discriminant analysis.The results confirmed an accuracy of 81%.In [45], a total of 39 features obtained from time-domain, frequency-domain and nonlinear parametric analyses were extracted and then applied to a certain combination of optimum feature subsets that were selected to help binary SVM classify five different sleep stages from a single-channel EEG signal.The algorithm was capable of achieving an average sensitivity, specificity and accuracy of 88.32%, 97.42% and 95.88% respectively; and reported an error rate of 10.61%.
According to [48], a machine learning approach for ASSC based on a single-channel of EEG data was introduced.A two-step classification based on the KNN method was used to first classify wake/sleep and then four sleep stages consisting of wake, Stage 1 + REM, Stage 2 and SWS.The achieved accuracies were 98.32% and 94.49%, respectively.Kayikcioglu et al. [49] extracted Auto-Regressive (AR) coefficient features from a single EEG signal to classify both sleep and wake stages with an accuracy of 91% using a Partial Least Squares Regression (PLSR) classifier.Spectral analysis, Wavelet Transform (WT) and fuzzy clustering based on the FCM algorithm were used by [60] in an automatic sleep stage detector, which was able to distinguish the wake stage, as well as stages 1-4 and REM sleep stage, using single-channel EEG signals.The results showed that the algorithm could provide a 92.27% success rate when using wavelet packets.Cic et al. [82] generated time-frequency features using the EMD method and applying the Generalized Zero Crossing (GZC) method on the obtained Intrinsic Mode Functions (IMF) for sleep stage classification based on a single EEG channel.The approach performed with an overall 90% accuracy using the SVM classifier.
Another sleep stage classification study was conducted by Chen et al. [85] to estimate sleep stages, including the wake stage, Stage 1 and Stage 2, during daytime naps using four recorded EEG signals.The proposed method achieved an 80.6% accuracy rate based on the Hopfield Neural Network (HNN) classifier.A multiclass SVM based on three EEG and two EOG channels was used by [86] for an automatic sleep stage detector, to automatically separate wakefulness, REM and NREM sleep stages in young healthy subjects and elderly patients.The experimental results showed that this algorithm could achieve a 91% success rate.In [87], three features obtained from the Cross-Frequency-Coupling (CFC) method, average power method and preferential frequency band method, using a single-channel EEG were fed as inputs to an LDA classifier for sleep stage classification.The proposed method correctly classified up to an average of 75% of the stages using a combination of both average power and CFC features, which outperformed either approach used individually.Koch et al. [88] addressed the sleep stage classification problem by using the Latent Dirichlet Allocation model from multiple PSG signals that included 2 EEG and 2 EOG channels.The model scored an overall 68.3% accuracy.
Tables 2-4 report various EEG-based signal processing techniques used in each ASSC phase.In order to increase the readability of this work, signal processing techniques are categorized in each table based on their application in sleep studies including: Sleep stage classification, referring to the studies that classify sleep stages into different states such as 2 states, 3 states, 4 states, 5 states and 6 states; sleep stage characteristics, representing studies that detect patterns such as spindle, k-complex or measure band similarities; and finally, sleep disorder detection applications such as OSA and Parkinson's disease.The ASSC designs/studies selected for this review article include all journal and conference papers that are based on EEG signals.

Proposed Method and Procedures
In this section, we propose a novel and efficient sleep stage classification methodology that could be implemented in hardware in an effort to assist physicians in real-time diagnosis and treatment of sleep disorders.As shown in Figure 4, our procedure starts with filtering and decomposing the EEG signal into delta, theta, alpha, beta and gamma sub-bands using band-pass filters.Then, two new sets of statistical features are derived from each frequency band.Finally, W, REM and NREM sleep stages are classified using several known machine learning classifiers to identify the most efficient one.The proposed sleep stage classification system is entirely automatic and uses a single EEG channel.In the following subsections, each step is presented in more detail.

Proposed Method and Procedures
In this section, we propose a novel and efficient sleep stage classification methodology that could be implemented in hardware in an effort to assist physicians in real-time diagnosis and treatment of sleep disorders.As shown in Figure 4, our procedure starts with filtering and decomposing the EEG signal into delta, theta, alpha, beta and gamma sub-bands using band-pass filters.Then, two new sets of statistical features are derived from each frequency band.Finally, W, REM and NREM sleep stages are classified using several known machine learning classifiers to identify the most efficient one.The proposed sleep stage classification system is entirely automatic and uses a single EEG channel.In the following subsections, each step is presented in more detail.

Pre-Processing
The input EEG signal is filtered to eliminate undesired background signals and is decomposed into five frequency bands, namely δ, θ, α, β and γ, using five efficient Infinite Impulse Response (IIR) Butterworth band-pass filters.The signals were segmented in 10 s epochs.IIR filters have simple transfer functions which can be easily realized on digital signal processers, digital hardware engines, and/or embedded systems.The frequency response of Butterworth filters has no ripple in the passband and is extremely flat.The minimum order of the filter is applied to yield a precise and significantly effective design [127,128].The minimum order and cutoff frequencies are defined as (1) and ( 2) respectively.
where Gp is passband gain, Gs is stop-band gain, ωp is corner passband frequency and ωs is corner stop-band frequency.The frequencies and amplitudes of δ, θ, α, β and γ sub-bands during normal condition are shown in Table 1.

New Feature Extraction
The characteristic parameters of the filtered EEG signals are measured based on two novel statistical features generated for each 10 s EEG epoch.The statistical feature method is one of the most commonly used time-domain features for discriminating different input EEG classes [129].The statistical moments are well recognized for their ability to interpret the underlying statistics of the data [7].In this study, two new statistical features are proposed and derived by applying an assumption that depends on a utilized epoch.Because EEG is considered a non-stationary signal and unlike stationary signals, has no specific patterns, we segmented the signal in the time domain into sub-windows to apply the first feature, which is the Maximum-Minimum Distance (MMD).In addition, EnergySis (Esis), which is the second feature and determines the energy and speed of the EEG signal, is derived.In our work, the assumption is that the number of samples (or length) of a

Pre-Processing
The input EEG signal is filtered to eliminate undesired background signals and is decomposed into five frequency bands, namely δ, θ, α, β and γ, using five efficient Infinite Impulse Response (IIR) Butterworth band-pass filters.The signals were segmented in 10 s epochs.IIR filters have simple transfer functions which can be easily realized on digital signal processers, digital hardware engines, and/or embedded systems.The frequency response of Butterworth filters has no ripple in the passband and is extremely flat.The minimum order of the filter is applied to yield a precise and significantly effective design [127,128].The minimum order and cutoff frequencies are defined as (1) and ( 2) respectively.
where G p is passband gain, G s is stop-band gain, ω p is corner passband frequency and ω s is corner stop-band frequency.The frequencies and amplitudes of δ, θ, α, β and γ sub-bands during normal condition are shown in Table 1.

New Feature Extraction
The characteristic parameters of the filtered EEG signals are measured based on two novel statistical features generated for each 10 s EEG epoch.The statistical feature method is one of the most commonly used time-domain features for discriminating different input EEG classes [129].The statistical moments are well recognized for their ability to interpret the underlying statistics of the data [7].In this study, two new statistical features are proposed and derived by applying an assumption that depends on a utilized epoch.Because EEG is considered a non-stationary signal and unlike stationary signals, has no specific patterns, we segmented the signal in the time domain into sub-windows to apply the first feature, which is the Maximum-Minimum Distance (MMD).In addition, EnergySis (Esis), which is the second feature and determines the energy and speed of the EEG signal, is derived.In our work, the assumption is that the number of samples (or length) of a sub-window is considered to be a power of 10 that should start from 100.This number is also used as the wavelength of the EEG waveform.Figure 6 shows the wavelength assumption for a 10 s epoch.In a generalized form, let λ be the length (number of samples) of a sliding window, which is also referred to as the wavelength of the EEG signal.Our assumption presumes that if the number of samples in an epoch is less than 10,000, then λ = 100 if greater than 10,000 and less than 100,000, then λ = 1000 and so on.This rule must be taken into consideration for all epochs.Equation (3) represents how the number of samples in a sliding window, or the wavelength is determined.
where n is number of samples in an epoch.

MMD:
The MMD feature is based on the distance formula derived from the Pythagorean Theorem.The idea behind this feature is to find the distance between the maximum and minimum points in each sub-window.Figure 7 illustrates a part of the MM-distance feature on a Delta sub-band of the EEG signal.To compute this feature, first the maximum and minimum values are found with their indices in each sliding window.Then the distance between the maximum point and minimum point are calculated using the Pythagorean distance formula: where ∆x indicates the x-axis (time) difference of the maximum and minimum points and ∆y refers to the y-axis (amplitude) difference of the maximum and minimum points in each sub-window.Lastly, ( 5) is carried out to find the sum of the distance sequences that are seen in each sliding window: where w refers to the total number of sliding (sub) windows in an epoch.

Esis:
The second feature is Esis.The basic idea of this feature is to assume that the signal has speed and energy.According to (6), the speed (velocity) of the signal can be measured by using the frequency and wavelength parameters.The frequency (f) is calculated by finding the midpoint of the pass-frequency for each band.The wavelength (λ) of the EEG waveform is determined as mentioned earlier in (3).Then, the obtained velocity (v) is multiplied by each squared amplitude (X) modulus of the sample.Finally, the total Esis is calculated as described in (7).
where N refers to the length of the epoch.

Machine Learning and Classification
After the feature vectors were generated, six well-known classifiers were used to evaluate the classification performance of six sleep stages using the Statistics Toolbox in MATLAB R2014b.The classifiers applied in our work include: multiclass SVM, DT, NN, KNN, NB and LDA.As for the NN, a two-layer (input and output) and 1 hidden layer feed forward neural network was used to classify the six sleep stages.In the model, the same number of neurons equal to the number of classes was used in the output layer, while the number of neurons is set to 10 in the hidden layer.For KNN, the Mahalanobis distance metric was used with k neighbors equal to 1, 2, 3 and 4. In this study, the highest accuracy value for KNN was obtained when k = 4.The DT classification model was used to classify different sleep stages for the binary tree algorithm.The design concept is to split the 10 s epochs into two different groups for each decision node from the top to the bottom.This way, each decision node could distinguish two different sleep stages.For a multiclass classification with SVM, a "one-against-all" approach was combined with a kernel function.The linear kernel was used in this study.It constructs m SVM models, where m is the number of classes.Each classifier is trained to separate one class from the remaining m−l classes.Other classifications of sleep stages were performed with LDA, which is also known as Fisher's Linear Discriminant (FDA).The linear method was applied to define the means to separate the input features into different sleep stages.Finally, for the NB classifier, the kernel values of the data distributions were used with an empirical class probability to classify the sleep stages.For a detailed review and mathematical foundation of the six aforementioned classifiers, [130][131][132][133] can be reviewed.

Discussion
Several points brought up in the previous sections deserve further discussion and comment.Figures 8 and 9 summarize the information presented in Tables 2 and 3, which respectively summarize the feature extraction and classification algorithms in sleep stage detection.Specifically, Figure 8 shows the number of sleep stage detection schemes that use a specific feature classification method.In this section, we will highlight some methods that have been widely used in the signal processing phases of sleep stage detection schemes.

Signal Pre-Processing
In biomedical signal processing, it is crucial to determine the noise, artifacts and any trends present in the raw signals so that their influence in the feature extraction stage can be minimized [29,30,46,49,50].EEG recordings have a wide variety of artifacts, some having a technical origin and others having a physiological origin mixed together with the brain signal [41,45,57,108,129].Therefore, the use of pre-processing methods before feature extraction is useful for EEG signal analysis without losing relevant information [44,73].Many of the sleep stage detection schemes reported in this study employ pre-processing techniques before extracting the features from the signal; 50% use frequency-selective-filtering and another 15% employ filtering, such as Discrete Wavelet Transform (DWT).However, a few studies such as [28,48,124], do not employ any form of filtering prior to the analysis.Next, we discuss the frequency-selective filtering that is implemented as an IIR or Finite Impulse Response (FIR).According to our review, these methods are among the most frequently used techniques and have become increasingly popular in ASSC studies.
Selective digital filters (low-pass, high-pass, band-pass and band-stop filters) have been widely used in artifact detection and removal [129].These filters are powerful and significant tools to minimize artifacts and to eliminate selected EEG signals from unwanted frequencies [128].Frequency-selective digital filters can be implemented as IIR or FIR filters.In electrophysiology,

Signal Pre-Processing
In biomedical signal processing, it is crucial to determine the noise, artifacts and any trends present in the raw signals so that their influence in the feature extraction stage can be minimized [29,30,46,49,50].EEG recordings have a wide variety of artifacts, some having a technical origin and others having a physiological origin mixed together with the brain signal [41,45,57,108,129].Therefore, the use of pre-processing methods before feature extraction is useful for EEG signal analysis without losing relevant information [44,73].Many of the sleep stage detection schemes reported in this study employ pre-processing techniques before extracting the features from the signal; 50% use frequency-selective-filtering and another 15% employ filtering, such as Discrete Wavelet Transform (DWT).However, a few studies such as [28,48,124], do not employ any form of filtering prior to the analysis.Next, we discuss the frequency-selective filtering that is implemented as an IIR or Finite Impulse Response (FIR).According to our review, these methods are among the most frequently used techniques and have become increasingly popular in ASSC studies.
Selective digital filters (low-pass, high-pass, band-pass and band-stop filters) have been widely used in artifact detection and removal [129].These filters are powerful and significant tools to minimize artifacts and to eliminate selected EEG signals from unwanted frequencies [128].Frequency-selective digital filters can be implemented as IIR or FIR filters.In electrophysiology,

Signal Pre-Processing
In biomedical signal processing, it is crucial to determine the noise, artifacts and any trends present in the raw signals so that their influence in the feature extraction stage can be minimized [29,30,46,49,50].EEG recordings have a wide variety of artifacts, some having a technical origin and others having a physiological origin mixed together with the brain signal [41,45,57,108,129].Therefore, the use of pre-processing methods before feature extraction is useful for EEG signal analysis without losing relevant information [44,73].Many of the sleep stage detection schemes reported in this study employ pre-processing techniques before extracting the features from the signal; 50% use frequency-selective-filtering and another 15% employ filtering, such as Discrete Wavelet Transform (DWT).However, a few studies such as [28,48,124], do not employ any form of filtering prior to the analysis.Next, we discuss the frequency-selective filtering that is implemented as an IIR or Finite Impulse Response (FIR).According to our review, these methods are among the most frequently used techniques and have become increasingly popular in ASSC studies.
Selective digital filters (low-pass, high-pass, band-pass and band-stop filters) have been widely used in artifact detection and removal [129].These filters are powerful and significant tools to minimize artifacts and to eliminate selected EEG signals from unwanted frequencies [128].Frequency-selective Entropy 2016, 18, 272 14 of 31 digital filters can be implemented as IIR or FIR filters.In electrophysiology, Butterworth and elliptic IIR filters are commonly applied.On the other hand, almost exclusively odd lengths, symmetric (type I) FIR filters are applied.However, the IIR is more powerful than the FIR filter.It is considered very efficient when high throughput and sharp cutoffs are required, whereas FIR filters are desirable in adaptive signal processing because of their stability during adaptation [128,134].Table 6 summarizes a comparison between IIR and FIR filters, especially useful for EEG signal analysis.

Feature Extraction
Feature extraction is considered the most important procedure for any type of PSG-related analysis.From our literature survey, ninety of the reported sleep stage detection schemes employed feature extraction algorithms.All the sleep stage related features can be meticulously categorized into four main groups: time, frequency, time-frequency domain and nonlinear features [45].Based on the results shown in Figure 9, 35% use non-parametric-based frequency-domain features, 24% use the wavelet-transform-based time-frequency domain, 25% use statistical standards based on the time domain and 6% use Approximate Entropy (ApEn) based on nonlinear, domain feature, extraction measures.The standard statistics of the temporal domain, non-parametric statistics of the spectral domain and WT of the time-frequency domain are the top three feature extraction methods that have received more attention in ASSC schemes.In the following section, we discuss the above feature extraction techniques.

Standard Statistics
Many time-domain features have been reported in literature.The statistical measures are among the simplest features that can be derived from the time domain analysis.These statistical parameters are well recognized for their ability to express the underlying statistical moments of the EEG signal [7,11].When applying these measures, each epoch is considered as an univariate process that ignores the correlations between epochs [129].Examples of statistical moments include the mean, variance, skewness and kurtosis.The characteristics of such features are obtained directly from the EEG epoch X(n) to measure certain tasks, such as central tendency, degree of dispersion, asymmetry, data peaks, troughs and flatness respectively [45].Examples of statistical moments are shown in previous studies [12,47].

Non-Parametric Statistics of the Spectral Domain
Some of the most commonly extracted features from PSG signals are frequency-domain features which characterize the spectral structure of the signal [46,129].The spectral estimation such as power spectrum and the Power Spectral Density (PSD) are meaningful when the signal is stationary [129].Because the EEG signal is non-stationary, the calculation of the spectral estimation involves prior segmentation of the EEG signal.This requires applying a special transform, typically based on the Fourier Transform (FT), to convert EEG signals from the time domain to a representation in the frequency-domain for acquiring the spectrum components of such signals.The most general form of spectral estimation uses non-parametric methods.Welch's spectral analysis method and periodogram are examples of non-parametric approaches [41,46,129].The non-parametric approach is a commonly used technique in EEG-based sleep analysis because they are simple to implement and interpret, as stated by [46,129].However, the frequency resolution may be lost due to smearing and leakage problems that appear when FT-based methods are implemented.Therefore, the non-parametric methods require long records to achieve proper resolution [46].

Wavelet Transforms
WT is a well-known form of the time-frequency distribution and has been widely deployed in signal processing and analysis of many fields over the past two decades [29,30,107].WT uses functions that are localized in both time and frequency scales [8,33,129].Because of its flexible way to represent the time-frequency domain of a signal, WT is suitable for non-stationary signal analysis [126].Therefore, it is a powerful tool for the analysis and feature extraction of the EEG signal.The WT breaks down the input signal by shifting and scaling wavelets over different frequency bands [47].By applying the multi-resolution, the vector of coefficients can be obtained and used as an input for the classifier [46,135].

Feature Selection/Dimensionality Reduction
Some ASSC schemes have been designed using the extreme values of features, regardless of very high dimensional vectors, feature redundancy and noisy data that affect the classification process [5,51].In this case, dimensionality reduction and/or feature selection algorithms are used to find the most discriminative features and to keep the dimensionality of features as low as possible [8].These algorithms have been developed in fields including machine learning and pattern recognition.Dimensionality reduction maps the data to a lower dimensional space to obtain low-dimensional features that make the performance of such a system sturdy and powerful [136].To boost the classification performance, a feature selection algorithm is applied to progress the generalization ability, reduce the computational complexity of the classifier and select a set of significant features that are used as input to the classifier [45].Based on our survey, the most popular algorithms used for ASSC are sequential selection methods and Principal Component Analysis (PCA) dimensionality reduction.

Principal Component Analysis
In 1901, Karl Pearson invented PCA, which is considered a deep-rooted algorithm for the reduction of the dimension of features.PCA is known as a linear transformation that is generally used to reduce the dimension of a dataset, keeping characteristics that contribute the most to the variance as well as maintaining lower-order principal components, while leaving out the higher-order components [137].The objective of PCA is to express the d-dimensional vectors in a lower dimensional space that will help decrease the complexity of time and space [76].PCA contains a mathematical procedure that maps the correlated variables to a set of linearly uncorrelated vectors termed principal components [126,135].Principal components are assured to be autonomous only if the dataset is equally and normally distributed.PCA is also called discrete Karhunen-Loeve Transform (KLT) [60,138].KLT is mostly used in statistical pattern recognition where the main function is to find the representation of the input vector in terms of the eigenvectors of their covariance matrix.

Sequential Selection Methods
Sequential Floating Feature-Selection (SFSM) methods are the most common feature selection techniques.SFSM methods are divided into two main strategies of floating search methods: Sequential Forward Selection (SFS) and Sequential Backward Selection (SBS).Principally, the SFS algorithm starts with an empty feature subset and iteratively inserts one feature that maximizes an objective function [8,44].In contrast, the SBS algorithm works in a similar manner but it starts with a full feature subset and consecutively removes one feature that minimizes an objective function.The main drawback of SFS and SBS is that any feature that previously was added to, or deleted from the final set of features, cannot be reevaluated by re-appending to or discarding from the feature subsets.Consequently, redundant features might be selected.Therefore in 1994, Pudil introduced two categories for SFS and SBS algorithms: the Sequential Forward Floating Selection (SFFS) and the Sequential Backward Floating Selection (SBFS).SFFS is an iterative algorithm that adds a new feature of previously selected features and eliminates a feature from the subset of already selected features using the SFS algorithm.With a slight variation, the SBFS appends a previously deleted feature to the subset of selected features and deletes a feature from the subset of the already selected features in the SBS algorithm [8].

Classification
Table 3 summarizes a number of ASSC schemes that use the different classification algorithms shown in Figure 9. Approximately 31% of the ASSC methods use classification schemes that are based on SVM classifiers, 22% based on NN classifiers, 11% based on LDA, 10% based on KNN, 5% based on DT, 5% based on NB classifiers and less than 5% based on other types, such as HMM, Adaboost, Bagging, quadratic, RF and K-means.Approximately 14% are also based on other types, such as fuzzy classification and combined classification.

Results
The proposed ASSC scheme is based on a single-channel EEG signal in the Sleep-EDF database.The EEG signals were filtered and segmented into 10 s epochs, as described in the pre-processing step.To evaluate the performance of our proposed ASSC method, two new sets of features were extracted from 23,806 EEG epochs of 39 PSG recordings.Table 5 summarizes the number of epochs in different sleep classes that were used as our experimental dataset.Our study is based on the available guidelines for sleep stage classification, the R&K standard, which includes six-state sleep stages: wake, Stage 1, Stage 2, Stage 3, Stage 4 and REM.For classification purposes, several machine learning algorithms were applied to train and test the data with different percentage levels: 50% and 50%; 70% and 30%; and 80% and 20%.The classifiers were randomly trained and tested ten times with each percentage level and the average accuracy was recorded.We tested different classifiers' performance, since a certain classifier might yield a better performance compared to others in ASSC systems.According to [7], there is no best machine learning classifier because a set of machine learning models that work very well in one domain may work poorly in another.Hence, to ensure that the algorithm is pragmatic and feasible in the real-world, we performed tests using various types of classifiers and determined the best one that covered the widest variety of data.Moreover, based on our survey, a few ASSC schemes have considered testing different classifiers and achieved performance improvements [9, 10,12,32,41,50].The chosen classifiers applied to the proposed method in this study include SVM, NN, KNN, NB, SVM and DT, which are among the most commonly used ones in ASSC, based on our survey.The performance of these classifiers can be determined by the computation of accuracy, sensitivity and specificity using TP, FP, FN and TN values, where TP refers to true positives, TN is true negatives, FP is false positives and FN is false negatives.The equations of accuracy, sensitivity and specificity are shown below [9,12,30]: Sensitivity (S e ) = TP (TP + FN) Specificity S p = TN (TP + FN) The work was implemented using the MATLAB R2014b software on a computer with Intel(R) Core(TM) i7-3615, 3.20 GHz CPU, 8 GB of installed memory RAM and 64-bit operating system.
The advantages of our proposed method and the significance of the experimental findings for each classifier are described in Tables 7-12.These tables show the comparison, sensitivity and specificity of each sleep stage and overall accuracy for the six analyzed classifiers: SVM, DT, NN, KNN, NB and LDA.The greatest misclassification problems of our scheme were related to epochs in REM classified as S1.According to [11,12,38], REM and S1 stage in the EEG signal are almost indistinguishable by ASSC and visual scoring due to the similarity in characteristics of both stages.Additionally, because the presence of rapid eye movement recorded by EOG signals is the main feature of REM stage, they may appear as artifacts in the EEG signal [38].Thus, it is realistic to expect such poor sensitivity in the REM stage, which reduces the overall classification accuracy in this work.As a matter of fact, employing EOG and EMG signals along with EEG signals can be useful in discriminating REM and the S1 stages, which generally have similar EEG characterizations.The EOG signals measure the high ocular activity of REM and the EMG signals measure the low level of muscle tone during REM, which is the opposite in S1 [8,44].However, using numerous PSG signals put limitations on the subject's movement, is uncomfortable and may affect the system efficiency.On the other hand, as shown in the normalized confusion matrix in Table 7, the DT classifier obtained the best overall classification accuracy with an average of 93.13% in three different test percentage levels.The most accurately classified sleep stage was wake, with approximately 97.89% sensitivity of wake stage epochs correctly classified.Stages S2, S1 and S3 follow, with approximately 95.77%, 91.24% and 91.01%sensitivity of epochs correctly classified for each stage, respectively.Then, Stage S4 achieved an average sensitivity of 86.88% for correctly epochs classified.Most of the misclassified REM stage was classified as S1, which can be justified by the similarity in the characteristic frequency patterns of these stages.However, the lowest sensitivities exist in the REM stage detection (71.6%), while the average specificities achieved for REM (98.64%) are high and close to the other sleep stages.Most misclassifications occurred between stages REM-S1 (approximately 21.42%), followed by Stage REM-S2 (approximately 12.24%) and S3-S4 (approximately 12.2%).As seen from the results, the remaining stages had either misclassification rates below 8%, or roughly no misclassifications at all.From our observation, the misclassifications took place in the epochs that enclose transitions from one sleep stage to another, such as (REM-S1) and (REM-S2).Overall, the sensitivity, specificity and accuracy results for DT were relatively high for all sleep stages, with one exception being the low in sensitivity for REM.In terms of classification accuracy, the DT is followed by the SVM (92.37%),NN (91.70%) and KNN (89.38%).The details of the classification performance obtained using SVM, NN and KNN techniques for testing the dataset are presented in Tables 8-10, respectively.We found that there was improved performance for SVM and NN classifiers when 70% of the dataset was used for training while 30% was applied for testing, whereas KNN achieved the best accuracy when 20% was used for testing and 80% was used for training.Also, the six sleep stages have been classified using NB and LDA and the average classification rates derived from NB classifiers are 83.71% and 74.49% for the LDA, which was considered the lowest accuracy achieved in our experiments.The obtained sensitivity and specificity results for NB and LDA classifiers on the classification of all sleep stage datasets are demonstrated in Tables 11 and 12.The overall accuracy, sensitivity and specificity resulted for different classifiers when using different percentages of test are shown in Figure 10a-c.An investigation of Figure 11 demonstrates that the computation time increased with the increases in the testing percentage levels.The classifiers which worked the fastest, were the LDA and DT followed by SVM, KNN and NN.NB was found to require the highest computation time.An investigation of Figure 11 demonstrates that the computation time increased with the increases in the testing percentage levels.The classifiers which worked the fastest, were the LDA and DT followed by SVM, KNN and NN.NB was found to require the highest computation time.An investigation of Figure 11 demonstrates that the computation time increased with the increases in the testing percentage levels.The classifiers which worked the fastest, were the LDA and DT followed by SVM, KNN and NN.NB was found to require the highest computation time.Table 13 displays a comprehensive comparison of our proposed approach with all related studies.We must note that comparison with other studies is very difficult because different EEG databases, different number of EEG channels and the number PSG signals were used.We included in this review all studies that reported using the same EDF database and single EEG signals.In addition, several prior studies that did not use the Sleep-EDF dataset are also included as we intended to compare our work using only 10 s epochs with those using 20 s and 30 s epochs.To the best of our knowledge, the proposed study is the first attempt to classify six sleep stages of 10 s epochs using a single EEG channel with newly introduced statistical features.In addition, we include the studies that classify the six sleep stages using R&K standard, five sleep stages based on AASM rules and four sleep stages, which include (W, S1 + S2, SWS, REM) and (wake, Stage 1 + REM, Stage 2, SWS).Table 13 indicates that our method performs better than the state-of-the-art methods for the six stage classification.The highest accuracy was obtained using our method, outperforming those of all the previous and related studies except [9].However, we believe our work has several advantages over [9] for two reasons.First, we trained and tested our algorithm on 23,806 epochs using a 10 s window length, which enabled early detection of sleep stages, whereas [9] used only 5160 epochs with a 30 s window length.Second, we used only two new, simple and feasible statistical features that can be easily implemented in hardware, whereas [9] used 5 features after employing feature selection algorithms on a 41-feature extraction scheme.Moreover, the proposed method using DT has been applied to classify 5 stages by combining S3 and S4, 4 stages by merging S1 with S2 and S3 with S4 and another 4 stages by joining S1 with REM and S3 with S4, as can be seen from Tables 14 and 15.
The performance of the proposed procedure obtained high accuracy rates when compared with the work available from the literature listed in Table 13.Finally, the fact that the proposed scheme used only one channel through optimal, new, simple and feasible statistical features using 10 s epochs, is a major contribution and advantage.

Conclusions
This work provided a comprehensive survey of automatic EEG-based signal processing techniques applied to sleep stage identification.The ASSC analysis procedure has been divided into four essential parts including: pre-processing, feature extraction, feature selection and/or dimensionality reduction and classification.The survey offers valuable information for researchers to find out which signal processing methods have been used for certain ASSC schemes and discusses their performances and efficiency.Moreover, in this article a novel approach was developed that could be easily implemented in hardware to differentiate sleep stages using EEG signals.The breakdown process of the single-channel EEG signal employs digital filters that have an easy-to-use transfer function when used on digital signal processors, digital hardware engines or embedded systems.The new, simple statistical features developed in this work, called EnergySis and Maximum-Minimum Distance, provided an effective approach for analyzing the 10 s EEG signal capability for measuring and identifying brain activity states.The use of 10 s epoch lengths is beneficial for near real-time applications, unlike the prior and current related work that provided updated results after 30 s or 20 s which affects the feasibility and speed of ASSC.The experiments conducted in this study used a set of machine learning algorithms.The proposed methodology achieves an average classification sensitivity, specificity and accuracy of 89.06%, 98.61% and 93.13% respectively, when DT performed the training and testing of the extracted features.Therefore, our simpler, quicker and more feasible scheme makes our approach attractive for easy implementation in any embedded microcontroller device to identify certain patterns such as fatigue, drowsiness and/or various sleep disorders (e.g., sleep apnea) in near real-time.In comparison with several recently available studies on the classification of sleep stages, the present study has certain

4. 1 .
Input EEG SignalThe input EEG signal in this work is acquired from a well-known dataset.The dataset used in this study is publicly available from the Sleep-EDF database (expanded) on the Physionet website (https://physionet.org/physiobank/database/sleep-edfx/)and has been widely used in the literature[2,7,11,12,16,18,24,33,36,38,48,49,57,87,91,105,106,108,109,114].The database is a collection of 61 PSGs obtained from 1987-2002 including the older Sleep EDF database recordings prior to 1991.The recordings include data from 20 healthy subjects numbered 00 through 19, which included 10 male and 10 female participants between the ages of 25 and 34.Two PSGs with lengths of approximately 20 h were recorded each day, including nighttime, for two days at the subjects' homes.The second night of subject 13 was not available because of a failure in the recording cassette.The PSG recordings contain EEG Fpz-Cz, EEG Pz-Oz, EOG horizontal, submental chin EMG and event marker signals.Most files also contain oro-nasal respiration and rectal body temperature.The EEG signals are sampled at 100 Hz; only the EEG Fpz-Cz signal was used in this proposed study as the single-channel EEG.The associated hypnogram files contain sleep patterns recorded from each subject.These patterns consist of sleep stages W, 1, 2, 3, 4, REM, M (movement time) and ?(question mark symbol) as an indication that it has not been scored.All hypnograms were manually scored by well-trained technicians according to the R&K manual.Each signal is processed in 10 s time-frames in our proposed work.For the purpose of illustration, Figure 5 shows samples of five different stages of EEG signals, which were used as inputs to the designed filters.Table 5 shows the number of wake, Stage 1, Stage 2, Stage 3, Stage 4 and REM epochs for all subjects in the database.

4. 1 .
Input EEG SignalThe input EEG signal in this work is acquired from a well-known dataset.The dataset used in this study is publicly available from the Sleep-EDF database (expanded) on the Physionet website (https://physionet.org/physiobank/database/sleep-edfx/)and has been widely used in the literature[2,7,11,12,16,18,24,33,36,38,48,49,57,87,91,105,106,108,109,114].The database is a collection of 61 PSGs obtained from 1987-2002 including the older Sleep EDF database recordings prior to 1991.The recordings include data from 20 healthy subjects numbered 00 through 19, which included 10 male and 10 female participants between the ages of 25 and 34.Two PSGs with lengths of approximately 20 h were recorded each day, including nighttime, for two days at the subjects' homes.The second night of subject 13 was not available because of a failure in the recording cassette.The PSG recordings contain EEG Fpz-Cz, EEG Pz-Oz, EOG horizontal, submental chin EMG and event marker signals.Most files also contain oro-nasal respiration and rectal body temperature.The EEG signals are sampled at 100 Hz; only the EEG Fpz-Cz signal was used in this proposed study as the single-channel EEG.The associated hypnogram files contain sleep patterns recorded from each subject.These patterns consist of sleep stages W, 1, 2, 3, 4, REM, M (movement time) and ?(question mark symbol) as an indication that it has not been scored.All hypnograms were manually scored by well-trained technicians according to the R&K manual.Each signal is processed in 10 s time-frames in our proposed work.For the purpose of illustration, Figure 5 shows samples of five different stages of EEG signals, which were used as inputs to the designed filters.Table 5 shows the number of wake, Stage 1, Stage 2, Stage 3, Stage 4 and REM epochs for all subjects in the database.

Figure 7 .
Figure 7. Applying MMD on a Delta EEG sub-band.

Figure 11 .
Figure 11.Variation in classification type and computation time.Figure 11.Variation in classification type and computation time.

Figure 11 .
Figure 11.Variation in classification type and computation time.Figure 11.Variation in classification type and computation time.

Table 1 .
Amplitude and frequency range of decomposed EEG signal.

Table 2 .
Features and feature extraction techniques in EEG-based signal processing of sleep studies.

Table 3 .
Classification techniques in EEG-based signal processing for sleep studies.

Table 4 .
Feature selection and dimensionality reduction techniques.

Table 5 .
Number of epochs of various sleep states.

Table 5 .
Number of epochs of various sleep states.

Table 7 .
DT performance results.A cc : Accuracy; S e : Sensitivity; S p : Specificity.