Entropy-based reliable non-invasive detection of coronary microvascular dysfunction using machine learning algorithm

: Purpose: Coronary microvascular dysfunction (CMD) is emerging as an important cause of


Introduction
Clinically, myocardial ischemia refers to a condition in which the perfusion of heart muscle is insufficient, resulting in the reduction of oxygen supply to the heart, abnormal myocardial energy metabolism, and abnormal work of the heart [1]. It can increase cardiovascular events including sudden cardiac death and acute myocardial infarction [2−4], contributes 16% to the world's total deaths, and has been considered as the leading cause of mortality. Obstructive coronary artery disease (CAD), defined as severe stenosis in any epicardial coronary arteries (diameter ~ 5 mm) determined via coronary angiography (CAG, diameter severity [DS] ≥ 50%) or a fractional flow reserve (FFR < 0.8) [5], had been quantitatively investigated and well established as a main etiology of myocardial ischemia. However, up to 70% of patients undergoing CAG do not have obstructive CAD [6]. Patients with symptoms and signs of ischemic heart disease (IHD) but found to have nonobstructive coronary arteries (INOCA) are increasingly recognized [7]. Coronary microvascular dysfunction (CMD) has been recognized as a major cause of INOCA by the latest European Society of Cardiology guidelines [8,9]. Since the coronary microvasculature (diameter < 500 μm) has remained elusive to conventional medical images [10], the clinical significance of CMD has not been fully understood [11].
CMD refers to impaired blood flow in the coronary microcirculation [11,12]. CMD can be caused by structural or functional abnormalities in the coronary microcirculation, resulting in an inefficacy increase of myocardial blood supply in response to an increased myocardial oxygen demand or coronary microvascular spasm [8,13] and eventually leading to myocardial ischemia. Patients with CMD have higher risks of poor prognosis, re-hospitalization, adverse cardiovascular events, and mortality [9,14]. Recently, the functional assessment or detection of CMD has gained much

Materials and methods
Our work contains five parts: data collection, signal preprocessing, feature extraction, feature selection, and model evaluation and testing, as shown in Figure 1. Firstly, 12-lead ECGs from CMD patients and healthy controls were collected and these from healthy controls were split into 10second (10 s) segments. After 10 s ECGs were cleansed and denoised, VCGs were synthesized from 12-lead ECGs mathematically. The ST-wave onset and T-wave offset were located on VCGs and ECGs employing a squeeze and regional approach respectively. Three entropy features, i.e., SampEn, ApEn, and MSE-derived complexity index (CI), were extracted from the time series obtained by splicing ST-T segments of each lead in ECGs and VCGs beat by beat. Subsequently, the most effective subset of each entropy feature for each model was determined using the sequential backward selection (SBS) algorithm under the intra-patient and inter-patient schemes. Under each scheme, eight different machine learning models for each entropy feature were comprehensively evaluated on a five-fold cross-validation method on the training-validation datasets at the very first place, and then tested on the corresponding testing datasets for every scenario. Finally, the best model for CMD detection was investigated from the three entropy-based models (i.e., SampEn-based, ApEn-based, and CI-based) under each scheme.

Data collection
In our study, ECGs and the clinical characteristics of 177 subjects in two cohorts were collected. Regard to positive samples, 99 10 s, 12-lead resting ECG recordings of 70 patients with CMD were obtained from the Second Affiliated Hospital of Zhejiang University, Zhejiang, China, from June 2019 to September 2022 with approval from the local ethics committee for sharing and analyzing retrospective anonymised patient data with informed consent form waived.
Inclusion criteria were described as follows: 1) existence of stable or chronic symptoms of myocardial ischemia; 2) presence of coronary stenosis assessed by CAG but a FFR > 0.8; 3) presence of symptoms of chest pain or tightness but no obvious evidence of myocardial ischemia; 4) presence of objective evidence of myocardial ischemia.
Exclusion criteria applied to the study population were given by: 1) existence of unsuccessful measurement of FFR or IMR; 2) presence of myocardial infarction in the target vessel within 72 hours; 3) existence of isotonic creatinine > 150 µmol/L, glomerular filtration rate < 45 mL/kg/m 2 , or left ventricular ejection fraction < 30%; 4) existence of the following diseases: bundle branch blocks, atrial fibrillation, left ventricular hypertrophy, congestive heart failure, pulmonary arterial hypertension, or heart valve disease.
CMD was diagnosed according to the standardized diagnostic criteria proposed by COVADIS (Coronary Vasomotor Disorders International Study Group): IMR ≥ 25 in the absence of overt obstructive CAD (FFR > 0.80) [12,35], as illustrated in Figure 3. FFR and IMR were measured in the usual fashion by employing a coronary guidewire (St. Jude Medical Inc., PressureWireCertus, C12008) placed in target artery during CAG [35]. Finally, patients with CMD were selected whilst patients with CAD were ruled out, as shown in Figure 3. Totally, 99 10 s, 12-lead ECGs (sampling rate: 500 Hz; resolution: 16-bit with 4 μV/LSB) were recorded utilizing a commercially available electrocardiograph (Netherlands Philips Electronics Co. LTD, PageWriter TC30). The clinical characteristics of CMD patients are listed in Table 1.

Signal preprocessing
After ECGs from healthy controls were segmented into 10 s ones, data cleansing was implemented to guarantee the quality of ECG signals. Low-quality ECGs resulted from the shedding of the leads or/and poor attachment between the lead and body surface were eliminated, as illustrated in Figure 4. After data cleansing, in total, 301 10 s, 12-lead ECGs (99 CMD, 202 controls) were finally selected for further analysis. Then, the baseline drift and low-frequency fluctuations were removed using two moving median filters connected in cascade (with length 1.2 and 0.6 seconds respectively) to maximally avoid the deformation of ST segment in comparison with the classical high-pass filter. The output of first median filter was fed into the second one. High-frequency power-line interference and electromyogram noise were eliminated employing discrete wavelet transform (DWT). In detail, Coif4 determined as a wavelet basis function was adopted to decompose noise-containing ECGs up to four levels [37]. After the elimination of noise by an adaptive threshold, the processed signals were transformed back by utilizing the inverse of DWT [37].
Subsequently, all 10 s, 12-lead ECGs were standardized utilizing the clinical standard gain [37,38] and then transformed into VCGs [39], as shown in Figure 5   Ultimately, the ST-segment onset and T-wave offset were simultaneously marked on the VCGs and ECGs employing a hybrid approach [40] to obtain ST-T segments for calculating entropies, as shown in Figure 5(B−E). ST-wave onsets were located using a squeeze algorithm, and T-wave offsets using a regional approach [40].

Entropy feature extraction
Sample entropy (SampEn), approximate entropy (ApEn), and multiscale entropy (MSE) have been demonstrated to be electrocardiographic indictors for evaluating the changes of complexity in ECGs from patients with obstructive CAD [33,34]. Similarly, SampEn, ApEn, and MSE-derived CI were calculated from ST-T segments of each VCG and ECG lead to assess the changes of complexity in ECGs induced by CMD.
For each lead in VCGs or ECGs, its time series, i.e., { ( )} (1), (2),..., ( ) t l t t t L = was obtained by splicing ST-T segments beat by beat and standardized as follows: where L presents the length of the time series; σ and μ are the standard deviation and mean value of the time series.

SampEn
SampEn is defined as the negative natural logarithm of a conditional probability [30] and calculated to measure the complexity of beat-to-beat ST-T segment in this work. For each VCG and ECG lead, SampEn ( , , , , , , , , , , 1, 2, 3, 4, 5, 6 are the average probability that two vectors coincide for m and 1 m + points, respectively; ε denotes the tolerance for accepting matches, and m refers to embedded dimension [30].
In this work, the value of ε was set to 0.1, and that of m was set to 2 [30,37].
where ( ) m θ ε is the average probability that two any vectors coincide for 1 m + points, and 1 ( ) m θ ε + is the average probability that two any vectors coincide for 1 m + points. Ultimately, ApEn was calculated as follows: In this work, the value of ε was set to 0.1 and that of m was set to 2 [30,37].

CI
MSE builds on SampEn algorithm by integrating a coarse-graining procedure and provides insight into the point-to-point fluctuation across multiple time scales [42]. The k th coarse-grained time series for each time scale of τ , , was defined as [42]: , of each ECG and VCG lead.
SampEn algorithm was employed to obtain an entropy value at each time scale.
where M is the maximum time scale; the value of ε was set to 0.1 and that of m set to 2 [30,37]. A major concern when employing MSE algorithm is to guarantee that the data length of the coarsegrained time series is long enough at the maximum time scale for the reason that too short time series at any time scale associates with inconsistent probabilities from SampEn. More than 200 data points per time scale has been recommended to elicit consistent SampEn values [43]. Since the data length of time series is between 900 and 1200, the maximum time scale was set to 3. The values of τ were set to 1, 2, 3 [30,43].
Once all parameters and MSE have been determined, the area under the MSE vs. time scale curve, entitled as CI [42] of ECGs' and VCGs' ST-T segments were calculated as follows: where ( ) MSE τ is the MSE value at time scale factor of τ .
The entropy subsets selected by utilizing the SBS algorithm were fed into each framework to identify the subjects (i.e., CMD patients vs. healthy controls). Regard to the model design, SampEnbased model denoted each framework fed with VCGs' and ECGs' SampEn only. Similarly, ApEn-based and CI-based models presented respectively the frameworks utilizing ApEn and CI only.

Entropy feature selection
Feature selection is widely implemented to determine the optimal feature subset from a large initial set of features thus improving generalization of the machine learning model and reducing the computational demand. To achieve the most effective entropy subset, SBS algorithm [45,46] has been conducted, as presented in Figure 6. The selection of the optimal entropy subset. The SBS algorithm was conducted on SampEn, ApEn, and CI separately; where the initial entropies consist of all the features from 12 ECG and 3 VCG leads. In each iteration step, the candidate subset (each with n-1 elements) was selected from n subsets of the parent set with n elements. The selected candidate subset was the parent set in the next iteration.
First, a collection of candidate entropy subset for each model was created on the trainingvalidation dataset, as illustrated in Figure 6A. For each algorithm, a baseline model was constructed using each entropy feature separately, i.e., 15 SampEn, 15 ApEn, or 15 CI calculated from ST-T segments of 3-lead VCGs and 12-lead ECGs. The iteration variable n was initially set as 15. Each subset with n-1 entropies was trained and evaluated by employing a five-fold cross-validation to select the one with the highest average F1 score, which takes into account precision and recall, and is not sensitive to the class-imbalance [47] into next iteration where subsets with n-2 entropies derived from the selected n-1 element subset were evaluated and compared similarly. The iteration continued until n = 1. Finally, 15 candidate subsets with different numbers of entropies (i.e., 1, 2,…, 15) were selected by the iterative SBS algorithm.
Second, the optimal entropy subset, which had maximal five-fold cross-validation average F1 score, was identified from the SBS-generated collection of the candidate entropy subsets achieved above, as illustrated in Figure 6B.
Finally, the optimal entropy subset was separately determined from the total 15 SampEn for each SampEn-based model. Similarly, optimal entropy subsets for ApEn-based and CI-based models were determined.

Experimental methodology for model evaluation and testing
The utility of the constructed models was evaluated by accuracy, specificity, sensitivity, and F1 score [37]. Additionally, the geometric mean (G-mean) and an area under the curve for precision/recall (PR-AUC) were considered as evaluation metrics. The geometric mean (G-mean) is the geometric mean of sensitivity and specificity [48]. PR-AUC is a metric commonly used in highly imbalanced datasets [49].
Both intra-patient and inter-patient schemes were implemented to verify the effectiveness of our proposed modes. Under the intra-patient scheme, positive and negative ECGs were randomly split in 80% for training and validation, and 20% for testing at the same time. Regarding the interpatient scheme, patients were randomly separated in the proportion of 4:1 for training-validation and testing, and the corresponding ECGs formed the training-validation and testing datasets. Under both scheme, a five-fold cross-validation approach was adopted in the training-validation dataset to optimize model parameters and check evaluation metrics (i.e., sensitivity, accuracy, specificity, F1 score, G-mean, and PR-AUC) on the training-validation dataset for each model at the very first place. Then, each trained model was tested on the testing dataset to check whether the selected model always performed best under each scheme for every scenario.
In this work, the signal preprocessing and feature extraction were developed utilizing MATLAB (R2021; The MathWorks Inc. Natick, USA). All machine learning models were established, evaluated, and tested in Python 3.7 as well as feature selection.

Intra-patient scheme
The evaluation metrics of SampEn-based, ApEn-based, and CI-based models on the validation dataset are illustrated in first, second, and third columns of Figure 7 respectively. It can be observed from the first column that SVM model outperforms other ApEn-based models in response to the major evaluation metrics. Therefore, SVM was determined as the candidate one for SampEn-based model. Similarly, MLP and SVM models were selected as the candidates for SampEn-based and CI-based models respectively. As listed in Table 2, the testing evaluation metrics of ApEn-based SVM model are higher than those of other ApEn-based models. Similarly, SampEn-based MLP and CI-based SVM models provide the highest the testing evaluation metrics across all SampEn-based and CIbased ones respectively.

ApEn-based CI-based
highest evaluation metrics on the validation dataset, as shown in Figure 7. Furthermore, the classification performances of the three candidate models on the testing dataset present that ApEnbased SVM model is superior to the other two models (i.e., SampEn-based MLP and CI-based SVM models) with all evaluation metrics higher than 0.8, as listed in Table 2. Thus, ApEn-based SVM model was validated as the optimal one in detecting CMD under the intra-patient scheme.  Figure 8 illustrates the comparisons of evaluation metrics among ApEn-based, SampEn-based, and CI-based models on the validation dataset for detecting CMD. From the first column, SVM model yields the highest classification performance across all ApEn-based models. Therefore, it was verified as the candidate one for ApEn-based model. Similarly, Bagging and SVM models were determined as the candidates for ApEn-based and CI-based models respectively. Regard to the classification performances on the testing dataset, ApEn-based SVM model outperforms other ApEn-based ones, as listed in Table 3. Similarly, SampEn-based Bagging and CI-based SVM models perform best across all SampEn-based and CI-based ones respectively.

ApEn-based CI-based
Then, the classification performances of SampEn-based Bagging, ApEn-based SVM, and CIbased SVM models were compared to select the optimal one. It can be observed from Figure 8 that ApEn-based SVM model has superiority to the other two models except the sensitivity for SampEnbased Bagging model. Moreover, the comparisons of the three candidate models on the testing dataset demonstrate that ApEn-based SVM model has all testing evaluation metrics higher than SampEn-based Bagging and CI-based SVM models, as listed in Table 3. Hence, ApEn-based SVM model was verified as the optimal one for CMD detection under the inter-patient scheme. Table 3. Comparisons of the testing evaluation metrics of ApEn-based, SampEn-based, and CI-based models under the inter-patient scheme.

Models
Accuracy Specificity Sensitivity F1 score PR-AUC G-mean

Comparison with existing studies
The ApEn-based SVM models were verified to be the optimal ones for CMD detection, with all and major testing evaluation metrics over 0.8 under the intra-patient and inter-patient schemes respectively, indicating the feasibility of entropy-based early detection of CMD using machine learning algorithm.
Obstructive CAD and CMD are recognized as two major causes of myocardial ischemia. Since obstructive CAD had been considered as the leading cause of myocardial ischemia, previous studies of ECG-based machine learning algorithms mainly focused on obstructive CAD detection [29,50], with a lack of in-depth investigation in patients with CMD. An advantage of the ECG-based method is its interpretability. Some mathematical models disclosed the pathology of CMD from cell levels. Some critical electrophysiological phenomena and parameters, e.g., T wave alternans, can be directly reflected on ECG and VCG, providing the possibility of fine-grained classification and stratification of CMD [51,52]. To detect CMD non-invasively, electrocardiographic indictors., i.e., SDNN < 100 ms [24], ischemic ST-T segment changes [22,25−27], and the prolongation of the heart rate-corrected QT interval [27,28] have been investigated. Specially, SARA et al. combined three features, i.e., Twave area, T Peak-T end, and Y-center of gravity as inputs of a linear discriminant analysis and recognized the existence presence of an abnormal coronary flow reserve (CFR) with the highest accuracy of 66.5 ± 0.3% and 74 ± 2% for females and males [22]. Since CFR assesses the entire coronary bed including both epicardial and microvascular districts, the authors utilized an abnormal CFR and DS < 50% as the standard for selecting CMD patients to exclude the influence of obstructive CAD. In contrast, IMR used in our work is not influenced by epicardial artery stenosis and can accurately reflect the microvascular flow resistance [18,21].
As far as we known, this is the first machine learning model employing entropy features of ECG and VCG to detect CMD based on reliable clinical diagnosis derived from patient specific FFR and IMR values.

Relationship between CMD and entropy features
CMD is believed to result from inadequate relaxation of vascular smooth muscle, which mediates myocardial ischemia [1]. During myocardial ischemia, the decrease of conduction velocity and the duration of action potential lead to the heterogeneous repolarization process [53]. Further, ischemiainduced repolarization dispersion causes ischemic changes in ECG and VCG signals. Regarding ECG, the variations in ST segment include ST-segment depression or elevation, and those in T wave include high-tip T wave, biphasic T wave or inverted T wave [51,52], as illustrated in Figure 1. As for VCG, the changes exist in the QRS loop, the spatial orientations and magnitude of ST vectors [51,54], the Tloop morphology, and the T-vector angle [55]. The beat-to-beat variations in T-loop roundness present intrinsic measures of beat-to-beat repolarization ability [55]. Therefore, the variations in ST-T segments of VCGs and ECGs can be considered as indicators of myocardial ischemia [37,51,55].
The ischemic variations have been demonstrated to afford detectable morphology variability in beat-to-beat ST-T segments, while the morphology shows a consistent pattern in normal subjects [56]. CMD can lead to changes in ST segment or/and T wave [22]. The complexity resulting from the morphology variations can be measured by entropy.
For the first time, we observed that CMD-induced complexity changes of beat-to-beat ST-T segments can be reliably detected by SampEn, ApEn, and MSE-derived CI (Tables 2 and 3), which provided reference for other ECG-based CMD detection algorithms. Specially, ApEn outperforms SampEn and CI in detecting CMD under both intra-patient and inter-patient schemes. ApEn values extracted from pathologic time series are different from those obtained from free running physiologic systems under healthy condition [57]. In this work, ApEn could be used to effectively measure the changed of the complexity induced by CMD.

The comparison of different models
An SVM model has been widely applied in the detection of myocardial ischemia location and multiclass myocardial infraction classification [50]. The other seven models also have been applied for CAD detection and yield excellent classification performance [29].
We evaluated and tested these common machine learning models to determine the optimal one for CMD detection. Our results present that an SVM model yields the best classification performance across all models under both schemes. Moreover, compared with MLP, gradient boosting, Bagging, and Ada boost models, an SVM model does not require extensive computational resources to determine the classification results. Therefore, it is more accomplishable on wearable devices, given that their computational resources are restricted.
We observed a difference between entropy features in the performance of SVM algorithm in detecting CMD. Under the intra-patient scheme, ApEn-based SVM model employing (AI, AII, AavR, AavL, AavF, AV4, AV5, AV6, AVx, AVz) was demonstrated to surpass the other models. Under the interpatient scheme, ApEn-based SVM model utilizing (AI, AII, AIII, AV4, AV5, AV6, AVx, AVy) provided the best performance across all models. The patient-specific algorithm optimization deserves further investigation.

Strengths, limitations, and future directions
The results in this work have demonstrated that SampEn, ApEn, and CI calculated from ST-T segments of ECGs and VCGs could be useful features to recognize a patient with CMD for the first time. Furthermore, our proposed models afford the possibility of noninvasive and cost-effective detection of CMD. It could be easily deployed on conventional ECG acquisition equipment, given that VCG can be calculated from 12-lead ECG by employing a Kors transformation matrix [39]. Additionally, it is based on the 10 s ECG which has been widely accepted as the first-line diagnostic technique in assessing patients with suspected myocardial ischemia due to its non-invasiveness, nonradiation, and low cost [58]. The data length of the time series consisting of beat-to-beat ST-T segments in each lead is between 900 and 1200 and longer than 200 which is suggested for calculating ApEn and SampEn [43]. The minimum data length is more than 300 with the maximal time scale factor of τ = 3 regarding MSE. The commonly used 10 s ECG is available for calculating reliably the three entropy features. Our algorithm meets the clinical needs with no extra workload for operators, given that our algorithms are fully automatic. Hence, our results open a new pathway towards non-invasive, low-cost, and operator-friendly detection of CMD in various application scenarios using wearable ECG sensors. Therefore, the proposed method may provide an approach for large-scale screening of CMD in populations, especially in low-resource areas.
However, some limitations exist in our work. First, the sample size is small, especially the positive cases. The sample size is limited by the number of patients diagnosed with CMD who underwent full examination. The scarce of CMD patients' data is a common limitation of existing studies (e.g., 41 in [24]; 20, in [59]). Especially, the in vivo measurement of IMR is performed invasively by using an intravascular guide wire with the injection of saline into coronary artery multiple times and is expensive. Therefore, it is not widely used in clinical practice and only performed for the patients with obvious symptoms of CMD, which limited the data size to develop highly reliable algorithms that suit different cohorts. Secondly, the positive (i.e., CMD patients) and negative (i.e., healthy controls) samples were collected from different cohorts. Hence, the difference in physiological characteristics may influence the classification performance. Finally, only ECG-based features were selected as inputs, whereas clinical characteristic and other medical images were not integrated in our algorithms.
In future studies, multicenter large-scale studies can extend the positive sample size and further verify our results, optimize the algorithm, and improve the classification performance by considering the difference in physiological features among different cohorts. Based on large datasets, the combination between ECG-based features and clinic-characteristics could be considered to boost the improvement in the classification performance. The fine-grained classification of CMD based on ECG-VCG features also deserves further exploration.

Conclusions
In conclusion, SampEn, ApEn, and CI extracted from the beat-to-beat ST-T segment of ECGs and VCGs could be useful entropy features to recognize electrocardiographic signatures of CMD under both intra-patient and inter-patient schemes. Our proposed models may provide the possibility of an ECG-based tool for non-invasive detection of CMD.