Support Vector Machine-Based Classification of Vasovagal Syncope Using Head-Up Tilt Test

Simple Summary Syncope is a medical condition triggered by short-lived interruption of the oxygen supply to the brain, which may result in free fall or accidents. The diagnosis of syncope is a challenging task, as various other states of altered consciousness present with the same symptoms as syncope. This work uses historical medical data for the diagnosis of syncope using sophisticated computing solutions. The experimental results prove the effectiveness of the approach, leading to the proactive prediction of syncope. Abstract Syncope is the medical condition of loss of consciousness triggered by the momentary cessation of blood flow to the brain. Machine learning techniques have been established to be very effective way to address such problems, where a class label is predicted for given input data. This work presents a Support Vector Machine (SVM) based classification of neuro-mediated syncope evaluated using train–test–split and K-fold cross-validation methods using the patient’s physiological data collected through the Head-up Tilt Test in pure clinical settings. The performance of the model has been analyzed over standard statistical performance indices. The experimental results prove the effectiveness of using SVM-based classification for the proactive diagnosis of syncope.


Introduction
Syncope is a medical condition resulting in a transient loss of consciousness (LOC) or postural tone with spontaneous recovery. A short-lived interruption of the oxygen supply to the brain is the most fundamental aspect of the induction of syncope [1]. Depending on various underlying conditions of its occurrence, syncope is primarily classified into three categories: vasovagal, cardiovascular and orthostatic hypotension (OH) [2]. The cardiovascular and OH forms of syncope, found among older adults, primarily happen due to the various health conditions involving the circulatory system and cardiac dysfunction. The occurrence of these episodes of syncope is life-threatening and thus requires serious medical attention. Vasovagal or neurally mediated syncope, found in young adults, is most common form of syncope, which primarily happens due to a quick transient drop in the systemic arterial Blood Pressure (BP) required for the sustenance of cerebral perfusion. Usually the drop in Heart Rate (HR) is the triggering phenomenon leading to the drop in systemic arterial BP and syncope. The product of cardiac output (CO) and total peripheral resistance (TPR) provides the measure of systemic arterial BP. Any significant decline in CO or TPR has the potential to create cessation in the cerebral blood flow and, consequently, global cerebral hypoperfusion [3]. Though not life-threatening in nature, this form of syncope has a great impact on the quality of life and handling of other health conditions alongside. Besides, it prompts the loss of postural tone, which sometimes leads to falls or accidents causing serious harm to the body. The diagnosis of vasovagal syncope in itself is a challenging task as various other states of altered consciousness require a different path of treatment and expertise. Thus, evaluating patients with loss of consciousness (LOC) or near LOC and establishing a true form syncope is a crucial step in the treatment process [4].
The use of high-end computing solutions at this crucial stage of diagnosis is anticipated to add great benefits for resource-constrained healthcare organizations. Healthcare 4.0, by the usage of Artificial Intelligence (AI) and Machine Learning (ML) coupled with the Internet of Things (IoT) and Big Data, is facilitating a refined diagnostic and treatment procedure and thus provides a significant gain in the efficiency of and cost-saving for healthcare services [5][6][7]. Machine learning is the process whereby a computer manipulates a suitable statistical model utilizing observed data to generate an outcome or classify observations about new data. The objective of ML is to develop capabilities into data driven machines by enabling advanced algorithms and statistical methods to achieve more powerful predictions compared to a rule-based system. ML models are extensively being used to compute valuable predictions in various domains including robotics, finance, retail, transport and healthcare, etc. Depending on the desired outcome and the characteristics of the data in question, ML models are broadly classified into three categories viz. supervised, unsupervised and reinforced ML. Supervised ML trains the models involving labelled data and make predictions about new data using the same information. Unsupervised ML trains models involving data whose labels are not known and make clusters of similar data based on the hidden patterns in them. Similarly, reinforced ML iteratively improves its performance by getting feedback from environments in the forms of rewards or penalties for the actions it performs. The availability of an enormous quantity of patient-related data in the form of Electronic Health Records (EHR) has created new opportunities for researchers, enabling high-grade classifications, predictions and pattern recognitions using large volumes of high dimensional data and fueling advances in both the science and practice of medicine [8,9].
The objective of this paper is to classify syncope and non-syncope events of patients using the supervised machine learning algorithm Support Vector Machine (SVM) applied to the patients' true physiological data, which were collected through HUT tests, to provide the differentiation between instances of syncope and non-syncope. Considering the volume and dimension of the collected data, SVM qualifies as a suitable classifier because it can efficiently discriminate entities containing n-dimensional vectors. The raw data recorded using the HUT test are first refined by some basic statistical methods before being consumed by the SVM classification model. The results derived by the model are compared with the results of the k-nearest neighbors (KNN) and stochastic gradient descent (SGD) models employed to the same dataset and in similar computing environments. The models are adjudicated over various performance measures of accuracy, precision, recall, F1-Score and area under the curve of Receiver Operating Characteristics (AUC-ROC).
The remainder of the paper is organized as follows: Section 2 discusses the limitations and inadequacies of the existing work reported in the literature. Section 3 presents the details of the working of the model in its various phases, including procedures of data collection, data organization and data preparation leading to an SVM-based classification of syncope and its performance in comparison with KNN and SGD-based models. Section 4 presents the limitations of the work while stating possible future directions. This is followed by Section 5, which concludes the work.

Related Work
The classification between syncope and non-syncopal events based on true physiological data has scarcely been touched upon. This section touches upon some of the work, though limited, relating to syncope. The use of a Random Forest Classifier (RFC) to classify events of syncope and non-syncope was reported in [10]. However, the work does not address the very important issue of handling the imbalance of data for the considered cases of syncope and non-syncope, which becomes a limiting factor. Various classification works based on the observations of individual physicians have been reported [11][12][13][14]. Since the works are based on the laboratory findings of individual physicians, the findings become phenomenological and lack objectivity. The work in [15] differentiates the cases of syncope from other forms of loss of consciousness, but the dataset generated for the work is based on responses to a questionnaire instead of on the analysis of true physiological data, e.g., heart rate and beat-to-beat recording of blood pressure. The early prediction of syncope using the HUT test was reported in [16]. However, the work only considers the amplitude of systolic BP and dynamic interaction between two successive R-waves of the QRS signal on the electrocardiogram (RR-interval) as the differentiating parameters.
The work presented in this paper gains significance due to the fact that it is based on the true physiological data collected through the HUT test. The dataset utilized for the work has been balanced with an equal number of instances of syncope and non-syncope, which results in better training and hence better classification. The results of the analysis presented in the work are therefore more reliable, as they have been adjudicated through the statistical indices of various measures of performance.

Syncope Classification Model
The foundations of this work are based on two central hypotheses: Hypothesis 1 (H1). Etiology of syncope can be derived by beat-to-beat examination of BP along with continuous analysis of HR variability, and; Hypothesis 2 (H2). Mathematical modeling and machine learning algorithms can provide a nearaccurate diagnosis for patients having syncopal episodes correlated with autonomic dysfunction.
The workings of the model can be summarized with the help of a diagram, as shown in Figure 1, which presents the various steps followed by the model. though limited, relating to syncope. The use of a Random Forest Classifier (RFC) to classify events of syncope and non-syncope was reported in [10]. However, the work does not address the very important issue of handling the imbalance of data for the considered cases of syncope and non-syncope, which becomes a limiting factor. Various classification works based on the observations of individual physicians have been reported [11][12][13][14].
Since the works are based on the laboratory findings of individual physicians, the findings become phenomenological and lack objectivity. The work in [15] differentiates the cases of syncope from other forms of loss of consciousness, but the dataset generated for the work is based on responses to a questionnaire instead of on the analysis of true physiological data, e.g., heart rate and beat-to-beat recording of blood pressure. The early prediction of syncope using the HUT test was reported in [16]. However, the work only considers the amplitude of systolic BP and dynamic interaction between two successive Rwaves of the QRS signal on the electrocardiogram (RR-interval) as the differentiating parameters.
The work presented in this paper gains significance due to the fact that it is based on the true physiological data collected through the HUT test. The dataset utilized for the work has been balanced with an equal number of instances of syncope and non-syncope, which results in better training and hence better classification. The results of the analysis presented in the work are therefore more reliable, as they have been adjudicated through the statistical indices of various measures of performance.

Syncope Classification Model
The foundations of this work are based on two central hypotheses: (1) Etiology of syncope can be derived by beat-to-beat examination of BP along with continuous analysis of HR variability, and; (2) Mathematical modeling and machine learning algorithms can provide a near-accurate diagnosis for patients having syncopal episodes correlated with autonomic dysfunction.
The workings of the model can be summarized with the help of a diagram, as shown in Figure 1, which presents the various steps followed by the model. The process has been divided into four stages. The first stage corresponds to the data collection which is the input dataset for the model. The input data generated are observed to be skewed, with only some cases reported with syncope. If such data are used as is, this may result in a scenario in which the training data will have very few minority class instances (syncope) and a very large number of majority class instances (non-syncope). This results in the machine being trained inefficiently, leading to poor predictive performance. The process has been divided into four stages. The first stage corresponds to the data collection which is the input dataset for the model. The input data generated are observed to be skewed, with only some cases reported with syncope. If such data are used as is, this may result in a scenario in which the training data will have very few minority class instances (syncope) and a very large number of majority class instances (non-syncope). This results in the machine being trained inefficiently, leading to poor predictive performance. Accordingly, in the data preparation stage, the imbalance in the input data is addressed by converting the data into a balanced set, which is an essential step for any machine learning classifier (including SVM) to work properly. The output of this stage results in a class-balanced dataset which is employed by the Support Vector Machine (SVM) algorithm for processing to generate the classified data which are used for predicting syncope. These stages are elaborated on in the following sections.

Data Collection
The data utilized for this research were obtained from patients undergoing routine tilt table testing at the Syncope Clinic, General Hospital (LKH), Knittelfeld, Austria. The data were collected from a total of 687 patients in a purely clinical setting. All these patients had histories of syncope or dizziness upon standing up. Accordingly, the patients having recurrent syncope, or who were supposed to be high-risk patients having experienced at least a single episode of syncope, were considered for the study. All participants provided their written informed consent.
After arriving at the hospital, the patients were equipped with BP and electrocardiographic sensors. Data recorded through the sensors were saved digitally with the help of analog-to-digital converters communicating with computers. Specifically, hemodynamic responses. such as Heart Rate (HR) and mean arterial pressure responses at baseline and at the development of orthostatic intolerance during tilt table testing, were measured. The inclusion and exclusion criteria for patients undergoing tilt table testing were strictly followed. Further, in this exploratory study, continuous and non-invasive beat-to-beat HR and BP measurements were recorded.
The tests for this study found three main underlying mechanisms responsible for the triggering of the induction of syncope: (1) A sudden drop in BP, as shown in Figure 2; (2) A drop in HR, and thus drop in BP, as shown in Figure 3, and; (3) A continual drop in BP, as shown in Figure 4. Accordingly, in the data preparation stage, the imbalance in the input data is addressed by converting the data into a balanced set, which is an essential step for any machine learning classifier (including SVM) to work properly. The output of this stage results in a class-balanced dataset which is employed by the Support Vector Machine (SVM) algorithm for processing to generate the classified data which are used for predicting syncope. These stages are elaborated on in the following sections.

Data Collection
The data utilized for this research were obtained from patients undergoing routine tilt table testing at the Syncope Clinic, General Hospital (LKH), Knittelfeld, Austria. The data were collected from a total of 687 patients in a purely clinical setting. All these patients had histories of syncope or dizziness upon standing up. Accordingly, the patients having recurrent syncope, or who were supposed to be high-risk patients having experienced at least a single episode of syncope, were considered for the study. All participants provided their written informed consent.
After arriving at the hospital, the patients were equipped with BP and electrocardiographic sensors. Data recorded through the sensors were saved digitally with the help of analog-to-digital converters communicating with computers. Specifically, hemodynamic responses. such as Heart Rate (HR) and mean arterial pressure responses at baseline and at the development of orthostatic intolerance during tilt table testing, were measured. The inclusion and exclusion criteria for patients undergoing tilt table testing were strictly followed. Further, in this exploratory study, continuous and non-invasive beat-to-beat HR and BP measurements were recorded.
The tests for this study found three main underlying mechanisms responsible for the triggering of the induction of syncope: (1) A sudden drop in BP, as shown in Figure 2; (2) A drop in HR, and thus drop in BP, as shown in Figure 3, and; (3) A continual drop in BP, as shown in Figure 4.

Head-Up Tilt (HUT) Test
A footplate-supported table equipped with an automatic tilting mechanism was used for the HUT test. Before the tilting of the table, patients were observed in a supine position for ten minutes. The flat-top bedding surface containing safety straps was then tilted to the angles of 60° to 80° in a quick span of time. The rationale behind the whole action is that a sudden change in posture sometimes induces vasovagal syncope, which is characterized by a sudden drop in HR and BP [17]. Constant monitoring of electrocardiographic signals, along with continuous beat-to-beat checking of BP, was performed during the test.
The data were collected using the Task Force Monitor (CNSystems, Graz, Austria). All data obtained were obtained from each of the 3 positions: supine-HUT-return to supine and then the data were averaged. Systolic blood pressure and diastolic blood pressure were measured at the right brachial artery using the oscillometric method. Hemodynamic parameters such as stroke volume (SV), cardiac output, total peripheral resistance were recorded beat-to-beat using impedance cardiography [18][19][20]. Total peripheral resistance was calculated from the CO and BP values measured with a finger sensor; automatic calibration was performed using the oscillometric method. Heart rate measurements were carried out using RR-interval.
Presyncope is the state immediately preceding a syncopal event, defined as a sudden, brief, transient loss of consciousness [21][22][23]. 'Physiological' syncope during orthostatic loading develops as the result of critically diminished cardiac preload due to low venous return. Once the brain perfusion is reduced to below a critical level, a "vasovagal attack"

Head-Up Tilt (HUT) Test
A footplate-supported table equipped with an automatic tilting mechanism was used for the HUT test. Before the tilting of the table, patients were observed in a supine position for ten minutes. The flat-top bedding surface containing safety straps was then tilted to the angles of 60 • to 80 • in a quick span of time. The rationale behind the whole action is that a sudden change in posture sometimes induces vasovagal syncope, which is characterized by a sudden drop in HR and BP [17]. Constant monitoring of electrocardiographic signals, along with continuous beat-to-beat checking of BP, was performed during the test.
The data were collected using the Task Force Monitor (CNSystems, Graz, Austria). All data obtained were obtained from each of the 3 positions: supine-HUT-return to supine and then the data were averaged. Systolic blood pressure and diastolic blood pressure were measured at the right brachial artery using the oscillometric method. Hemodynamic parameters such as stroke volume (SV), cardiac output, total peripheral resistance were recorded beat-to-beat using impedance cardiography [18][19][20]. Total peripheral resistance was calculated from the CO and BP values measured with a finger sensor; automatic calibration was performed using the oscillometric method. Heart rate measurements were carried out using RR-interval.
Presyncope is the state immediately preceding a syncopal event, defined as a sudden, brief, transient loss of consciousness [21][22][23]. 'Physiological' syncope during orthostatic loading develops as the result of critically diminished cardiac preload due to low venous return. Once the brain perfusion is reduced to below a critical level, a "vasovagal attack" is triggered, which leads to decreases in heart rate and blood pressure and sudden dilation of the arterial vessels, leading to the loss of consciousness. The following criteria were used for presyncope: heart rate decreases by ≥15 bpm or blood pressure decreases to less than systolic 80 mmHg or by ≥25 mmHg/min; diastolic decreases by ≥15 mmHg/min; and/or nausea, cold-clammy skin or dizziness [24,25].
Tests concluded with the finding that out of 687 patients, 96 were recognized to have an induction of syncope while remaining 591 patients were able to keep control of their BP and HR, falling in the category of non-syncope. Table 1 presents the distribution of the patients having syncope in terms of age group and gender.

Data Organization
The BP and HR data recorded in the test were grouped as Beatstats, Cardiacbeatstats, HRVstats, dBPVstats and sBPVstats, as shown in Table 2. A total of 48 different physiological conditions against each subject were recorded in the proper format. It is beyond the scope of this work to provide a complete description of all the physiological indicators; however, a summary of each parameter, along with their quantifying mechanisms and their units of measurement, has been presented.

Data Preparation
The raw data recorded during tests consists of the continuous observation of HR and beat-to-beat checking of BP, which needs to be discretized for better applicability on ML models. TFM employed during the tests facilitates the discrete values of the continuous health indicators required for the classifications. To prepare the final dataset, the discrete values of the health indicators are further preprocessed with basic statistical functions of the maximum value (max), minimum value (min), mean (mean), standard deviation (sd), variance (var), coefficient of variance (vc) and standard error of the mean (sem).
It was observed that the data generated by the HUT test result in an imbalanced dataset, as only 96 patients were found to have induction of syncope against a total of 687 patients in the study. This imbalance in the data could result in a bias towards the majority class. The imbalance in the dataset can be resolved either by assigning different class weights for the majority and minority classes, or by oversampling the minority class with artificially created instances. The suitability of the method to be used depends on the considered classification models and the dataset. Methods such as Synthetic Minority Oversampling Techniques (SMOTE) [26] and Adaptive Synthetic (ADASYN) [27] have been reported in the literature for the generation of synthetic data. This work uses SMOTE to create the artificial instances of the minority class to address the data imbalance considering that the use of SVM-based model supported by the fact that KNN model used in the comparative analysis exhibits better suitability towards SMOTE.

Principal Components Analysis
To provide a view into the correlations and patterns between features of the dataset, principal component analysis (PCA) was performed on it in line with the work reported in [28]. Table 3 presents the variance explained by the significant principal components. Accordingly, the progression of cumulative variance explained by the principal components (PCs) is presented in Figure 5. patients in the study. This imbalance in the data could result in a bias towards the majority class. The imbalance in the dataset can be resolved either by assigning different class weights for the majority and minority classes, or by oversampling the minority class with artificially created instances. The suitability of the method to be used depends on the considered classification models and the dataset. Methods such as Synthetic Minority Oversampling Techniques (SMOTE) [26] and Adaptive Synthetic (ADASYN) [27] have been reported in the literature for the generation of synthetic data. This work uses SMOTE to create the artificial instances of the minority class to address the data imbalance considering that the use of SVM-based model supported by the fact that KNN model used in the comparative analysis exhibits better suitability towards SMOTE.

Principal Components Analysis
To provide a view into the correlations and patterns between features of the dataset, principal component analysis (PCA) was performed on it in line with the work reported in [28]. Table 3 presents the variance explained by the significant principal components. Accordingly, the progression of cumulative variance explained by the principal components (PCs) is presented in Figure 5.  It can be inferred from Table 3 and Figure 5 that first PC explains 20.17% of the variance in the dataset, first two PCs explain 31.95% of the variance in the dataset, the first three PCs explain 41.41% of the variance and so on. As can be seen, the first fifty PCs contribute almost 96.71% of the variance of the data, while remaining 182 PCs contribute It can be inferred from Table 3 and Figure 5 that first PC explains 20.17% of the variance in the dataset, first two PCs explain 31.95% of the variance in the dataset, the first three PCs explain 41.41% of the variance and so on. As can be seen, the first fifty PCs contribute almost 96.71% of the variance of the data, while remaining 182 PCs contribute only 03.29% of it. Figure 6 depicts the individual contributions of the fifty PCs contributing towards the 96.71% of the overall variance of the data. only 03.29% of it. Figure 6 depicts the individual contributions of the fifty PCs contributing towards the 96.71% of the overall variance of the data. The individual contributions of the first 50 PCs have been presented in Figure 6. As can be seen, the first PC (PC-1) contributes 20.17% of the variance, the second PC (PC-2) contributes 11.77% of the variance and the third PC (PC-3) contributes 09.45% of the variance, and so on and so forth. The scatter plot shown in Figure 7 depicts the variance explained by the first two PCs (PC-1 and PC-2) in a 2-dimensional space.    5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47   The individual contributions of the first 50 PCs have been presented in Figure 6. As can be seen, the first PC (PC-1) contributes 20.17% of the variance, the second PC (PC-2) contributes 11.77% of the variance and the third PC (PC-3) contributes 09.45% of the variance, and so on and so forth. The scatter plot shown in Figure 7  only 03.29% of it. Figure 6 depicts the individual contributions of the fifty PCs contributing towards the 96.71% of the overall variance of the data. The individual contributions of the first 50 PCs have been presented in Figure 6. As can be seen, the first PC (PC-1) contributes 20.17% of the variance, the second PC (PC-2) contributes 11.77% of the variance and the third PC (PC-3) contributes 09.45% of the variance, and so on and so forth. The scatter plot shown in Figure 7 depicts the variance explained by the first two PCs (PC-1 and PC-2) in a 2-dimensional space.    5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47     Again, it can be inferred from Figure 8 that the classes of syncope and non-syncope are not well separated, as PC-1, PC-2 and PC-3 together explain only 41.40% of the variance.

Data Classification
This stage corresponds to the use of machine learning algorithm, which is SVM, in this case, to be applied to the data collected which has been collected and pre-processed in the previous stages. This is the most important stage of the process which determines the utility of the work in meeting the classification objectives.

Support Vector Machine
Machine learning offers the use of many classification algorithms, each having its own advantages and drawbacks. Which algorithm will work well in a given case depends on the type of the problem and the dataset in question. In general, it has been established that the performance of the machine learning algorithms can be ascertained only through trial and error and through performance metrics.
In the context of this work, there were several factors which were taken into account for considering SVM-based classification of syncope. SVM generally does not suffer from the condition of overfitting and performs very well when there is a clear indication of separation between classes. It shows better adaptability towards data that are not regularly distributed and have an unknown distribution. The kernel of SVM provides nonparametric functions that allow the choosing of non-linear functions depending on the data being operated on and thus performs complex classifications with better results than the other classifiers. Further, outliers have less influence over SVM compared to other classifiers, providing fewer chances for the results to be skewed. Compared to other classifiers, SVM derives better results in quicker span of time. In addition, using the kernel functions of SVM the, input data can be converted into high dimensional data, avoiding the need for linearly separable data, which are required by other classifiers. The data considered in this work contain 231 attributes against each patient, which were derived from the 48 physiological indicators listed in Table 2. These data can be considered high dimensional, thus making the suitable for use with SVM. To summarize, the ability to deliver unique solutions makes SVM a robust model for this task compared to other models where more than one solution can be generated corresponding to each local minimum.
A support vector machine (SVM) is a linear classifier that works on margin optimization principles [29]. It performs the classification task by creating a hyperplane in a Again, it can be inferred from Figure 8 that the classes of syncope and non-syncope are not well separated, as PC-1, PC-2 and PC-3 together explain only 41.40% of the variance.

Data Classification
This stage corresponds to the use of machine learning algorithm, which is SVM, in this case, to be applied to the data collected which has been collected and pre-processed in the previous stages. This is the most important stage of the process which determines the utility of the work in meeting the classification objectives.

Support Vector Machine
Machine learning offers the use of many classification algorithms, each having its own advantages and drawbacks. Which algorithm will work well in a given case depends on the type of the problem and the dataset in question. In general, it has been established that the performance of the machine learning algorithms can be ascertained only through trial and error and through performance metrics.
In the context of this work, there were several factors which were taken into account for considering SVM-based classification of syncope. SVM generally does not suffer from the condition of overfitting and performs very well when there is a clear indication of separation between classes. It shows better adaptability towards data that are not regularly distributed and have an unknown distribution. The kernel of SVM provides non-parametric functions that allow the choosing of non-linear functions depending on the data being operated on and thus performs complex classifications with better results than the other classifiers. Further, outliers have less influence over SVM compared to other classifiers, providing fewer chances for the results to be skewed. Compared to other classifiers, SVM derives better results in quicker span of time. In addition, using the kernel functions of SVM the, input data can be converted into high dimensional data, avoiding the need for linearly separable data, which are required by other classifiers. The data considered in this work contain 231 attributes against each patient, which were derived from the 48 physiological indicators listed in Table 2. These data can be considered high dimensional, thus making the suitable for use with SVM. To summarize, the ability to deliver unique solutions makes SVM a robust model for this task compared to other models where more than one solution can be generated corresponding to each local minimum.
A support vector machine (SVM) is a linear classifier that works on margin optimization principles [29]. It performs the classification task by creating a hyperplane in a higher-dimensional space that optimally splits the data into two groups. For a dataset having m given training examples {(x 1 , y 1 ), . . . , (x m , y m ) }, where x i ∈ R N and y m ∈ {−1, 1}, SVM training tries to create the optimal hyperplane by evaluating the weight w and bias b for the linear decision function f (x) = w·x + b. The closest distance from the datapoints to the decision boundary is called the margin. For two oppositely margined data points x1, x2 with f (x1) = 1 and f (x2) = −1, the margins can be evaluated as shown in Equation (1); In order to find the optimal hyperplane, SVM solves the optimization problem which is given in Equation (2); s.t y i (w T x i + b) ≥ 1, where i = 1, 2, . . . , m and w T denotes the transpose of w.
As maximization of 2/||w|| is equivalent to minimization of ||w||/2, the optimization problem can be transformed into its dual problem that gives the quadratic problem as presented in Equation (3); . . , m. While solving the problem for optimal hyperplane it gives the parameter w, which is calculated as shown in Equation (4) as Thus, the linear decision function f (x) in dual space is evaluated as shown in Equations (5) and (6); The Karush-Kuhn-Tucker theory demonstrates that the examples satisfying the condition of y i (wx i + b) = 1, are the resultant non-zero instances.

Performance Metrics
Evaluating the performance of the classifier is an essential part of any machine learning model, as it delineates the correctness of the classification. For a classification problem of two or more output classes, the Confusion Matrix is one of the most intuitive metrics for finding the correctness of the model [30]. A confusion matrix is a square matrix having C i j as the data elements, where i and j denote the true label and predicted label of the data group, respectively. For a binary output classification problem, the confusion matrix is a 2x2 matrix of four elements viz. C 00 , C 01 , C 10 and C 11 , as shown in Table 4. C 00 denotes the count of true negative data points; C 01 denotes the count of false-positive data points; C 10 denotes the count of false-negative data points; C 11 denotes the count of true positive data points.
Using the above confusion matrix, any classification algorithm can be compared based on five performance measures viz. accuracy, Precision, Recall, F-1 Score and AUC-ROC. In general, accuracy is a simple and effective measure to judge the performance of a ML model. However, it is not a reliable metric for an imbalanced dataset. To address the concern of biasness towards the majority class in an imbalanced dataset, which can result in possible false accuracy, other performance metrics such as precision, recall, F1-Score and AUC-ROC are used. These parameters are briefly discussed below [31,32].
Accuracy: This is defined as the ratio of correct predictions to the total predictions made by the model. It is evaluated using the elements of the confusion matrix as shown in Equation (7); Accuracy = C 00 +C 11 C 00 +C 01 +C 10 +C 11 (7) Accuracy is a measure of the effectiveness of the machine learning model in establishing the relationship between the parameters and making correct classifications.
Precision: This is defined as the ratio of true positive predictions to the total number of positive predictions. Precision is a measure of the relevancy of the results and is calculated as shown in Equation (8); Recall: This is evaluated as the ratio of true positive predictions to actual positive samples. Recall is a measure of the total number of predictive instances correctly classified by the model, which is calculated as shown in Equation (9).
For binary classifications, Recall is also referred to as the sensitivity of the model. F1-Score: This is the harmonic mean of precision and recall that is used to create the balance between the false positives and false negatives of the samples. It is evaluated as shown in Equation (10); A good F1-Score proves the effectiveness of the model and indicates that the model is exhibiting low false positives and low false negatives.
AUC-ROC: The receiver operating characteristics (ROC) curve is a technique to depicts the visualization, organization and selection of classifiers for all the classification thresholds. The ROC curve is plotted between the true positive rate on the y-axis and the false-positive rate on the x-axis. The area under the ROC curve (AUC-ROC) is the significant measure of the performance of binary classifiers.

Classified Output
A simulation was carried out for using the SVM model and evaluating the results on the basis of various performance indices. The hardware, software and API specifications used in the study are listed in Table 5. As mentioned in Section 2, in general, the reported works in the domain lack the following: The imbalance in classes of data has not been addressed; The generated dataset is based on responses to a questionnaire instead of the true physiological data; The generated dataset is based on the observations made by individual physicians and not on continuous observation of the heart rate and beat-to-beat recording of blood pressure.
In the light of the above, it was not possible to compare the results found here with similar works. However, based on the application of the classification model to the dataset, and to provide a better look into its consistency, the evaluation of the proposed model was performed in two ways viz. The Train-Test-Split evaluation and K-fold cross-validation evaluation. Additionally, the results of the SVM-based classification model were compared with two models viz. k-Nearest Neighbor (KNN) [33] and Stochastic Gradient Descent (SGD) learning [34] using the same dataset in the same computing environment.
The SVM model-related parameters considered for experimentation are: kernal, gamma and C. The mathematical functions used by SVM algorithms are known as the kernel. Parameter 'C' controls the tradeoff between margin maximization and error minimization and is a measure used to avoid misclassification. The parameter gamma is used to address the variance in the model. Using Scikit learn, kernel has been set as linear, C = 2 and gamma = auto decided based on standard practices. The other considered parameters for simulating the SVM, SGD and KNN algorithms are listed in Table 6.

Contributing Features
The dataset has 232 features for each instance of syncope and non-syncope with different contributions to the classification task. A bar graph depicting the contribution of each feature for first twenty features is shown in Figure 9. It can be inferred from Figure 9 that the maximal value of normalized low frequency diastolic blood pressure (dBPS_LFnu_max) is the feature that contributes the most, followed by the maximal normalized low-frequency RR Interval of HRStats (HRS_RRI_LFnu_max) and the mean of the normalized high-frequency diastolic blood pressure (dBPS_HFnu_mean) in the same order.

Contributing Features
The dataset has 232 features for each instance of syncope and non-syncope with different contributions to the classification task. A bar graph depicting the contribution of each feature for first twenty features is shown in Figure 9. It can be inferred from Figure  9 that the maximal value of normalized low frequency diastolic blood pressure (dBPS_LFnu_max) is the feature that contributes the most, followed by the maximal normalized low-frequency RR Interval of HRStats (HRS_RRI_LFnu_max) and the mean of the normalized high-frequency diastolic blood pressure (dBPS_HFnu_mean) in the same order.

Train-Test-Split Evaluation
In the train-test-split evaluation method, the entire dataset is separated into two segments for the purpose of training and then testing the model. This is an important step in which the training set data correspond to the known values of syncope and non-syncope as an attribute, which are tested for the model's predictions for the test set data. In this work, the entire dataset of 687 patients was divided into the ratio of 80:20, respectively, for training and testing, which is standard practice when using this method of evaluation and has been validated experimentally. This means that 80 percent of the dataset is utilized for training the models, while the remaining 20 percent is used for testing them. This ensures that the test set is neither too small nor too big.
The results derived by the SVM, KNN and SGD-based classification models using train-test-split evaluation in the form of a confusion matrix are shown in Table 7. Based on the elements of the confusion matrix, a measure of the performance indices of accuracy, Precision, Recall, F1-Score and AUC-ROC is presented in Table 8.

Train-Test-Split Evaluation
In the train-test-split evaluation method, the entire dataset is separated into two segments for the purpose of training and then testing the model. This is an important step in which the training set data correspond to the known values of syncope and non-syncope as an attribute, which are tested for the model's predictions for the test set data. In this work, the entire dataset of 687 patients was divided into the ratio of 80:20, respectively, for training and testing, which is standard practice when using this method of evaluation and has been validated experimentally. This means that 80 percent of the dataset is utilized for training the models, while the remaining 20 percent is used for testing them. This ensures that the test set is neither too small nor too big.
The results derived by the SVM, KNN and SGD-based classification models using train-test-split evaluation in the form of a confusion matrix are shown in Table 7. Based on the elements of the confusion matrix, a measure of the performance indices of accuracy, Precision, Recall, F1-Score and AUC-ROC is presented in Table 8. It can be inferred from Table 8 that the SVM-based classification model is able to classify the patients with syncope with 97.82% of accuracy which is much higher than the SGD and KNN based classification reporting accuracy of 87.68% and 84.05%, respectively. Similarly, the precision reported by SVM-based model is 98.23% which is again significantly better than precision reported by KNN and SGD being 92.38% and 91.81%, respectively. SVM-based model reports better recall at 99.10% in comparison with 92.66% and 87.38% reported by SGD and KNN, respectively. The F1-Score reported by SVM-based model is 98.66% which is again higher than 92.23% and 89.81% as reported by SGD and KNN. Finally, SVM -based model reports much higher AUC-ROC of 98.71% in comparison with 90.56% and 83.66% as reported by SGD and KNN. Considering these results, it can be concluded that the SVM-based model is able to perform classification reasonably well reporting superior results for all the considered performance indices as compared to peers.

K-Fold Cross-Validation Evaluation
The K-fold cross-validation is an iterative method used to evaluate the performance of the machine learning model especially when the data sample size is limited. The method evaluates the generalizability of a machine learning model by estimating their performance on unseen or new data with lower bias. Without the cross-validation we only have the assessment of the model over training data that would not provide evaluation of model over new dataset. Thus, after the model has been run using train-test-split, K-fold cross-validation method validates the results.
In the present work, using K-fold cross-validation, the dataset is divided into K = 10 disjoint sets as shown in Figure 10. The value of K has been chosen carefully through experimentation. The dotted bars represent the subsets of data that have been iteratively used for training the model while the crisscross bar represents the data that have been used for testing it. The process iteratively runs ten times with different sets of data for training and testing purposes.

K-Fold Cross-Validation Evaluation
The K-fold cross-validation is an iterative method used to evaluate the performance of the machine learning model especially when the data sample size is limited. The method evaluates the generalizability of a machine learning model by estimating their performance on unseen or new data with lower bias. Without the cross-validation we only have the assessment of the model over training data that would not provide evaluation of model over new dataset. Thus, after the model has been run using train-test-split, K-fold cross-validation method validates the results.
In the present work, using K-fold cross-validation, the dataset is divided into K= 10 disjoint sets as shown in Figure 10. The value of K has been chosen carefully through experimentation. The dotted bars represent the subsets of data that have been iteratively used for training the model while the crisscross bar represents the data that have been used for testing it. The process iteratively runs ten times with different sets of data for training and testing purposes.  Using K-fold cross-validation evaluation for ten runs, the performance indices of accuracy, precision, recall, F1-Score and AUC-ROC were observed for the SVM, KNN and SGD-based models separately. To provide a comprehensive look into the performance of the models, the statistical parameters of results viz. minimal values (Min), maximal values (Max), the number of times the maximum value is attained (No. Of Max), mean values (Mean) and standard deviation (SD) across the tenfold validation of the model were observed and are presented in Table 9.  Table 9, considering the Mean of each performance indices across the running of the tenfold validation, it can be seen that the SVM model classifies the instances of syncope and non-syncope fairly well, with at least 97.52% accuracy, 91.23% precision, 92.17% recall, 91.39% F1-Score and 94.90% AUC-ROC. It can be inferred from Table 9 that the SVM-based model is computing results with significantly better accuracy for all statistical parameters of Min, Max, No of Max, Mean and SD in comparison with the SGD and KNN-based models. The case for precision is similar, as the SVM-based model performs better in all categories except for for No of Max, which is higher in KNN. For the remaining indices of recall, F1-Score and AUC-ROC, it can be seen that SVM-based model is performing significantly better than the SGD and KNN-based models for all the considered statistical parameters. Therefore, it can be concluded that for the K-fold cross-validation evaluation of the models, similarly to test-train-split evaluation, the SVM-based model again outperforms its peers on all the performance indices of accuracy, precision, recall, F1-Score and AUC-ROC. It is to be noted that for the SVM-based model, the maximal value of one for all the performance indices has been attained at least once across the tenfold validation. Additionally, the model computes the highest value four times for precision and recall, two times for F1-Score and once each for accuracy and AUC-ROC. The reported SD for the SVM-based model proves that the dispersion into the values of indices in relation to their Mean are significantly low, which indicates that the SVM-based model is performing well even for unseen data.

Limitations and Future Work
In this paper we examined only the robustness of our model against all patients who developed presyncope and those that did not. However, we are aware that different disease conditions, along with polypharmacy, may contribute towards differences in the data, including those related to the ECG. While this comparison was not the focus of the study, this important aspect should definitely be studied in the future, especially across diseases [35] and in older persons [24,[36][37][38]. We have previously reported that there are indeed different cardiovascular patterns during graded orthostatic-loading-induced presyncope, albeit in healthy participants [39].
The authors look forward to evaluating the performance of the model being assessed over a significantly large dataset containing the records of thousands of patients. To take the work forward, we intend to examine in detail the features of the ECG and BP to determine whether they can have a predictive value on their own. In this work, the model was created by the application of algorithms to the data, which does not provide much information about the variables and their combinations used in reaching the decisions. To address the same, we are separately working to add more understanding into the decision making of the model by recalling comprehensibility or interpretability. While it is important to assess the generalizability of the data, which is often difficult due to interindividual differences in hemodynamic responses and time to collapse [18], future studies should be carried out to assess the effects of sex [40][41][42], season [43] and/or across the races on the reproducibility of the data obtained.

Conclusions
For patients having LOC or near LOC, establishing the true form of syncope forms a crucial part for the treatment process. This work differentiates patients who do or do not have induction of syncope and non-syncope based on their physiological indicators by measuring continuous and non-invasive beat-to-beat BP and HR. The machine learning algorithms of SVM, KNN and SGD were employed using the data collected in HUT tests under clinical settings for syncope classification. The models were evaluated for their performance using the train-test-split evaluation mechanism and further validated using K-fold cross-validation. The statistical values-based performance indices observed in the results using both train-test-split evaluation and K-fold cross-validation lead us to the conclusion that the SVM-based model can differentiate between syncope and nonsyncope events in a significantly more efficient manner than the KNN and SGD-based models. Therefore, the SVM-based model provides an alternative to the existing diagnostic process and proves the efficiency of using machine learning methods over healthcare data, paving the way for its applicability in the real diagnostic mechanisms used for proactive syncope prediction.

Institutional Review Board Statement:
The participants included in this study gave their informed written consent to participate in the study before the first measurements were made and received feedback on their results after completing the study. The study protocol adhered to the guidelines of "good clinical practice" (ICH-GCP), followed the Declaration of Helsinki (2013) and complied with the regulations of the National Data Protection Act (Section 14 Abs. 1, DSG 2000).

Informed Consent Statement:
Informed consent was obtained from all subjects involved in the study.

Data Availability Statement:
The data in this study are readily available upon reasonable request to the corresponding author.

Conflicts of Interest:
The authors declare no conflict of interest.