Professional Documents
Culture Documents
Non-invasive early diabetes prediction has been gaining much premarkable over the last decade. Heart rate variability
(HRV) is the only non-invasive technique that can predict the future occurrence of the disease. Early prediction of diabetes
can help doctors start an early intervention. To this end, the authors have developed a computational machine learning
model to predict type 2 diabetes mellitus (T2DM) risk using heart rate variability features and have evaluated its robustness
against the HRV of 50 patients data. The electrocardiogram (ECG) signal of the control population (n=40) and T2DM
population (n=120) have been recorded in the supine position for 5 minutes, and HRV signals have been obtained. The time
domain, frequency domain, and non-linear features have been extracted from the HRV signal. A decision support system has
been developed based on a machine learning algorithm. Finally, the decision support system has been validated using the
HRV features of 50 patients (Control n=10 and T2DM n=40). HRV features are selected for the prediction of T2DM. The
decision support system has been designed using three machine learning models: Gradient boosting decision tree (GBDT),
Extreme Gradient boosting (XGBoost), Categorical boosting (CatBoost), and their performance have been evaluated based
on the Accuracy (ACC), Sensitivity (SEN), Specificity (SPC), Positive predicted value (PPV), Negative predicted value
(NPV), False-positive rate (FPR), False-negative rate (FNR), F1 score, and Area under the receiver operating characteristic
curve (AUC) metrics. The CatBoost model offers the best performance outcomes, and its results have been validated on 50
patients. Thus the CatBoost model can be use as a decision support system in hospitals to predict the risk of T2DM.
Keywords: Heart rate variability, Type 2 diabetes mellitus, Gradient boosting decision tree, Extreme gradient boosting,
Categorical boosting
component of the RR interval series. The PSD non-linear behaviors of RR interval variability9.
estimation can be carried out using the Fast Fourier The Poincare plot can be interpreted using standard
Transform method (FFT) or the Autoregressive deviation 1 (SD1), representing the short-term
modeling method (AR model). However, considering variability in RR interval, and standard deviation
the complexity of the AR model, the results of the 2 (SD2), representing the long-term variability in RR
FFT method were used. The PSD estimator interval10.
decomposes the RR interval into a frequency 2.2.3.2 Detrended fluctuation analysis (DFA)
component using the FFT method9. The power in the DFA is used to assess the self-similarity properties
frequency range of 0.04 to 0.15Hz is defined as a low- of the RR interval. It also measures the correlation
frequency power band. The power in the frequency between different time series signals11. The fluctuation
range of 0.15 to 0.4Hz is defined as a high-frequency in the time series signal is represented by parameter α.
power band. The power in the frequency band was
Alpha (α) is called as the scaling exponent. The time-
calculated in absolute (ms2) and normalized unit (nu). series signal is integrated and divided into segments
The LF and HF power reflect the sympathetic and
of length 𝑛 and 𝑥𝑛 𝑘 a least-square line is applied to
parasympathetic activity. In this study, total power
each segment. Next, the integrated time series 𝑥(𝑘) is
(TP), LF power, HF power, LF nu, HF nu, and LF to
detrended from the next least square line of each
HF power ratio were analyzed. The statistical
segment. The detrended time series of RR interval is
difference between frequency-domain features of
calculated by:
control and T2DM has been mentioned in Table 2.
2.2.3 Non-linear features 1 𝑁
The nature of the biological signal is non-linear. 𝐹 𝑛 = 𝐾=1(𝑥 𝑘 − 𝑥𝑛 𝑘 )2 … (1)
𝑁
Thus, the study of non-linear dynamics is important
for analysis. The non-linear feature used in this study DFA is plotted on a double log graph, and a linear
is as follows: Poincare plot, Detrended fluctuation relationship indicates the presence of fractal scaling.
analysis (DFA), Approximate entropy (AppEN), The value of α is closer to 1 for control subjects, and
and Sample entropy (SampEN). The significant it may vary with disorders.
difference between non-linear features of control and 2.2.3.3 Approximate entropy (AppEN)
T2DM subjects are presented in Table 3. AppEN measures the regularity of the time-series
2.2.3.1 Poincare plot signal. The value of AppEN is larger in the case of
The Poincare plot represents the present RR a control subject compared to diabetes subjects12,13.
interval and the next RR interval, which shows the It is calculated as:
(1) Initialize model with a constant value where, 𝑚𝑖 , 𝑛𝑖 represent 1st order, the 2nd Gradient
𝑓0 𝑥 = 𝑎𝑟𝑔𝑚𝑖𝑛 𝑛𝑖=1 𝐿(𝑦, 𝛼); of the loss function, respectively. The parameters 𝜇
and 𝛼 represent the degree of regularization, which
(2) For m= 1, 2, 3….𝑀 provides gradient direction to minimize the loss
(a) Calculate the residual function and avoid overfitting.
𝜕𝐿 (𝑦 ,𝑓 𝑥 )
𝑟𝑒𝑠 = − 𝜕𝑓𝑖 𝑥 𝑖 , 𝑖 = 1,2,3 … . 𝑁
𝑖 2.5.3 Categorical boosting (CatBoost)
(b) Fit a tree 𝐶𝑚𝑓 with the residual 𝑟𝑒𝑠 using the Catboost is a new machine learning method
training set 𝑥𝑖 , 𝑟𝑒𝑠) based on the Gradient boosting decision tree (GBDT),
(c) 𝛼𝑚𝑓 = 𝑎𝑟𝑔𝑚𝑖𝑛 𝑛𝑖=1 𝐿(𝑦𝑖 , 𝑓𝑚 −1 𝑥𝑖 + 𝛼) and Y and ex first proposed it in 201818. It supports
(d) Update the current model by numerical, categorical, and text features. Various
𝑓𝑚 𝑥 = 𝑓𝑚 −1 𝑥 + 𝐶𝑚𝑓 𝛼𝑚𝑓 boosting techniques can solve the problem associated
with the heterogeneous features, but CatBoost can
(3) 𝑓1 𝑥 = 𝑓𝑚 𝑥 handle the categorical data. CatBoost has the
following advantages over the GBDT algorithm:
2.5.2 Extreme gradient boosting (XGBoost) (1) It deals with the categorical data and uses the
The XGBoost is a more regularized form of whole dataset for training. The GBDT uses
Gradient boosting proposed by Tianqi Chen in 201617. Greedy target based statistics (GTBS), which can
The mathematics behind XGBoost is the same as the replace the categorical features with the average
GBDT, but it shows the improved speed of tree label, leading to overfitting the model. CatBoost
construction and tree searching. The strength of adds the prior weight to GTBS, which reduces the
XGBoost is parallel computing, L1 and L2 overfitting of the model. For example, we have a
regularization, and second-order derivative of the loss dataset D with the features 𝐷 = 𝑥𝑖 , 𝑦𝑖 , 𝑖 = 1,
function. It uses the advanced regularization of L1 2, 3 … 𝑛, if a permutation is 𝜎 = (𝜎1 , 𝜎2 … … 𝜎𝑛 )
and L2 algorithms, which improves the generalization then 𝑥𝜎𝑝 ,𝑘 is substituted with
capabilities of the model. The optimized XGBoost
model with the N decision tree is represented by 𝑝 −1
𝑗 =1 𝑥 𝜎 𝑗 ,𝑘 =𝑥 𝜎 𝑝 ,𝑘 𝑌𝜎 𝑗 + 𝛾∙𝑃
Eq. (6). 𝑝 −1 … (10)
𝑥
𝑗 =1 𝜎 𝑗 ,𝑘
=𝑥 𝜎 𝑝 ,𝑘 𝑌𝜎 𝑗 + 𝛾
𝑁
learning model, whereas dataset D2 was used as test test data for the CatBoost model. We hypothesized
data and used to evaluate machine learning models' that the machine learning model trained to segregate
performance. We have trained the machine learning two groups of control and diabetes based on the HRV
model by the HRV features from dataset D1 and features of dataset D1 would also differentiate the
divided it into training data and testing data. The HRV features of dataset D2 into control and diabetes
various traditional machine learning algorithms like groups. Thus, HRV features of dataset D2 were used
Decision tree, Random forest, Naive Bayes, Support as input features for all the machine learning models
vector machine, and k-nearest neighbors were which were trained using dataset D1.
evaluated. The traditional machine learning algorithm The results given by the machine learning models
has shown a good performance while training, but were noted, and accordingly, true positive, false
when dataset D2 was applied as test data, their positive, true negative, and false negative were
predictive ability was lacking. Thus, the three best manually calculated. When the HRV features of
machine learning models GBDT, XGBoost, and dataset D2 were applied to the GBDT machine
CatBoost, which performed very well on train data learning model trained using dataset D1, the values of
and test data, were selected for the study. Before the true positive: 36, false-positive: 4, false-negative: 3,
training of the machine learning model was optimized true negative: 7 were noted. When the HRV features
using hyperparameters. The machine learning model of dataset D2 were applied to the XGBoost machine
results were evaluated based on performance learning model trained using dataset D1, the values of
measures. Performance of the model GBDT, XGBoost, true positive: 38, false-positive: 2, false-negative: 2,
and CatBoost using dataset D1 is shown in Table 5. true negative: 8 were observed. When the HRV
It can be observed that the optimized CatBoost features of dataset D2 were applied to the CatBoost
model performs well as compared to other models and machine learning model trained using dataset D1, the
yields an accuracy of 91.6%, the sensitivity of 97.1%, values of true positive: 39, false-positive: 1, false-
the specificity of 76.9%, PPV of 91.8%, NPV of negative: 1, true negative: 9 were obtained. Thus, the
90.9%, FPR of 0.23, FNR of 0.02, f1 score of 0.94 CatBoost machine learning model has the highest
and AUC of 0.87. It was noted that the FPR and predictive ability. The performance assessment of
FNR of the CatBoost model were less, which dataset D2 applied to the machine learning model
indicates the ability of the model to predict correct developed using dataset D1 is shown in Table 6.
classes.
The receiver operating characteristic (ROC) curve
is another meaningful visualization way to compare
the diagnostic performance of different models. It is
a plot of ‘sensitivity (TPR) versus ‘1-Specificity’
(FPR)19. ROC indicates the performance of individual
models, and the area under the ROC lies between
0.5 to 1, shows the classification ability. The AUC
near to 1 represents the best machine learning model
performance. ROC curves for GBDT, XGBoost, and
CatBoost are given in Fig. 3.
3.1 Predictive ability evaluation and validation of the model
TheCatBoost model has shown better results on
dataset D1. Now to know its predictive ability on
unknown data, test data, or actual patient data, we
have been using dataset D2. The dataset D2 was the Fig. 3 — Area under ROC plot of the optimized model.
Table 7 — Comparison with the existing study of diabetes prediction using HRV
Features Result ML model validation on the number of patients
Non-linear28 Accuracy 86% -
Non-linear29 Accuracy 90% -
HOS30 Accuracy 79.9% -
HOS31 Accuracy 90.5% -
Time domain, Frequency domain, Non-linear features, and Accuracy 91.6% 50 patients
Breathing rate (Proposed Method)
ML: Machine learning, HOS-Higher order spectrum
Fig. 5 — A graphical user interface to predict T2DM using HRV features for doctors in the hospital.
10 Brennan M, Palaniswami M, & Kamen P, IEEE Trans 23 Kirvela M, Salmela K, Toivonen L, Koivusalo A M, &
Biomed Eng, 48.11 (2001) 1342. Lindgren L, Acta Anaesthesiol Scand, 40.7 (1996) 804.
11 Peng C K, Havlin S, Hausdorff J M, Mietus J E, Stanley H E, 24 Seyd P A, Ahamed V T, Jacob J, & Joseph P, Int J Biol Sci,
& Goldberger A L, J Electrocardiol, 28 (1995) 59. 4.1 (2008) 24.
12 Fusheng Y, Bo H, & Qingyu T, Nonlinear Biomed Signal 25 Chemla D, Young J, Badilini F, Maison-Blanche P,
Processing, 2 (2001) 72. Affres H, Lecarpentier Y, & Chanson P, Int J Cardiol, 104.3
13 Richman J S, & Moorman J R, Am J Physiol Heart Circ (2005) 307.
Physiol, 278 (2000) H2039. 26 Javorka M, Trunkvalterova Z, Tonhajzerova I, Javorkova J,
14 Walfish S, Pharm Technol, 30.11 (2006) 82. Javorka K, & Baumert M, Clin Neurophysiol, 119.5 (2008)
15 Patro S, & Sahu K K, arXiv preprint arXiv: 1503.06462, 1071.
(2015) 1. 27 Faust O, Acharya U R, Molinari F, Chattopadhyay S, &
16 Natekin A, & Knoll A, Front Neurorobot, 7 (2013) 21. Tamura T, Biomed Signal Process Control, 7.3 (2012)
17 Chen T, He T, Benesty M, Khotilovich V, Tang Y, & Cho H, 295.
R package version 0.4-2, 1.4 (2015).
28 Acharya U R, Faust O, Sree S V, Ghista D N, Dua S, Joseph P,
18 Prokhorenkova L, Gusev G, Vorobev A, Dorogush A V, &
Ahamed V T, Janarthanan N, & Tamura T, Comput Methods
Gulin A, arXiv preprint arXiv: 1706.09516, (2017) 1.
Biomech Biomed Engin, 16.2 (2013) 222.
19 Hajian-Tilaki K, Caspian J Intern Med, 4.2 (2013) 627.
29 Acharya U R, Faust O, Kadri N A, Suri J S, & Yu W,
20 Al-Hazimi A, Al-Ama N, Syiamic A, Qosti R, & Abdel-Galil K,
Comput Biol Med, 43.10 (2013) 1523.
Ann Saudi Med, 22.5-6 (2002) 400.
21 Pfeifer M A, Cook D, Brodsky J, Tice D, Reenan A, 30 Jian L W, & Lim T C, J Med Imaging Health Inform, 3.3
Swedine S, Halter J B, & Porte D, Diabetes, 31.4 (1982) 339. (2013) 440.
22 Schroeder E B, Chambless L E, Liao D, Prineas R J, Evans G W, 31 Swapna G, Rajendra Acharya U, Vinitha Sree S, & Suri J S,
Rosamond W D, & Heiss G, Diabetes Care, 28.3 (2005) 668. Intell Data Anal, 17.2 (2013) 309.