analysis and classification of sleep stages based on difference visibility graphs from a single...

9
IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 18, NO. 6, NOVEMBER 2014 1813 Analysis and Classification of Sleep Stages Based on Difference Visibility Graphs From a Single-Channel EEG Signal Guohun Zhu, Yan Li, Member, IEEE, and Peng (Paul) Wen, Member, IEEE Abstract—The existing sleep stages classification methods are mainly based on time or frequency features. This paper classifies the sleep stages based on graph domain features from a single- channel electroencephalogram (EEG) signal. First, each epoch (30 s) EEG signal is mapped into a visibility graph (VG) and a horizontal VG (HVG). Second, a difference VG (DVG) is obtained by subtracting the edges set of the HVG from the edges set of the VG to extract essential degree sequences and to detect the gait- related movement artifact recordings. The mean degrees (MDs) and degree distributions (DDs) P (k) on HVGs and DVGs are ana- lyzed epoch-by-epoch from 14,963 segments of EEG signals. Then, the MDs of each DVG and HVG and seven distinguishable DD val- ues of P (k) from each DVG are extracted. Finally, nine extracted features are forwarded to a support vector machine to classify the sleep stages into two, three, four, five, and six states. The accuracy and kappa coefficients of six-state classification are 87.5% and 0.81, respectively. It was found that the MDs of the VGs on the deep sleep stage are higher than those on the awake and light sleep stages, and the MDs of the HVGs are just the reverse. Index Terms—Classification, degree distribution (DD), differ- ence visibility graph (DVG), electroencephalogram (EEG), single channel. I. INTRODUCTION E FFICIENTLY identifying sleep stages is beneficial for the treatment of sleep apnea, insomnia and narcolepsy. Polysomnogram (PSG) techniques are applied to the diagno- sis and treatment of sleep disorders. The classification of sleep stages is traditionally performed by experts based on the vi- sual interpretation of the PSG according to Rechtschaffen’s and Kales’s (R&K) recommendations [1] or a new guideline devel- oped by the American academy of sleep medicine (AASM) [2]. This study uses six-state sleep stages in R&K standard: awake (Awa), stage 1 (S1), stage 2 (S2), stage 3 (S3), stage 4 (S4), and rapid eye movement (REM). The five-state stages combine S3 and S4 as a slow wave sleep (SWS) stage in six-state, the four-state stages join S1 and S2 in five-state. And stages S1, S2, Manuscript received June 7, 2013; revised November 9, 2013 and January 24, 2014; accepted January 27, 2014. Date of publication February 6, 2014; date of current version November 3, 2014. G. Zhu is with the University of Southern Queensland, Toowoomba, Qld. 4350, Australia, and also with the Guilin University of Electronic Technology, Guangxi 541004, China (e-mail: [email protected]). Y. Li and P. Wen are with the University of Southern Queensland, Toowoomba, Qld. 4350, Australia (e-mail: [email protected]; [email protected]). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/JBHI.2014.2303991 S3 and S4 are denoted as non-REM (NREM). The three-state stages include Awa, NREM, and REM. The manual scoring is subject to human errors and it is time consuming. An automatic identification of the sleep stages would reduce time dramatically and generate reliable results. The existing sleep stages analysis and classifying methods are mainly based on time or frequency domain features from elec- troencephalogram (EEG), electrooculogram (EOG), and elec- tromyogram (EMG) signals [3]–[7]. Using discriminant anal- ysis techniques based on different frequency bands of EEG, power of EMG, and variances of EOG, the accuracy of the sleep stages scoring can reach 74% for five-state classification [3]. Anderer et al. [4] applied EEG, EOG and EMG features to ob- tain 80% accuracy six-state sleep classification. Chapotot and Becq [5] applied EEG and EMG as features and obtained a 78% accuracy for six-state sleep classification. Charbonnier et al. [6] employed EEG, EMG, and EOG as features and obtained 85.5% accuracy for five-state classification. Zhu et al. [7] presented a visibility graph (VG) similarity method to perform a seven- state (six-state plus body movements stage) classification with an 82.64% accuracy based on EEG and EOG features. Multichannel EEG equipment often place limitations on the subject’s movement and it is more difficult to use in ambula- tory environment than those employed single-channel devices. Therefore, more researchers have focused on classifying sleep stages with a single-channel EEG signal [8]–[14] or single lead ECG (electrocardiogram) signal [15]. Flexer et al. [9] used a hidden Markov model to obtain 80% accuracy for three-state sleep stages. Berthomier et al. [10] presented a fuzzy logic iter- ative method to perform a five-state sleep stages classification with a 82.9% accuracy. Jo et al. [14] introduced a fuzzy clas- sifier to identify four-state sleep stages with a 84.6% accuracy. Ronzhina et al. [8] used power spectral density (PSD) features and an artificial neural network (ANN) classifier to obtain an accuracy of 76.7% for six-state sleep stages classification. Frai- wan et al. [13] applied a random forest classifier and wavelet features to identify the wakeful state with a 90% accuracy. How- ever, unless applying an extensive number of diverse extracted features, it is difficult to obtain a higher accuracy that is even close to the accuracy levels achieved by experts using manual techniques [16], [17], which is 83 ± 3% [5]. Therefore, auto- matic sleep classification is still a challenge [17], especially for identifying sleep stages with a single-channel EEG signal. Recently, VGs, which were first proposed by Lacasa et al. [18] have been employed to analyze EEG signals [7], [19], [20]. VGs have also been employed by Shao [21] to study heartbeat interval 2168-2194 © 2014 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications standards/publications/rights/index.html for more information.

Upload: muchamad-malik

Post on 14-Aug-2015

106 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Analysis and classification of sleep stages based on difference visibility graphs from a single channel eeg signal

IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 18, NO. 6, NOVEMBER 2014 1813

Analysis and Classification of Sleep StagesBased on Difference Visibility GraphsFrom a Single-Channel EEG Signal

Guohun Zhu, Yan Li, Member, IEEE, and Peng (Paul) Wen, Member, IEEE

Abstract—The existing sleep stages classification methods aremainly based on time or frequency features. This paper classifiesthe sleep stages based on graph domain features from a single-channel electroencephalogram (EEG) signal. First, each epoch(30 s) EEG signal is mapped into a visibility graph (VG) and ahorizontal VG (HVG). Second, a difference VG (DVG) is obtainedby subtracting the edges set of the HVG from the edges set of theVG to extract essential degree sequences and to detect the gait-related movement artifact recordings. The mean degrees (MDs)and degree distributions (DDs) P (k) on HVGs and DVGs are ana-lyzed epoch-by-epoch from 14,963 segments of EEG signals. Then,the MDs of each DVG and HVG and seven distinguishable DD val-ues of P (k) from each DVG are extracted. Finally, nine extractedfeatures are forwarded to a support vector machine to classify thesleep stages into two, three, four, five, and six states. The accuracyand kappa coefficients of six-state classification are 87.5% and 0.81,respectively. It was found that the MDs of the VGs on the deep sleepstage are higher than those on the awake and light sleep stages, andthe MDs of the HVGs are just the reverse.

Index Terms—Classification, degree distribution (DD), differ-ence visibility graph (DVG), electroencephalogram (EEG), singlechannel.

I. INTRODUCTION

E FFICIENTLY identifying sleep stages is beneficial forthe treatment of sleep apnea, insomnia and narcolepsy.

Polysomnogram (PSG) techniques are applied to the diagno-sis and treatment of sleep disorders. The classification of sleepstages is traditionally performed by experts based on the vi-sual interpretation of the PSG according to Rechtschaffen’s andKales’s (R&K) recommendations [1] or a new guideline devel-oped by the American academy of sleep medicine (AASM) [2].This study uses six-state sleep stages in R&K standard: awake(Awa), stage 1 (S1), stage 2 (S2), stage 3 (S3), stage 4 (S4),and rapid eye movement (REM). The five-state stages combineS3 and S4 as a slow wave sleep (SWS) stage in six-state, thefour-state stages join S1 and S2 in five-state. And stages S1, S2,

Manuscript received June 7, 2013; revised November 9, 2013 and January24, 2014; accepted January 27, 2014. Date of publication February 6, 2014; dateof current version November 3, 2014.

G. Zhu is with the University of Southern Queensland, Toowoomba, Qld.4350, Australia, and also with the Guilin University of Electronic Technology,Guangxi 541004, China (e-mail: [email protected]).

Y. Li and P. Wen are with the University of Southern Queensland, Toowoomba,Qld. 4350, Australia (e-mail: [email protected]; [email protected]).

Color versions of one or more of the figures in this paper are available onlineat http://ieeexplore.ieee.org.

Digital Object Identifier 10.1109/JBHI.2014.2303991

S3 and S4 are denoted as non-REM (NREM). The three-statestages include Awa, NREM, and REM.

The manual scoring is subject to human errors and it istime consuming. An automatic identification of the sleep stageswould reduce time dramatically and generate reliable results.The existing sleep stages analysis and classifying methods aremainly based on time or frequency domain features from elec-troencephalogram (EEG), electrooculogram (EOG), and elec-tromyogram (EMG) signals [3]–[7]. Using discriminant anal-ysis techniques based on different frequency bands of EEG,power of EMG, and variances of EOG, the accuracy of the sleepstages scoring can reach 74% for five-state classification [3].Anderer et al. [4] applied EEG, EOG and EMG features to ob-tain 80% accuracy six-state sleep classification. Chapotot andBecq [5] applied EEG and EMG as features and obtained a 78%accuracy for six-state sleep classification. Charbonnier et al. [6]employed EEG, EMG, and EOG as features and obtained 85.5%accuracy for five-state classification. Zhu et al. [7] presented avisibility graph (VG) similarity method to perform a seven-state (six-state plus body movements stage) classification withan 82.64% accuracy based on EEG and EOG features.

Multichannel EEG equipment often place limitations on thesubject’s movement and it is more difficult to use in ambula-tory environment than those employed single-channel devices.Therefore, more researchers have focused on classifying sleepstages with a single-channel EEG signal [8]–[14] or single leadECG (electrocardiogram) signal [15]. Flexer et al. [9] used ahidden Markov model to obtain 80% accuracy for three-statesleep stages. Berthomier et al. [10] presented a fuzzy logic iter-ative method to perform a five-state sleep stages classificationwith a 82.9% accuracy. Jo et al. [14] introduced a fuzzy clas-sifier to identify four-state sleep stages with a 84.6% accuracy.Ronzhina et al. [8] used power spectral density (PSD) featuresand an artificial neural network (ANN) classifier to obtain anaccuracy of 76.7% for six-state sleep stages classification. Frai-wan et al. [13] applied a random forest classifier and waveletfeatures to identify the wakeful state with a 90% accuracy. How-ever, unless applying an extensive number of diverse extractedfeatures, it is difficult to obtain a higher accuracy that is evenclose to the accuracy levels achieved by experts using manualtechniques [16], [17], which is 83 ± 3% [5]. Therefore, auto-matic sleep classification is still a challenge [17], especially foridentifying sleep stages with a single-channel EEG signal.

Recently, VGs, which were first proposed by Lacasa et al. [18]have been employed to analyze EEG signals [7], [19], [20]. VGshave also been employed by Shao [21] to study heartbeat interval

2168-2194 © 2014 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See http://www.ieee.org/publications standards/publications/rights/index.html for more information.

Page 2: Analysis and classification of sleep stages based on difference visibility graphs from a single channel eeg signal

1814 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 18, NO. 6, NOVEMBER 2014

signals and applied by Xiang et al. [22] to analyze ECG signals.In addition, one of the modified VG, the horizontal VGs (HVGs),have been used to distinguish chaotic series from random series[23]. Since EEG signals demonstrate chaotic behaviors [24],HVGs are able to represent the chaotic characteristics of EEGsaccording to the results from Luque et al. [23].

This paper presents a novel VG model to classify the sleepstages based on a single-channel EEG signal. First, each segmentEEG signal (Pz-Oz channel) is mapped into a VG and a HVG.Then, a difference VG (DVG) is constructed epoch-by-epochby subtracting the edges set of the HVG from the edges set ofthe VG. The mean degrees (MDs) of the VGs and the HVGs areevaluated and the degree distributions (DDs) of the DVGs arestudied. In total, there are 14,963 EEG segments to be analyzed.Then, the features of the MDs of the HVGs and the DVGs andthe seven optimal DDs of the DVGs are selected. Finally all theextracted features are forwarded to a support vector machine(SVM) to perform two-state, three-state, four-state, five-state,and six-state sleep stages EEG classification, respectively.

The remaining sections of this paper are organized as follows:the experimental data are described in the next section. The VG,the horizontal VG, and the difference visibility graph (DVG)are introduced in Section III. Section IV presents the experi-mental results. The performances of the proposed method ontwo-state, three-state, four-state, five-state, and six-state sleepstages classifications are also compared with the results reportedfrom other existing methods. Finally, the conclusions are drawnin Section V.

II. EXPERIMENTAL DATA

The experimental data used in this study were obtained fromthe Sleep-EDF database [25], [26], which was part of Phys-ionet data bank [27]. The eight data recordings from subjects:sc4002e0, sc4012e0, sc4102e0, sc4112e0, st7022j0, st7052j0,st7121j0, and st7132j0, were used in this paper. The first foursets of data were recorded in 1989 from ambulatory healthy vol-unteers and the last four sets of data were recorded in 1994 fromsubjects with mild difficulty falling asleep. The recorded datafrom each subject was saved in an EDF-File [28] and eachrecording included one horizontal EOG, two EEG channels(Fpz-Cz and Pz-Oz). These three channel signals were sam-pled in 100 Hz. In this study, the Pz-Oz channel EEG signal wasselected to analyze and identify the sleep stages because it canprovide better automatic classification accuracy than the Fpz-Czchannel [8], [10], [12]. Since the hypnogram was generated byexperts following the R&K recommendations [1] on every 30 sof EEG data, the interval of each segment (or epoch) in thisstudy is defined as 30 s, and contains 3000 data points.

The original sleep stages of these segments are labeled withone of the eight classes: AWA, S1, S2, S3, S4, REM and MVT(Movement time) and UNS (unknown states). Note that onlythe recordings: sc4002e0, sc4102e0 and st7121j0 have the MVTdata in the original EDF file. This study only deals with AWA,S1 to S4 and REM sleep stages.

The whole EEG data was divided into a training set and atesting set except for analyzing and 10-cross-validation classi-

TABLE IINFORMATION OF THE EXPERIMENTAL DATA

fying. The odd numbers of epochs were in the training set andthe others were in the testing set. The six sleep stages of thetraining and testing data are listed in Table I. It can be seenthat the numbers of the training epochs and testing epochs wereapproximately balanced.

III. METHODOLOGY

The structural diagram of the automatic sleep stages classifi-cation method proposed in this study is shown in Fig. 1. Eachsegment of the raw EEG signal was mapped into a VG anda HVG, without any frequency domain preprocessing. Then,a DVG was constructed based on the VG and HVG for eachof the EEG segments. The MDs of the DVG and the HVGwere calculated and the DDs of the DVG were evaluated. Sevendistinguishable DD values for each DVG were selected as therepresentative features. Then, the extracted features were for-warded to an SVM algorithm to perform two-state, three-state,four-state, five-state, and six-state sleep EEG classification, re-spectively.

The details of the methodology are described in the followingsubsections.

A. Visibility Graphs

Let G(V, E) be a graph, where V and E are the nodes andedges of the graph, respectively. A time series {xt}(t=1,...,n) ismapped into a graph G(V, E), while a data point xi is convertedinto a node vi in G. For any two points vi (i, xi) and vj (j, xj ),the edge between vi and vj is connected based on the ruleproposed by Lacasa et al. [18], that is

∀k ∈ (i, j) ;(xj − xk )

j − k>

(xj − xi)j − i

. (1)

Fig. 2 shows how a time series (7.3, 5.0, 6.2, 6.6, 5.7, 5.0,9.1) is transferred into a VG. v1 is the first node of the graphcorresponding to the first point with a value of 7.3. The degreek(i) is the number of connected edges of vi in a graph. The timeseries can be characterized with its degree sequence, MD, andDD of the VG. For example, the degree sequence of the VG inFig. 2 is (4, 2, 4, 5, 3, 3, 5). The MD kvg is the average of thedegree sequence, which is 3.71 in Fig. 2.

Page 3: Analysis and classification of sleep stages based on difference visibility graphs from a single channel eeg signal

ZHU et al.: ANALYSIS AND CLASSIFICATION OF SLEEP STAGES BASED ON DIFFERENCE VISIBILITY GRAPHS 1815

Fig. 1. Automatic sleep stages classification structural diagram.

Fig. 2. Illustration of a time series (upper part) converted into its VG (bottompart).

Fig. 3. Illustration of a time series (upper part) converted into its HVG (bottompart).

B. Horizontal Visibility Graphs

The horizontal visibility graph (HVG) was first introduced byLuque et al. [23]. It is a subset of a VG [29]. The nodes, vi andvj , in a HVG are connected if and only if

∀k ∈ (i, j) ; xj > xk and xi > xk . (2)

Fig. 3 shows the HVG of the same time series in Fig. 2. TheMD khvg in Fig. 3 is 3.14. It is noted that for the same timeseries, the nodes in a VG are the same as the nodes in a HVG.

HVGs have been characterized with some rigorous mathe-matical analysis by Gutin et al. [29]. Nunez et al. [30] reportedthat the MD of a periodic time series (period is T ) satisfies the

following equation:

khvg = 4(

1 − 12T

). (3)

Equation (3) implies that the MD khvg is close to 4 if theperiod T of a time series is large enough.

C. Difference Visibility Graphs

Let Gvg (V,E1) and Ghvg(V,E2) be a VG and a HVG asso-ciated with a time series {xt}, where, V is the node set, and E1and E2 are the edge sets of the VG and HVG.

The DVG Gdvg(V,E3) is a graph defined by E3 = E1 − E2 .For the same time series {xt} , Ghvg is a subset of Gvg , thedegree kdvg(i) of a DVG associated with a time point xi satisfies

kdvg(i) = kvg (i) − khvg(i) (4)

where kdvg(i), kvg (i), and khvg(i) are the degrees of node vi ofthe DVG, VG, and HVG, respectively. Thus, the MD of a DVGis equal to the MD of a VG minus the MD of a HVG.

DVGs could be beneficial to obtain the essential features ofinput signals than VGs and HVGs. It overcomes a pitfall thatthere are often many nodes with the degree value k = 2 on HVGsand VGs [31], which are not distinguishable enough to analyzethe different sleep stages using EEGs. For example, the degreesequence of HVG in Figs. 2 and 3 is (4, 2, 3, 4, 3, 2, 4), if nodesv1 , v4 , and v7 are considered as essential features. The degreesequence of a DVG in Figs. 2 and 3 is (0, 0, 1, 1, 0, 1, 1). Then, thenodes v3 , v4 , v6 , and v7 are obtained by selected the value one.The degree sequence of DVG is more essential in representingEEGs. Moreover, if a time series is constant, kdvg(i) is alwayszero, which can detect the disconnected telemetry link eventfrom EEG recordings.

D. Degree Distributions

The DD is a probability that a node has a degree of k. Itis obtained by counting the number of nodes having degree kdivided by the total number of nodes. Let Pvg (k) be denoted asthe DD of a VG, Phvg(k) as the DD of a HVG, and Pdvg(k) asthe DD of a DVG.

In Fig. 2, Pvg (k) =(0, 0, 1

7 , 27 , 2

7 , 27

), and in Fig. 3, Phvg(k) =(

0, 0, 27 , 2

7 , 27

). Therefore, for the time series in Figs. 2 and 3,

Pdvg(k) =( 3

7 , 47

). Unlike (4), Pdvg(k) �= Pvg (k) − Phvg(k).

Phvg(k) has been used to distinguish correlated stochastic,uncorrelated and chaotic processes by Lacasa and Toral [32].It has been shown by Shao [21] that Pvg (k) associated withECG approximately satisfies the power-law. Luque et al. [23]

Page 4: Analysis and classification of sleep stages based on difference visibility graphs from a single channel eeg signal

1816 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 18, NO. 6, NOVEMBER 2014

TABLE IIFEATURES SELECTED IN EACH MULTISLEEP STAGES CLASSIFICATION

proved that the HVGs on random signals satisfy exponentialdistribution rules. This study considers it as efficient featuresfor sleep stage classification.

E. Extracted Features for the Multisleep Stages Classification

Choosing appropriate features to represent the original EEGdata is the most important and difficult task in pattern recog-nition and classification. For multisleep stages classification, itis difficult to obtain high accuracies with the same feature setthat is used to identify different sleep stages, such as classifyingtwo-state sleep stages or classifying five-state sleep stages.

This study selected nine features: kdvg , khvg and seven otherDD values from Pdvg(k), in association with degrees (k) rang-ing from 0 to 12, to classify two-state to six-state sleep stages.Let p(k) be the value of the DD Pdvg(k) for a degree k. A spe-cific p(k) is selected due to its distinguishable difference fromother degree distribution values. The features used on each mul-tisleep stages classification are listed in Table II.

F. Reject Disconnected Telemetry Link EEGs With DVGs

As for the EEG data in PSG, it always contains some artifactsand the telemetry link was disconnected during recording insome cases. Some of artifacts or disconnected links were markedas UNS stage by experts in sleep-EDF database. However, notall disconnected links were defined as UNS stage. For example,in third epoch of the subject st7502j0, the state is AWA stage.Therefore, this study used the MD of DVGs to reject the artifactEEGs, when MD of DVGs associated with epoch EEGs is less5, the epoch is assigned as UNS even it is marked as AWA stagein EDF files.

G. Statistical Analysis

In order to evaluate the performance of the proposed method,the confusion matrix, accuracy, sensitivity and kappa coefficient(κ) proposed by Cohen [33] were computed to assess each multi-state sleep stages classification. The confusion matrix is a squarematrix showing the relation between experts scoring on sleepEEG classification and the outcomes obtained using the pro-posed algorithm. The values in the diagonal elements representthe number of correctly identified stages and the off-diagonalvalues are the number of misclassified ones. An element valuein row i and column j indicates the number of times sleep stagei was misclassified as sleep stage j.

The accuracy is the sum of the diagonal values in the confu-sion matrix divided by the sum of all the values in the confusionmatrix. The sensitivity is the number of a sleep stage was pos-itively identified by the proposed method divided by the totalnumber obtained by experts’ scoring for the same sleep stage.

The Kappa coefficient κ was used as a means of assessing theperformance agreement between the proposed method and theexperts. If the value of κ is greater than 0.80, it means a perfectagreement as suggested by Landis and Koch [34]. Otherwise aκ value between 0.61 to 0.80, 0.41 to 0.60, 0.21 to 0.40, and 0to 0.20 ranges, would represent substantial, moderate, fair, andslight agreement, respectively.

To test the differences between the MDs of the VGs andHVGs of six stages of sleep data, a non-parametric Wilcoxontest was also used because the distribution of sleep EEG datadoes not satisfy a normal distribution.

H. Multiclass SVM Classification

An SVM was applied to perform the multiple sleep stagesclassification. SVMs have been used in sleep stages classifica-tion by other researchers [7], [15], [35] previously. Using anSVM classifier, it is possible to conduct a linear space discrimi-nation or nonlinear classification by choosing a kernel function.There are four kernel functions: linear, polynomial kernel, rad-ical basis function (RBF), and sigmoid.

There are several types of SVMs. The LIBSVM [36] classifieris applied to identify the sleep stages in this paper. The SVMmodel was created by an R package e1071 [37] with RBF as akernel K(xi, xj ) = e−r |xi −xj |, where r = 0.78 in this study.

IV. EXPERIMENTS AND RESULTS

To evaluate the performances of the proposed approach dis-cussed in Section III, a set of experiments were conducted. Thefeatures extraction program was implemented in C.

The experiments consisted of four parts: 1) comparing theDDs of VGs, HVGs and DVGs; 2) analyzing the MD of theDVGs and HVGs; 3) conducting the two-state, three-state, four-state, five-state, and six-state sleep stages classifications basedon the extracted features; and 4) comparing the performancesof the proposed method with the results reported by the existingmethods.

A. Compared the DD of VG, HVG, and DVG

First, an example is provided to show that the DD could beused in sleep stage classification. Fig. 4 illustrates a VG, HVG,and DVG associated with two raw EEGs, which are comes fromepochs 312 and 346 of subject St7022j0, respectively. Fig. 4(c)and (e) illustrates how the differences among the DDs of a VG,an HVG, and a DVG can be used to classify the sleep stages S2and awake. Both X-axis and Y -axis in Fig. 4(c) and (e) on bothepochs are in log–log plot but Y -axis in Fig. 4(d) is in semi-logplot. In Fig. 4(c), the trajectory of epoch 312 for subject st7022j0from k = 6 to k = 50 is different from that in epoch 346. Phvg(k)of epoch 312 from k = 4 to k = 15 is also different from that inepoch 346. Note that the values of pdvg(k) from its trajectory

Page 5: Analysis and classification of sleep stages based on difference visibility graphs from a single channel eeg signal

ZHU et al.: ANALYSIS AND CLASSIFICATION OF SLEEP STAGES BASED ON DIFFERENCE VISIBILITY GRAPHS 1817

Fig. 4. The illustration of pv g (k), phvg (k), and pdvg (k) on epochs 312 and346 (AWA and S2 stages, respectively) of subject St7022j0. (The solid line anddashed line in (c), (d), and (e) are the trajectories of DD values on the two VGs,two HVGs, and two DVGs from epochs 312 and 346, respectively.)

are more distinguishable than those of Pvg (k) and Phvg(k) toseparate epochs 312 and 346. The phenomenon in Fig. 4(e)indicates that the DD of a DVG (Pdvg(k)) represents the originalEEGs better than the DD of a VG or a HVG (Pvg (k) or Phvg(k))for the sleep EEG classification. Therefore, this paper selectedseven extra distinguishable DD values from each DVG as theoptimal features to perform the sleep stages classification.

Second, the statistical (mean± SD) Pdvg(k) of six-state sleepstages from Pz-Oz channel EEG are shown in Fig. 5. It is notedthat the trajectories of Pdvg(k) of all sleep stages had goodpotential to represent the original sleeping EEG data when thedegree was from 0 to 3. As shown in Table II, Pdvg(k), p(0),p(1), p(2), and p(3) (for degrees 0 to 3) were chosen as the keyfeatures for each two-state classification, while p(4) was ignoredbecause p(4) in awake stage was overlapped by p(4) of othersleep stages. The DDs, p(0) to p(6), for degrees 0 to 6 wereselected for three-state and four-state classifications becausep(4) of the awake stage was not overlapped by p(4) of REMstage. During five-state and six-state classifications, p(11) wasselected as the representative features as it was quite differentin sleep stages S2, S3 and S4 with this degree (degree 11).

Fig. 5. Log–log plot of Pdvg (k) on six-state sleep classification associatedwith the Pz-Oz channel EEG data. X -axis and Y -axis use logarithmic scale.

Fig. 6. Box plot of the MDs of the VGs associated with six sleep stages of thePz-Oz channel EEG.

Fig. 7. Box plot of the MDs of the HVGs on six sleep stages of the Pz-Ozchannel EEG data.

B. Significant Characteristics of the MDs of DVGs and HVGson Two-Sleep Stages

The MDs from the HVGs and DVGs are the key featuresrepresenting the original EEG signal. The statistical MDs ofthe DVGs and HVGs associated with six-state sleep stages areshown in Figs. 6 and 7, respectively. Fig. 6 shows the MDpopulation on the DVGs associated with the Pz-Oz channelEEG data, obtained from 14,963 segments. It shows that theREM stage is similar to S1 stage.

Fig. 7 presents the statistical MD population on HVGs as-sociated with the same EEG data, obtained from the 14 963

Page 6: Analysis and classification of sleep stages based on difference visibility graphs from a single channel eeg signal

1818 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 18, NO. 6, NOVEMBER 2014

TABLE IIIRESULTS OF THE WILCOXON TEST ON THE MDS OF THE DVGS AND HVGS FOR

THREE PAIRS OF SLEEP STAGES

TABLE IVACCURACY OF TWO-STATE SEEP STAGES CLASSIFICATION BASED ON TWO

FEATURES, kdvg AND khvg

epochs. It shows that 3 < khvg < 4, which is consistent withthe theoretical analysis by Nunez et al. [30]. According to (3),the raw EEGs in the sleep stages include more low frequencycomponents than those in wake stage. The outcome is consistentwith the result reported by Achermann et al. [38] that the EEGis dominated by slow wave activities in the low frequency rangewhen sleeping.

The nonparametric Wilcoxon rank sum test was conductedagain to test the difference of the MDs of DVGs and HVGsassociated with three pairs of sleep stages: AWA and S1, S1and REM, S2 and REM. The results are listed in Table III. Theresults indicate that both MDs of the DVGs and HVGs on AWAand S1, S1 and REM, and S2 and REM were also significantlydifferent (p < 0.05).

Given the outcomes reported in Table III, the two featureskdvg and khvg were selected to perform the two-state sleep stagesclassification between the pairs of: awake and sleep, AWA andREM, S1 and REM, (S1, S2) and SWS, S1 and S2, and S3 andS4. Their accuracies are listed in Table IV.

C. Two-State, Three-State, Four-State, Five-State, andSix-State Sleep Stages Classifying Using MDs and DDs

To investigate the performance of the proposed method, thesleep-awake and other pairs of two-state sleep classificationswere evaluated. The accuracies of Awa-REM, NREM-REM,(S1, S2)-SWS, S1-S2, and S3-S4 are listed in Table V. Com-pared with Table IV, kappa coefficient of S1-REM sleep stageclassification increased nearly two times in Table V.

To demonstrate the performance of the proposed method, thethree-state to six-state classifications were evaluated. The clas-sification sensitivities of three-state (AWA, NREM, and REMstages) were 97.1%, 91.1%, and 74.1%, respectively, the kappa

TABLE VSLEEP STAGES CLASSIFICATION FOR TWO-STATE PAIRS WITH kdvg , khvg , AND

NINE DDS

TABLE VICONFUSION MATRIX AND SENSITIVITY ON FIVE-STATE SLEEP STAGES

TABLE VIICONFUSION MATRIX AND SENSITIVITY ON FIVE-STATE SLEEP STAGES

(WITHOUT AWAKE)

κ was 0.87 and accuracy was 92.6%. The recognition rates offour-state sleep stages were 97.0%, 73.4%, 81.3%, and 86.5%,respectively, while kappa κ was 0.83 and accuracy was 89.3%.The confusion matrix and sensitivities of five-state sleep scor-ing are listed in Table VI. The accuracy was 88.9% and kappaκ was 0.83. The accuracy was 87.5% in six-state classificationand kappa κ was 0.81.

A tenfold cross-validation was applied to evaluate the aver-age accuracy of five-state sleep stages classification, where thedataset included the training data and testing data.

The average 10 times of accuracy was 89.0%. The sensitivityof awake in Table VI achieves 98.8%, which imply the proposedmethod with Pz-Oz channel is efficient to identify the awakefrom sleep stages. This result confirms that the recommendationin AASM Manual [2] that arousal scoring is better detected fromoccipital and central EEG derivations. Now, let us only considerthe five-state sleep stages: S1, S2, S3, S4 and REM stages sleepclassification. The confusion matrix and sensitivities are listedin Table VII, the accuracy is 76.6% and kappa is 0.63. Whentenfold cross-validation was applied, 10 times average accuracyis 77.2%.

Page 7: Analysis and classification of sleep stages based on difference visibility graphs from a single channel eeg signal

ZHU et al.: ANALYSIS AND CLASSIFICATION OF SLEEP STAGES BASED ON DIFFERENCE VISIBILITY GRAPHS 1819

TABLE VIIICOMPARISON ACCURACIES OF THREE METHODS

Based on Tables V–VII, the results show that distinguishingS1 stage from REM, five-state with awake, and five-state withoutawake by the proposed method is 78.8%, 15.8%, and 27.4%,respectively. These results indicate that it is much harder todistinguish S1 and REM stages by using DVGs. However, ourresults agree with the conclusions reported by Corsi-Cabreraet al. in [39] that S1 stage was easily mistakenly categorized asany of AWA, S2 and REM stages.

D. Comparison of the Proposed Method With OtherSingle-channel Sleep Classification

To verify the performance of the proposed approach, thecomparisons of the classification results for two-state to six-state were conducted with two existing methods proposed byRonzhina et al. [8] and Berthomier et al. [10]. Both studiesused the same EEG datasets as in this paper. The comparisonperformances are listed in Table VIII.

The performances of the proposed method from two-state tosix-state sleep classifying were better than those in [8] and [10].Berthornier et al. [10] reported their sleep stages classificationresults using two sleep datasets: the sleep EDF dataset andtheir own sleeping recording data. Their reported accuracieswith first dataset were listed in Table VIII. The accuracies withtheir own sleep data were 96%, 92.1%, 84.9%, and 82.9%,respectively, for the two-state, three-state, four-state and five-state classifications. Both are lower than the results obtainedin this study. In additional, our testing results were obtainedfrom more EEG data segments and more numbers of epochsand subjects than those in [8], [10]

In addition, the accuracy of AWA-REM state classificationshown in Table V is better than that reported by Vatankhahet al. [35] using the same sleep-EDF database. Their accuracyis 98.15%. In fact, even only comparing the five-states sleepscoring without awake, our proposed method on is better thanthe reported by Tagluk et al. [40], which was 74.7% by crossvalidation and tested 265 epochs.

Finally, the proposed method of classifying performance onfive-state sleep scoring was compared with other existing results

TABLE IXCOMPARISON ACCURACIES OF KNOWN METHODS

on five-state sleep stages. The results are shown in Table IX. Theresearch reported by Liang et al. [12] and Hsu et al. [11] usedthe same EEG dataset. However, their classification accuracieswere lower than the proposed method and the number of epochson the data sets was also smaller than those used in this paper.

The average accuracies between deep sleep and paradoxicalsleep stages in Tables V and VI are higher than the accuracyobtained in inter-expert agreement, which is 83 ± 3% [5] and76.9% in [4]. The outcomes demonstrate that the features ex-tracted from DVGs are more robust and accurate.

V. CONCLUSION

This paper applies DVGs to study the sleep EEG signals, andidentifies the significant differences of MDs between DVGs andHVGs associated with the sleep EEG signals. It was found thatthe MDs of DVGs on the deep sleep stage are higher than thosein awake and light sleep states, while the MDs of HVGs are justthe opposite.

Based on the analyses from this study, the MDs from eachHVG and DVG and seven optimal values of the DD of a DVGassociated with sleep EEG signals were extracted to performtwo-state, three-state, four-state, five-state, and six-state sleepstages classifications. The tenfold cross-validation of five-statesleep scoring showed that the average accuracy was 89.0% with14,963 epochs EEGs. The accuracies are by far the best accu-racy reported on the sleep stages classification using more than10,000 epochs from the public sleep EEG dataset.

More important, this paper suggests that the graph domainfeatures can be efficiently used to analyze and classify sleepEEG without any frequency domain preprocessing or time do-main analysis. And it can also detect disconnected telemetry linkrecordings. The 97.9% accuracy sleep-wake classification sug-gests that our proposed method is efficient for single-channelsleep classification during human locomotion. However, thisstudy detects the EEG recordings in disconnected telemetry

Page 8: Analysis and classification of sleep stages based on difference visibility graphs from a single channel eeg signal

1820 IEEE JOURNAL OF BIOMEDICAL AND HEALTH INFORMATICS, VOL. 18, NO. 6, NOVEMBER 2014

link only by checking the MD of DVGs. Future work aims todenoise artifacts of EEGs effectively in graph domain.

ACKNOWLEDGMENT

The authors would like to thank B. Kemp for helping withdata discussions and three anonymous reviewers for helpfulcomments regarding the paper.

REFERENCES

[1] A. Rechtschaffen and A. Kales, A Manual Of Standardized Terminology,Techniques and Scoring Systems for Sleep Stages of Human Subjects,U. G. P. Office, Washington DC Public Health Service, 1968.

[2] C. Iber, S. Ancoli-Israel, A. L. Chesson, and S. F. Quan, The AASM Manualfor the Scoring of Sleep and Associated Events: Rules, Terminology andTechnical Specification, Westchester, USA: American Academy of SleepMedicine, 2007.

[3] A. Krakovska and K. Mezeiova, “Automatic sleep scoring: A search for anoptimal combination of measures,” Artif. Intell. Med., vol. 53, pp. 25–33,2011.

[4] P. Anderer, G. Gruber, S. Parapatics, M. Woertz, T. Miazhynskaia,G. Klosch, B. Saletu, J. Zeitlhofer, M. J. Barbanoj, and H. Danker-Hopfe,“An E-health solution for automatic sleep classification according toRechtschaffen and Kales: validation study of the Somnolyzer 24 × 7utilizing the Siesta database,” Neuropsychobiology, vol. 51, pp. 115–133,2005.

[5] F. Chapotot and G. Becq, “Automated sleep–wake staging combining ro-bust feature extraction, artificial neural network classification, and flexibledecision rules,” Int. J. Adaptive Control Signal Process., vol. 24, pp. 409–423, 2010.

[6] S. Charbonnier, L. Zoubek, S. Lesecq, and F. Chapotot, “Self-evaluatedautomatic classifier as a decision-support tool for sleep/wake staging,”Comput. Biol. Med., vol. 41, pp. 380–389, 2011.

[7] G. Zhu, Y. Li, and P. P. Wen, “An efficient visibility graph similarity al-gorithm and its application on sleep stages classification,” in Brain Infor-matics, F. Zanzotto, S. Tsumoto, N. Taatgen, and Y. Yao, Eds. vol. 7670,Berlin, Germany: Springer, 2012, pp. 185–195.

[8] M. Ronzhina, O. Janousek, J. Kolarova, M. Novakova, P. Honzık, andI. Provaznık, “Sleep scoring using artificial neural networks,” Sleep Med.Rev., vol. 16, pp. 251–263, 2012.

[9] A. Flexer, G. Gruber, and G. Dorffner, “A reliable probabilistic sleepstager based on a single EEG signal,” Artif. Intell. Med., vol. 33, pp. 199–207, 2005.

[10] C. Berthomier, X. Drouot, M. Herman-Stoıca, P. Berthomier, J. Prado,D. Bokar-Thire, O. Benoit, J. Mattout, and M.-P. D’ortho, “Automaticanalysis of single-channel sleep EEG: Validation in healthy individuals,”Sleep, vol. 30, pp. 1587–1595, Nov. 2007.

[11] Y.-L. Hsu, Y.-T. Yang, J.-S. Wang, and C.-Y. Hsu, “Automatic sleep stagerecurrent neural classifier using energy features of EEG signals,” Neuro-computing, vol. 104, pp. 105–114, 2013.

[12] S.-F. Liang, C.-E. Kuo, Y.-H. Hu, Y.-H. Pan, and Y.-H. Wang, “Automaticstage scoring of single-channel sleep EEG by using multiscale entropyand autoregressive models,” IEEE Trans. Instrum. Meas., vol. 61, no. 6,pp. 1649–1657, Jun. 2012.

[13] L. Fraiwan, K. Lweesy, N. Khasawneh, H. Wenz, and H. Dickhaus, “Auto-mated sleep stage identification system based on time–frequency analysisof a single EEG channel and random forest classifier,” Comput. MethodsPrograms Biomed., vol. 108, pp. 10–19, 2012.

[14] H. G. Jo, J. Y. Park, C. K. Lee, S. K. An, and S. K. Yoo, “Genetic fuzzyclassifier for sleep stage identification,” Comput. Biol. Med., vol. 40,pp. 629–634, 2010.

[15] M. Adnane, Z. Jiang, and Z. Yan, “Sleep–wake stages classification andsleep efficiency estimation using single-lead electrocardiogram,” ExpertSyst. Appl., vol. 39, pp. 1401–1413, 2012.

[16] N. Sukhorukova, A. Stranieri, B. Ofoghi, P. Vamplew, M. Saleem, L. Ma,A. Ugon, J. Ugon, N. Muecke, H. Amiel, C. Philippe, A. Bani-Mustafa,S. Huda, M. Bertoli, P. Levy, and J.-G. Ganascia, “Automatic sleep stageidentification: difficulties and possible solutions,” presented at the 4th Aus-tralasian Workshop Health Informat. Knowl. Manag., vol. 108, Brisbane,Australia, 2010.

[17] C. Berthomier and M. Brandewinder, “Sleep scoring: man ver-sus machine?” Sleep Breathing, vol. 17, pp. 461–462, May2013.

[18] L. Lacasa, B. Luque, F. Ballesteros, J. Luque, and J. C. Nuno, “From timeseries to complex networks: The visibility graph,” in Proc. Nat. AcademySci., Apr. 1 2008, vol. 105, pp. 4972–4975.

[19] X. Tang, L. Xia, Y. Liao, W. Liu, Y. Peng, T. Gao, and Y. Zeng, “Newapproach to epileptic diagnosis using visibility graph of high-frequencysignal,” Clinical EEG Neuroscience, vol. 44, pp. 150–156, Mar. 17, 2013.

[20] M. Ahmadlou, H. Adeli, and A. Adeli, “New diagnostic EEG markersof the Alzheimer’s disease using visibility graph,” J. Neural Transmiss.,vol. 117, pp. 1099–1109, 2010.

[21] Z.-G. Shao, “Network analysis of human heartbeat dynamics,” Appl. Phys.Lett., vol. 96, pp. 073703-1–073703-3, 2010.

[22] L. Xiang, Y. Dong, L. Xin, and W. Xiao-Mei, “Bridging time series dy-namics and complex network theory with application to electrocardio-gram analysis,” IEEE Circuits Syst. Mag., vol. 12, no. 4, pp. 33–46, Nov.2012.

[23] B. Luque, L. Lacasa, F. Ballesteros, and J. Luque, “Horizontal visibilitygraphs: Exact results for random time series,” Phys. Rev. E, vol. 80,pp. 046103-1–046103-11, 2009.

[24] H. Korn and P. Faure, “Is there chaos in the brain? II. Experimentalevidence and related models,” Comptes Rendus Biol., vol. 326, pp. 787–840, 2003.

[25] B. Kemp. (2013, Jun.). The Sleep-EDF Database [Onlne]. Available:http://www.physionet.org/physiobank/database/sleep-edf/

[26] B. Kemp, A. H. Zwinderman, B. Tuk, H. A. C. Kamphuisen, andJ. J. L. Oberye, “Analysis of a sleep-dependent neuronal feedback loop:the slow-wave microcontinuity of the EEG,” IEEE Trans. Biomed. Eng.,vol. 47, no. 9, pp. 1185–1194, Sep. 2000.

[27] A. L. Goldberger, L. A. N. Amaral, L. Glass, J. M. Hausdorff,P. C. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, andH. E. Stanley, “PhysioBank, physiotoolkit, and physionet: components ofa new research resource for complex physiologic signals,” Circulation,vol. 101, pp. e215–e220, Jun. 13, 2000.

[28] B. Kemp, A. Varri, A. C. Rosa, K. D. Nielsen, and J. Gade, “Asimple format for exchange of digitized polygraphic recordings,”Electroencephalogr. Clinical Neurophysiol., vol. 82, pp. 391–393,1992.

[29] G. Gutin, T. Mansour, and S. Severini, “A characterization of horizontalvisibility graphs and combinatorics on words,” Phys. A: Stat. Mechan.Appl., vol. 390, pp. 2421–2428, 2011.

[30] A. M. Nunez, L. Lacasa, E. Valero, J. P. Gomez, and B. Luque, “Detectingseries periodicity with horizontal visibility graphs,” Int. J. BifurcationChaos, vol. 22, pp. 1250160-1–1250160-10, 2012.

[31] R. Donner and J. Donges, “Visibility graph analysis of geophysical timeseries: Potentials and possible pitfalls,” Acta Geophysica, vol. 60, pp. 589–623, Jun. 1, 2012.

[32] L. Lacasa and R. Toral, “Description of stochastic and chaotic series usingvisibility graphs,” Phys. Rev. E, vol. 82, pp. 036120-1–036120-11, 2010.

[33] J. Cohen, “A coefficient of agreement for nominal scales,” EducationalPsychol. Meas., vol. 20, pp. 37–46, 1960.

[34] J. R. Landis and G. G. Koch, “The measurement of observer agree-ment for categorical data,” Biometrics, vol. 33, pp. 159–174,1977.

[35] M. Vatankhah, M. Akbarzadeh Totonchi, A. Moghimi, and V. Asadpour,“GA/SVM for diagnosis sleep stages using non-linear and spectral fea-tures,” in Soft Computing in Industrial Applications, vol. 75, X.-Z. Gao,A. Gaspar-Cunha, M. Koppen, G. Schaefer, and J. Wang, Eds. Berlin,Germany: Springer, 2010, pp. 175–184.

[36] C.-C. Chang and C.-J. Lin, “LIBSVM: A library for support vec-tor machines,” ACM Trans. Intell. Syst. Technol., vol. 2, pp. 1–27,2011.

[37] A. Karatzoglou, D. Meyer, and K. Hornik, “Support vector machines inR,” J. Statistical Softw., vol. 15, pp. 1–28, 2006.

[38] P. Achermann and A. A. Borbely, “Low-frequency (<1 Hz) oscillations inthe human sleep electroencephalogram,” Neuroscience, vol. 81, pp. 213–222, 1997.

[39] M. Corsi-Cabrera, Z. Munoz-Torres, Y. Del Rıo-Portilla, andM. A. Guevara, “Power and coherent oscillations distinguish REM sleep,stage 1 and wakefulness,” Int. J. Psychophysiol., vol. 60, pp. 59–66,2006.

[40] M. E. Tagluk, N. Sezgin, and M. Akin, “Estimation of sleep stages by anartificial neural network employing EEG, EMG and EOG,” J. Med. Syst.,vol. 34, pp. 717–725, 2010.

Page 9: Analysis and classification of sleep stages based on difference visibility graphs from a single channel eeg signal

ZHU et al.: ANALYSIS AND CLASSIFICATION OF SLEEP STAGES BASED ON DIFFERENCE VISIBILITY GRAPHS 1821

Guohun Zhu received the B.S. degree in automa-tion from Guilin University of Electronic Technology,Guangxi, China, in 1994. He is currently working to-ward the Ph.D. degree in Faculty of Health, Engineer-ing and Sciences, University of Southern Queensland,Toowoomba, Qld., Australia.

Since 2006, he has been an Associate Professorwith the School of Electronic Engineering and Au-tomation, Guilin University of Electronic Technol-ogy. His current research interests include biomedicalsignal and image processing, computation biology,

graph theory and complex network, computer networks, machine learning, andpattern recognition.

Yan Li (M’06) received the B.Sc. and M.Sc. degreesfrom Huazhong University of Science and Technol-ogy, Wuhan, China, and the Ph.D. degree from theFlinders University, Bedford Park, SA, Australia.

She is currently an Associate Professor in theSchool of Agricultural, Computational and Environ-mental Sciences, University of Southern Queensland,Toowoomba, Qld., Australia. Her research interestsinclude blind signal processing, pattern recognition,computational intelligence, and EEG research.

Peng (Paul) Wen (M’06) received the B.S. and M.S.degrees from Huazhong University of Science andTechnology, Wuhan, China, in 1983 and 1986, re-spectively, and the Ph.D. degree from the FlindersUniversity, Bedford Park, SA, Australia, in 2001.

He is currently an Associate Professor in theSchool of Mechanical and Electrical Engineering,University of Southern Queensland, Toowoomba,Qld., Australia. His current research interests includecontrol and instrument, modeling and simulation, ar-tificial intelligence, and biomedical engineering.