Sleep prediction using data from oximeter, accelerometer and snoring for portable monitor obstructive sleep apnea diagnosis

Patients and data collectionThe study included patients recruited in the validation study of the Biologix system against PSG. Full details of the protocol have been published elsewhere5. The local ethics committee (Comissão de Ética para Análise de Projetos de Pesquisa do HCFMUSP – CAPPesq) approved the protocol (SDC 4515/17/015), and all patients gave their informed consent. The study has been performed in accordance with the Declaration of Helsinki. Briefly, we studied patients with suspected OSA referred for overnight-laboratory PSG at the Sleep Laboratory of the Heart Institute (InCor).PSG included recording of the electroencephalogram (EEG) central (C) and occipital (O) channels referred to the auricular channel (A) (C3/A2, C4/A1, O1/A2, O2/A1), electrooculogram (EOG), submental electromyogram (EMG), left and right anterior tibialis EMG, electrocardiogram, thoraco-abdominal effort, oronasal airflow (thermistor and nasal pressure based airflow measurement), oxygen saturation (\(\hbox {SpO}_2\)) with pulse oximetry, and body position (EMBLA S7000, Embla Systems, USA and Alice 5, Respironics Inc., USA)5. Two certified technicians independently analyzed all PSG studies. Hypopnea was defined as a drop in the peak signal excursion of \(\ge\) 30% from the pre-event baseline nasal pressure signal lasting for at least 10 seconds. Respiratory events were scored according to the American Academy of Sleep Medicine criteria (\(\ge\) 3% reduction in \(\hbox {SpO}_2\) from the pre-event baseline or an event associated with arousal). OSA was classified based on current standards as follows: absence of OSA (AHI < 5 events/hour), mild OSA (5 \(\le\) AHI < 15 events/hour), moderate OSA (15 \(\le\) AHI < 30 events/hour), and severe OSA (AHI \(\ge\) 30 events/hour).Simultaneously, the patients also wore a high-resolution oximeter (\(\hbox {Oxistar}^{\textrm{TM}}\), Biologix Sistemas S.A., Brazil) with built-in accelerometer linked by Bluetooth to a smartphone app that recorded snoring. The \(\hbox {Oxistar}^{\textrm{TM}}\) firmware captures data at a rate of 100 samples per second, providing beat-to-beat raw \(\hbox {SpO}_2\) measurements with a precision of 0.1%. To smooth the data, a moving average over 4 heartbeats was applied. Oxygen desaturations are calculated providing the ODI. The ODI was calculated as the number of desaturations (\(\ge 3\%\) reduction in \(\hbox {SpO}_2\)) per hour, using either total recording time or total sleep time. The oximeter information was sent to the cloud, and automatically analyzed (Fig. 1). The PSG and Biologix data were time-synchronized.Fig. 1Biologix system. The wireless oximeter connects via Bluetooth to the smartphone’s Biologix application. The data is sent to the cloud and automatically analyzed by the algorithm.ANN algorithmANN are algorithms based on the biological structure of the human brain, in which several neurons are connected7,8. These neurons are divided into at least three layers: inputs, a variable number of hidden layers, and outputs. Each of these layers is connected to the next layer by an activation function, a weight associated with its signal, and a bias8. To build and validate our ANN algorithm, we used data derived from the Biologix system including oximeter (\(\hbox {SpO}_2\), heart rate [HR]), with built- in accelerometer (movement), and smartphone app (snoring). Snoring was obtained by recording the audio of the environment performed by the smartphone app and processed by another neural network. This algorithm provides a binary output indicating whether the patient is snoring or not during the audio recording stretches, similar to other approaches found in the literature9. The k-fold cross-validation method (k=10) was used to build and validate the ANN algorithm10,11. The sleep studies were randomly divided into 10 folds, with each fold used for cross-validation to ensure that all studies were both trained and tested across multiple iterations. In each fold, the training and test datasets were employed to optimize the weights and biases, reducing the error between the predicted value by the neural network results. The gold standard for sleep classification was a binary variable (sleep or awake) determined by PSG epochs of 30 seconds. The process starts with a forward pass for initial values of weight and bias and for pre-defined activation functions. Outputs are then calculated, and errors are determined. In the next step, the values of weights and biases are redefined through a process called backpropagation12. Using the newly calculated values, the process is redone. This occurs recursively until a maximum number of iterations8,13. Our model consists of an input layer, one hidden layer and an output layer. The input layer has 97 neurons, the hidden layer has 128 neurons and a ReLU (rectified linear unit)14 activation function. Finally, the output layer has 1 neuron and a sigmoid activation function (Fig. 2). In order to test the accuracy of the accelerometer alone in predicting sleep, another ANN model was built using only the accelerometer channel, with 23 neurons in the input layer, while the other layers remained the same.Fig. 2Artificial neural network algorithm diagram. The 97 input features were extracted from the channels, processed by the hidden layer with 128 neurons, resulting in a single neuron output that predicted whether the patient was sleep or awake. \(\hbox {SpO}_2\) oxygen saturation, ReLU rectified linear unit.FeaturesThe first step was the treatment of missing values (less than 1% of the data was missing), which consisted of replacing these values by zero, in the case of the accelerometer, and by the maximum values for the cases of \(\hbox {SpO}_2\) and HR. Subsequently, the features were calculated using epochs of 30-seconds synchronize to PSG epochs. The features used in the model were calculated based on the signals obtained by the Biologix system and included \(\hbox {SpO}_2\), HR, movement detected by the accelerometer, and snoring detected by the smartphone app. The \(\hbox {SpO}_2\) features were: (1) presence or absence of oxygen desaturation, expressed as a binary variable; (2) desaturation range; (3) \(\hbox {SpO}_2\) quartile (75th) as a measure of the tendency of the patient’s \(\hbox {SpO}_2\) values during sleep. The HR signal provided several features: (1) average pulse interval; (2) standard deviation of HR; (3) HR variability (HRV) time domain features (SDNN, RMSSD, PNN50, SD1, SD2); (4) HRV frequency domain features (LF power, HF power, LF/HF ratio). The accelerometer data generated multiple features: (1) variance; (2) root mean square (RMS); (3) skewness; (4) kurtosis. Other variables of interest associated with snoring, obtained by the Biologix app, were also used, which improved the performance of the machine learning model. In addition, some of these features were considered shifted in relation to the current time step for the better composition of the predictive model, totaling 97 inputs for the neural network model summarized in the Table 1. Finally, the data was standardized by removing the mean and scaling to unit variance15,16.$$\begin{aligned} z = \frac{(x – u)}{s} \end{aligned}$$Where u is the mean value, s is the standard deviation, x is the samples and z is the new samples15,16.Table 1 Features inputted into the ANN algorithm with all Biologix channels. Statistical analysisAccuracy, sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), Cohen’s kappa coefficient (\(\kappa\)), F1-score (weighted average between the precision score [PPV] and recall score [sensitivity]), and area under the curve (AUC) were calculated for evaluation of the ANN model. Because several previous studies used only accelerometer data to predict sleep, we used the McNemar’s test17 to compare the ANN performance to predict sleep using only accelerometer data with ANN performance using all Biologix channels (SpO2, HR, accelerometer, and snoring). Overall summary statistics were calculated in terms of means and standard deviations for continuous variables and counts and percentages for categorical variables. Shapiro-Wilk test was used for checking the data normality of the PSG and the Biologix system. Since the data distribution was not normal and they were not independent, the differences were analyzed by the Wilcoxon signed-rank test. In addition, we calculated the sensitivity, specificity, accuracy, PPV, and NPV of the Biologix system, without and with sleep prediction, versus PSG, in the detection of OSA severity. Mc Nemar’s test17 compared the Biologix system performance without and with sleep prediction. Finally, to assess the amount of agreement on OSA diagnosis between PSG-AHI and Biologix-ODI, without and with sleep prediction, Bland-Altman plots were performed. RStudio 2023.06.1 software (R Foundation for Statistical Computing) was used for all statistical analysis. Significance was assessed with a p-value \(<0.05\).

Hot Topics

Related Articles