Sleep Apnea Detection Using Adaptive Neuro Fuzzy Inference System

This paper presents an efficient and easy implemented method for detecting minute based analysis of sleep apnea. The nasal, chest and abdominal based respiratory signals extracted from polysomnography recordings are obtained from PhysioNet apnea-ECG database. Wavelet transforms are applied on the 1-minute and 3-minute length recordings. According to the preliminary tests, the variances of 10 th and 11 th detail components can be used as discriminative features for apneas. The features obtained from total 8 recordings are used for training and testing of an adaptive neuro fuzzy inference system (ANFIS). Training and testing process have been repeated by using the randomly obtained five different sequences of whole data for generalization of the ANFIS. According to results, ANFIS based classification has sufficient accuracy for apnea detection considering of each type of respiratory. However, the best result is obtained by analyzing the 3-minute length nasal based respiratory signal. In this study, classification accuracies have been obtained greater than 95.2% for each of the five sequences of entire data.


Introduction
Sleep apnea is a common respiratory disorder that affects people by stopping breathing during their sleep [1].It is a crucial problem occurred approximately 4% in men and 2% in women of the people between the ages of 30 and 60 years [2].A sleep apnea episode is defined as the complete disruption or near disruption of breathing more than 10 s in an adult [3].Patients with sleep apnea could suffer from daytime sleepiness, tiredness, low concentration and exhaustion [4].
Currently, analysis of the patient's polysomnography (PSG) is considered as the effective diagnosis of the sleep apnea [5].PSG requires overnight recordings of several electrophysiological signals during a night's sleep such as electrocardiogram, respiratory effort, airflow, etc. in sleep laboratories using specific systems and participating personnel [6].To derive respiration from electrocardiography (ECG) which is a simple, low cost and non-invasive recording is an alternative way.The correctness of such an idea using the comparison example recordings of the ECG derived respiration (EDR) with common respiration measurements are showed in Moody et al. work [7].Thus, different methods have been proposed to derive respiratory signal from the ECG [8][9][10].Numerous studies show that EDR methods using the band-pass filter application can be accepted as the most successful methods in the field of apnea detection [11,12].
Numerous methods are available in the literature to detect sleep apnea based on the evaluation of PSG [13][14][15][16].These methods are mostly based on analysis of the frequency and amplitude.These algorithms can detect sleep apnea at 80% -90% precision [17].There are several algorithms for the detection of sleep apnea based on the evaluation of the EDR signals [18][19][20].
The aim of this work is to evaluate the performance of the sleep apnea detection methods based on the analysis of the EDR signal and respiratory signals.Features obtained by wavelet decomposition of derived and measured signals are classified by an ANFIS for real time sleep apnea detections.Preliminary research in the field of PSG is made by authors [21].
This paper presents new results for detection of sleep apnea using wavelet analysis with adaptive neuro fuzzy inference system.In Section 2, materials and methods are introduced including brief data description, derivation of EDR, wavelet based feature extraction and ANFIS classification method.Experimental results are discussed in Section III and the paper will be concluded in Section IV with summarized results.

Materials and Methods
For the evaluation of the proposed algorithm, PSG recordings of 8 sleep apnea subjects were used.Recording were acquired from Apnea-ECG database in the Physio-Net databank.It is an online library of physiologic data and analytic tool sponsored by the US National Institutes of Health [22].

Data
The free distribution Apnea-ECG Database was used to evaluate our approach in this study, combined for the PhysioNet/Computers in Cardiology Challenge 2000 [19].The database contains 70 ECG recordings, sampled at 100 Hz, approximately 8 hours long each, with appending annotations acquired from a study of simultaneously recorded respiration signals.Only 8 of them include respiration signals (age: 43.3 ± 8.3 years, 7 M and 1F).The apnea annotation in the recordings was done by sleep disorder experts using standard criteria with respiration signals analysis (nasal airflow, abdominal and oxygen saturation).So, each minute of the recording has label as 'A' or 'N' and it indicates the existence or non-existence of apnea respectively during that min.
A minute is classified as apneic if apnea was in advance at the beginning of the related minute; otherwise, it is classified as normal.The apnea/hypopnea standards (AHI) are used to classify a minute as apneic or normal by calculating the number of apneic minutes over a given recording and averaging these counts on a per-hour basis [23].

Derivation of EDR
EDR signal is derived using band-pass filter method over the ECG signal in the respiratory frequency band for the first time (normally 0.2 -0.4 Hz).Boyle et al. [24] specify that a band-pass filter of 0.2 -0.8 Hz provides a more accurate respiratory signal than a band-pass filter of 0.2 -0.4 Hz.Therefore, EDR signal is derived from 1-minute and 3 minutes length ECG recording by using a bandpass filter of 0.2 -0.8 Hz.

Feature Extraction by Wavelet Analysis
Wavelet transform is a practical computational method for a several image and signal processing implementations.Wavelet transform uses multi-resolution technique and breaks the signal into low and high frequency [25,26].Wavelet is a linear, quick transform with the idea of describing a time scale show of a signal by decomposing it onto a set of basic functions.These functions are suitable for the analysis of non-stationary signals because of synchronic localization in time and scale [27].For a given signal x(t), wavelet decomposition is given as be-low: In ( 1), is approximation coefficients at level N and  , (j = 1, …, N) is detail coefficients at level j.The function ( ) t ψ is the wavelet function and ( ) t ψ is a scaling function [28].
Some different types of wavelets functions can be used to obtain the decomposition.Empirically, it was specified that the best classification result was obtained in this work by using the variances of the level-10 and level-11 detail coefficients.In spite of experimentation using different wavelet family and detail coefficients at different levels, the results were prominently worse.Daubechies [29] wavelet is selected to decomposition with length of the filter equal to 3.

ANFIS Based Classification
ANFIS model has been used as a classifier in this work.ANFIS is a classifier like a neural network that uses fuzzy inference system.ANFIS concatenates fuzzy logic principles and neural networks.ANFIS has a set of fuzzy if-then rules with suitable membership functions to generate the input-output values.ANFIS is a hybrid classifier that uses a learning algorithm to specify parameters of Sugeno-type fuzzy inference systems.It implies both of the least-square method and the back-propagation gradient descent method for training fuzzy inference system membership function parameters.
ANFIS consists of five layers to generate inference system.These layers are fuzzification layer, inferences process, defuzzification layer and summation layer, respectively.Typical architecture of ANFIS is shown by ing and testing process have been repeated by using the randomly generated 5 different sequences from whole data for generalization of the ANFIS.

Experimental Results
Feature vectors as 1-minute and 3-minute sections were extracted from datasets.Totally 3235 and 32,191-minute and 3-minute based feature vectors were obtained using annotations of the data sets.By using the randomly obtained 5 different sequences of the data set with its related outputs which are annotated originally, ANFIS has been formed and trained for each of data sequences.The classification accuracies due to the obtained 1-minute and 3-minute based classification results for chest, nasal and abdominal respiratory signals are given in Tables 1  and 2, respectively.
According to the results given in Table 1, abdominal respiratory signal based classification has the best performance.Due to the results given in Table 2, nasal respiratory signal based classification has the best performance.However, chest respiratory signal based classification has the lowest accuracy values for both of the 1-minute and 3-minute based classification.

Discussion and Conclusion
In this study, an efficient and easy implementation method for detecting minute based analysis of sleep apnea has been proposed.The nasal, chest and abdominal based respiratory signals extracted from polysomnography re-cordings have been obtained from PhysioNet apnea-ECG database.Wavelet transforms have been applied on the 1-minute and 3-minute length recordings.According to the preliminary tests, the variances of 10 th and 11 th detail components can be used as discriminative features for apneas.The features obtained from total 8 recordings have been used for training and testing of an adaptive neuro fuzzy inference system (ANFIS).Training and testing process have been repeated by using the randomly obtained five different sequences of whole data for generalization of the ANFIS.According to results, ANFIS based classification has sufficient accuracy for apnea detection considering of each type of respiratory.However the best result has been obtained by analyzing the 3-minute length nasal based respiratory signal.In this study, classification accuracies have been obtained greater than 95.2% for each of the five sequences of entire data.Due to the results of the 1-minute based analysis, the classification accuracies of ANFIS have obtained between 80.6% -81.5%, 89.2% -90.9%, 90.8% -92.9% and 88.6% -90.4% respectively for the chest, nasal, abdominal respiratory and EDR signals.For the analysis of 3-minute length data, the classification accuracies have obtained between 84.8% -86.5%, 95.2% -96.5%, 93.4% -95.4% and 92.0%-94.0%, respectively.According to these results, both of the 1-minute and 3-minute length of chest, nasal, abdominal based respiratory and EDR signals can be used sufficiently for proposed method.However the best result can be obtained by analyzing the section of the 3-minute length nasal based respiratory

Table 2 . ANFIS based classification accuracies for the analysis of 3-minute length signal.
Due to the results given in Tables1 and 2; all the accuracy scores related to the data sets X1-X5; the trained network is a generalized network that can be used for sleep apnea detection.As a future work, it is planned to develop a new diagnosing method for sleep apnea using different classifiers and feature extraction methods.