1,034
Views
0
CrossRef citations to date
0
Altmetric
Computer Science

Artificial intelligence for heart disease prediction and imputation of missing data in cardiovascular datasets

ORCID Icon & ORCID Icon
Article: 2325635 | Received 05 Aug 2023, Accepted 27 Feb 2024, Published online: 13 Mar 2024

Abstract

According to World Health Organization (WHO) data, cardiovascular diseases (CAD) continue to take the lives of more than 17.9 million people worldwide each year. Heart attacks are considered a fatal disease in this category, especially for older adults, which highlights the need to employ artificial intelligence to anticipate this disease. This research faces many challenges, starting with data quality and availability, where AI models require large and high-quality datasets for training. Elderly populations exhibit various health conditions, lifestyle factors, and genetic diversity. Creating AI models that can accurately generalize across such a diverse group can be challenging. Two datasets for CAD diseases were used for this study. Traditional machine learning (ML) techniques were used on these datasets, as well as a neural network method based on extreme learning machines (ELM), which provided varying percentages of accuracy, time, and average estimated error. The ELM algorithm outperformed all other algorithms by attaining the best accuracy, the shortest execution time, and the lowest percentage of average estimated error. Experimental results showed that the Extreme learning machine performed well with 200 hidden neurons, even with the proposed absence of parts of the dataset, with an accuracy of 97.57–99.06%.

1. Introduction

Cardiovascular diseases are referred to as blood vessel and heart illness, which comprise a diverse array of issues; they are commonly related to the atherosclerotic process. When an element termed plaque accumulates in the walls of the arteries, a situation known as atherosclerosis occurs. Because of the buildup, it becomes more difficult for blood to flow through the arteries. A blood clot can halt blood flow if it develops. Heart attack or stroke risk due to this. When a blood vessel stops supplying the brain, typically through a blood clot, an ischemic stroke (the most frequent type) occurs. Brain cells will perish if a part of the brain is not getting enough blood. Many studies and research have addressed the importance of machine learning and neural networks. It aims to predict the following cardiovascular diseases as they appear in studies and literature that deal with them: heart attack (Bharti et al., Citation2021; El Hamdaoui et al., Citation2020; Haq et al., Citation2019; Javeed et al., Citation2022; Kondababu et al., Citation2021; Riyaz et al., Citation2022; Sharma et al., Citation2020; Takci, Citation2018), stroke (Dritsas & Trigka, Citation2022; Emon et al., Citation2020; Fernandez-Lozano et al., Citation2021; Heo et al., Citation2020; Li et al., Citation2020; Lin et al., Citation2020; Park et al., Citation2020; Sirsat et al., Citation2020), heart failure (Alotaibi, Citation2019; Awan et al., Citation2019; Choi et al., Citation2020; Krittanawong et al., Citation2020; Olsen et al., Citation2020; Segar et al., Citation2021), Arrhythmia (Feeny et al., Citation2020; Kristensen et al., Citation2019; Shade et al., Citation2020; Tiwari et al., Citation2020; Trayanova et al., Citation2021), and heart valve problems (Martin-Isla et al., Citation2020; Ozelsancak et al., Citation2019; Ristow et al., Citation2008; Sankararaman, Citation2022; Vennemann et al., Citation2019).

This research aims to present a method through which a heart attack can be predicted with high accuracy, taking into account the time factor, which is considered essential to speed up the response time and make the appropriate decision in the future, especially when using this system in integration with the Internet of Things, which is supposed to save lives. Many patients with cardiovascular disease are at risk of having a heart attack. Diagnosing and predicting heart attacks using artificial intelligence (AI) in the context of elderly individuals comes with various challenges. Some of the prominent challenges include:

  • Limited Training Data for the Elderly Population: Training AI models specifically for older people requires sufficient and representative data. However, there may be a scarcity of labeled data for elderly individuals, making it challenging to develop models that perform well in this demographic.

  • Underlying Health Conditions: Elderly individuals often have multiple comorbidities and pre-existing health conditions. AI models must account for these factors to assess the risk of a heart attack accurately. Incorporating this complexity into predictive models is a significant challenge.

  • Ethical and Regulatory Considerations: Implementing AI in healthcare, especially for critical conditions like heart attacks, raises ethical concerns. Addressing the ethical and regulatory challenges is crucial for the widespread adoption of AI in healthcare.

  • Data Acquisition Time: Gathering relevant health data for prediction models takes time. There might be limited time to collect comprehensive data in emergencies like heart attacks. Rapid data acquisition and processing are crucial for timely predictions.

  • Integration with Emergency Medical Services: AI systems must be seamlessly integrated into emergency medical services for timely intervention. Ensuring that AI predictions are communicated quickly and effectively to healthcare providers in emergencies is a logistical challenge that needs attention.

  • Clinical Validation and Acceptance: AI models must undergo rigorous clinical validation to demonstrate their efficacy in real-world settings. Gaining acceptance from healthcare professionals, especially in emergencies, is crucial for widespread adoption.

This research consists of an introduction and three main parts. The first is the previous studies, and the second is related to the experimental methodology, which includes choosing the appropriate data set for this research and then preprocessing the data, which provides for cleaning and scaling the data, leading to a review of seven machine learning methods and the extreme learning machine method that falls within neural networks. The third part includes the results and discussion, which provides for applying the eight techniques and extracting their results. Then, we created missing data and measured the accuracy and time to confirm the effectiveness of the proposed model compared to other ML methods to reach our results with the results obtained by other researchers. shows the details of the practical side of this paper.

Figure 1. Proposed workflow diagram.

Figure 1. Proposed workflow diagram.

2. Background study

In the United States, heart disease claimed the lives of nearly 805,000 people, according to the latest statistics in 2020. It kills only one person in the United States every 40 seconds. The importance of early detection of that disease is getting bigger every day, and here is the essence of using prediction models that depend on medical data sets and the indicators, numbers, and symptoms they contain for those patients through using ML classifiers that are part of the concept of artificial intelligence in classifying these data to Analyze them and thus draw conclusions and expectations based on those inputs. This section highlights a few scientific papers that used machine learning and neural networking techniques to estimate the occurrence of heart attacks. The discussion clarifies that the precision achieved in individual research studies is currently unsatisfactory. Compared to other algorithms, some of them offer better performance. The research study successfully located studies with a wide range of accuracy. The goal of the research is to identify classifiers that can accurately predict heart attacks with high effectiveness to be of use in critical and uncritical healthcare situations.

The studies dealt with the 1st dataset called (Heart Attack Analysis and Prediction Dataset) which shows that Yuan (Citation2021) developed a framework for extracting features using the principle component analysis (PCA) and then compute a mathematical model to choose relevant attributes under suitable restrictions. Several approaches were used, such as random forest (RF) and K-nearest neighbors (KNN). The experiment’s top-performing model was verified with RF, with an average accuracy of 88%. Alhabib (Citation2022) attempts to model and solve the problem of cardiac arrest prediction. In different machine algorithms like NB and RF, the highest accuracy can be achieved using an RF algorithm, which results in an accuracy of 83.49%. Paper (Shi et al., Citation2021) was applied (SVM, GB, RF, NURAL, and LR), and the LR achieved the best accuracy with 87% (Xu et al., Citation2021). also lay a neural network with 90% accuracy, and Kwegyir et al. (Citation2021) used an FNN neural network to achieve an accuracy of 89%. In contrast, Dwivedi (Citation2018) tested the same dataset with LR, KNN, and deep learning (DL) to have the best accuracy of 94% through DL. The experimental findings (Kavitha et al., Citation2021) indicate that a hybrid model (a decision tree and a random forest combined) achieved an average accuracy of 88.7%. At the same time (Singh & Kumar, Citation2020), the authors get an accuracy rate of 88.52% using the KNN classifier. The studies dealt with the 2nd dataset titled (The ‘z-Alizadeh Sani dataset’), which shows that Gupta et al.’s (Citation2022) several types of approaches were used. Still, the Random Forest (RF) classifier reveals that the maximum accuracy achieved was 97.37. In contrast, Gupta et al. (Citation2021) performed SVM (86.78%), which is less than LR accuracy (88.55%), which is a better approach, but finally, the best accuracy scoring is 94.74% using RF. Paper (Joloudari et al., Citation2022), using Deep Neural Network (DNN) methods, achieved the highest accuracy of 97.88% (Yuvalı et al., Citation2022) and tested the same dataset LR at 92.4%, and NB was 91.4%. The experimental findings (Ashish et al., Citation2021) indicate that a hybrid model (SVM-XG-Boost) achieved an average accuracy of 93.86%. At the same time, Valarmathi and Sheela (Citation2021) got an accuracy rate of 95.04% using an RF classifier, while Joloudari et al. (Citation2022) used the DNN to achieve 92.18% accuracy.

3. Material and methods

3.1. Data set gathering

More than eleven data sets related to cardiovascular diseases were reviewed based on the similarity of symptoms, causes, and effects between stroke, heart disease, and thalassemia. Finally, two data sets were used for three reasons (No missing data, diversity for attributes, the number of features being highly concerning to the total number of samples, and its significance in targeted health diseases). The 1st one is [Heart Attack Analysis and Prediction Dataset] from Kaggle (https://www.kaggle.com/datasets/rashikrahmanpritom/heart-attack-analysis-prediction-dataset). The dataset includes 303 clinical records and 14 attributes. It consists of 96 females and 207 males. 133 (43.89%) Patients’ conditions are expected, and 170 (56.11%) patients suffer from heart illness. The 2nd one is [‘Z-Alizadeh Sani dataset’] according to the UCI Repository (Alizadehsani et al., Citation2013), it contains 303 patient records and 56 attributes, it includes 127 females and 176 males where 88 (29.04%) Patients’ conditions are normal and 215 (70.96%) patients suffer from heart illness.

3.2. Limitations of the study

  1. Limited Generalizability: The findings of this study are based on specific datasets and may not be universally applicable with the same accuracy. Generalizing the results to broader populations or different healthcare settings should be done cautiously.

  2. Dataset Characteristics: The study relies on particular datasets, and the characteristics of these datasets may influence the performance of the machine learning models. Variations in data sources could impact the external validity of the results.

  3. Imputation Methods: While the study compares imputation methods, the choice of imputation technique introduces subjectivity. Other imputation methods not considered in this study could yield different results.

  4. Temporal Limitations: The study may not account for temporal changes in the data. Healthcare data, especially in cardiovascular contexts, can evolve, and the study’s findings may not capture these dynamic aspects.

  5. Algorithm Sensitivity: Machine learning algorithms, including imputation methods, are sensitive to input data characteristics. The performance observed in this study might vary when applied to different datasets with distinct features.

3.3. Data preprocessing

Data preparation refers to transforming unprocessed data into a practical, understandable format. Unprocessed datasets frequently contain human errors and inconsistent formatting but are occasionally lacking. Data preprocessing corrects these issues and enhances the reliability and usefulness of ML datasets. Several techniques for normalizing data include z-score, decimal scaling, and min-max (range transformation). The Z-score normalization technique was chosen in this part to normalize and scale the selected datasets because it enables a data administrator to comprehend the chance that a score will arise within the data normal distribution and its effectivity in the presence of missing data. This approach is based on normalizing values on the Mean of data and standard deviation. Data transformations are the method’s key component. The methodologies and processes encompass standardizing the data to a uniform scale, where the Mean is set to zero, and the standard deviation is adjusted to precisely one. It measures total standard deviations under or higher than the Mean. Z-score normalization is generally unaffected by outliers since there is no defined range of changing features, just as shown in the equations below (Imron & Prasetyo, Citation2020). (1) x=(xμ)/σ(1)

Where x is the initial value, μ is referred to as the data’s Mean, and σ is the data’s standard deviation, which can be calculated through the equation below. (2) σ=Nxμ2(2)

Where N is the population’s size, x refers to each population-based value, and μ is the average population.

We addressed the imbalance in the second dataset by applying regularization techniques and optimizing hyperparameters to enhance model stability. We also implemented data preprocessing methods, such as feature scaling and outlier handling, to strengthen the model’s resilience. Furthermore, we conducted experiments with different random seeds to assess the model’s consistency across multiple runs. The combination of these strategies contributed to mitigating imbalances and improving the overall reliability of our results in the second dataset.

3.4. Performance evaluation metrics

Eight (8) ML and Neural Techniques were used to analyze the two datasets and also to compare accuracy and time to be able to choose the algorithm that performs the best results. The algorithms applied were decision tree (DT), linear discriminant analysis (LDA), Support vector machines (SVM), logistic regression (LR), Naive Bayes (NB), K-nearest neighbors (KNN), ensemble (bagged tree), and Extreme learning machine (ELM). These algorithms were tested and evaluated based on their performance metrics. A summary of each one of these ML classifiers will be described in this subsection. A confusion matrix was obtained to determine the accuracy of disease prediction for each method, as shown in .

Table 1. Graphical presentation of Fusion Matrix.

The accuracy was calculated using the proposed EquationEquation 3 (Imron & Prasetyo, Citation2020): (3) Accuracy=(TP+TN)/(TP+FP+TN+FN)(3)

Where TP: Actual positive values versus expected positive values. FP: Actual false values versus expected positive values. FN: Actual false values versus expected negative values. TN: Actual positive values versus expected negative values.

3.5. Machine learning algorithms approaches for disease prediction

In this work, eight approved machine-learning techniques were used. The fundamental algorithm is initially practiced in supervised ML techniques on the labeled training dataset. The next part briefly describes these suggested ML formulae for illness diagnosis.

3.5.1. Decision tree (DT)

They are considered one of the earliest and the most widely used ML techniques, which is DT. DT develops the reasoning for evaluating and analyzing the results for grouping data items into a structure resembling a tree. A DT often has multiple layers of nodes; the highest level is the root or parent node, while the more minor degrees are called the leaf node. All internal nodes show the assessment of input variables or attributes with at least one leaf node. The procedures used in classification are based on the outcomes of the assessment branch to the relevant leaf nodes and continue branching plus evaluating till they reach the leaf node: the results and the leaf or terminal nodes, respectively. DT is a fundamental part of many methods for specific diagnosis and is acknowledged as simple to comprehend and master. This technique used the highest deep value and generated almost the top performance regarding the used dataset in this paper.

3.5.2. Linear discriminant analysis (LDA)

The LDA approach is a multi-class classification predictive modeling approach, linear discriminant analysis, or LDA for short. It can also reduce the number of dimensions in a dataset by projecting the trained dataset to divide the instances into their respective classes optimally. Before the classification procedure, the number of features is condensed to a more manageable number using (LDA). A linear combination of pixels is used to create each additional dimension.

3.5.3. Logistic regression (LR)

LR is a robust classifier inside SML algorithms that expands a general regression model when used with a dataset. It expresses how likely a specific incident will occur or not. LR calculates the chance that a new observation will belong to a particular class, with the result between 0 and 1 because it is a probability. A threshold indicates the division into two classes to apply the LR as a classifier. For instance, ‘class A’ is defined as a probability ratio greater than 0.50; else, ‘class B’ has been used. The LR method could provide a categorical variable with higher than two possible values, and the logistic regression was enlarged as a multinomial model.

3.4.4. Naive Bayes (NB)

Naive Bayes is an algorithm for ML techniques that can be used for large amounts of data; it is the suggested strategy even when working with data that has millions of database files. It produces excellent results for NLP applications like sentimental analysis. It is a classification technique founded on predictor isolation and the Bayes Theorem. A Naive Bayes classification algorithm thinks that the existence of one attribute in a category has no bearing on the existence of any more features.

3.5.5. Support vector machines (SVM)

Support vectors are information close to the hyperplane and only affect the direction and position of the hyperplane. Then, boost the edge of the classifier by using these coordinates. If the prototype variables are removed, the hyperplane’s position will change. These principles served as the foundation for the creation of the SVM. A deep learning system (SVM) uses supervision to categorize or forecast how particular data groups behave. Machine and artificial intelligence-controlled learning systems provide input and desired output data tagged for categorization.

3.5.6. K-nearest neighbors (KNN)

statistical learning methods or classification techniques, KNN is considered one of the earliest and most superficial. The term ‘K’ relates to the ratio of closest neighbors. It can also be specified explicitly in the concept of the constructor or estimated by calculating the available bound using the fixed value. As a result, classifications for related situations are similar, and an additional instance is categorized by comparing it to each existing model. The Nearest neighbor process will look for the similarity space for the k-training samples whenever a sample with no known identity is received. Two different approaches are provided to convert the distance into a weight, and predictions from many neighbors can be calculated based on how far they were from the training sample.

3.5.7. Ensemble (bagged tree)

The concept behind ensemble classification is to learn a group or an ensemble of classifiers and then combine their predictions to classify examples that have not yet been observed via a voting mechanism. The fundamental principle of the ensemble model is that classes may be united to produce strong learners. When a decision tree’s variance has to be reduced, bagging is used (also known as bootstrap aggregate). Splitting the trained model is the objective into different subsets of data using replacement sampling.

3.5.8. Extreme learning machine (ELM)

A single hidden layer feedforward neural network called the Extreme Learning Machine (ELM) was developed (SLFN) with enough hidden neurons to globally any continuous functions or small input sets with zero or arbitrarily tiny errors. Any nonlinear activation function with Any input biases and weights may be employed. Other benefits include low human creativity, high learning effectiveness, and rapid learning speed. ELM techniques may not involve tweaking the input weights and biases, and the output weights may be quickly produced using least square optimization, in contrast to most real ANN implementations, which call for tuning all of the feedforward network parameters. The regularization value (R) and the number of concealed nodes (L) are two vital components of the Regularized ELM (RELM), a well-known variant of ELM. It makes it possible to increase stability, robustness, and generalization performance by adding a small positive value known as the regularization parameter to the diagonal HT H or HHT, preventing model overfitting and raising overall prediction accuracy. RELM strives to maintain the network output weights’ norm as low as feasible while allowing minimal training mistakes. It offers a middle ground between decreasing the least square error and maximizing marginal distance reducing the standard of β) and minimizing the least square error. As in the five ELM equations, the algorithm mentioned below (Abd Shehab & Kahraman, Citation2020) (4) Minimizeβ:fELM=12β22+12λi=1Nξi22 (4) Subject to:=tiTξiT,i,i.e,i=1,,N

Where λ is the regularization parameter and (5) H (w1,··,wL; b1,··,bL;x1,··,xN)=[G(w1, b1,x1)···G(wL,bL,x1)···G(w1, b1,xN)··· G(wL,bL,xN)]N×L(5)

By substituting ξ=T and taking fELMβ=0, this leads to a unique closed-form solution as in EquationEquations 5 and Equation6: (6) H=(HTH+ λI)1HT if NL (6) (7) H=HT(HHT+ λI)1 if L>N (7) (8) Finally β=HT and f(x)=h(x).β(8)

In RELM, H^† is formed depending on both N& L dimensions.

We mention that the layers used in applying this method are the same as the original three layers mentioned in , and two values have been applied to the hidden neurons, which are (100 and 200). The value of 200 is the value that achieves the highest level of accuracy, as will be explained later.

Figure 2. ELM (RELM) architecture (Imron & Prasetyo, Citation2020).

Figure 2. ELM (RELM) architecture (Imron & Prasetyo, Citation2020).
  • Algorithm 2.1. Standard ELM and RELM (Abd Shehab & Kahraman, Citation2020)

  • An N-sample training set is provided. as ={(xi, ti)|xiRn, tiRm,i=1,···,N}, activation function G(x), and hidden nodes number L;

    • Assign randomly input weight vectors or centers. wi and hidden nodes bias  bi, i=1,···,L.

    • Using equation below, the hidden layer output matrix should be calculated as H (w1,···,wL, b1,,bL,x1,···,xN).

    • Calculate the output weight β as  β=H T, where H=(HTH)1HT Is the generalized Moore-Penrose inverse of the hidden layer output matrix H. In addition, it can H=(HTH+λI)1HT if NL or H=HT(HHT+ λI)1 if L>N

  • According to the perspective of evaluation, the samples are separated into the testing and training sets. There are training sets used firstly for getting the value of the output weight (β), then.

    • Employing the pre-calculated β in step 3 to approximate or classify the test patterns using the following equation ytest=h(x).β=Htestβ for regression, then apply Ltest=argmaxrow(ytest) For classification, the arg function returns the index of the maximum value for each row of ytest.

  • Where, Ltest(m×1) is the output label of m testing instances.

4. Results and discussion

4.1. Result of ML prediction from original datasets

After the eight machine language and neural networks, methods were applied for disease prediction on the original data set on the two target data sets as in and and and .

Figure 3. ML test comparison chart for Heart Attack Analysis and Prediction dataset.

Figure 3. ML test comparison chart for Heart Attack Analysis and Prediction dataset.

Figure 4. ML test comparison chart for the ‘Z-Alizadeh Sani dataset’.

Figure 4. ML test comparison chart for the ‘Z-Alizadeh Sani dataset’.

Table 2. ML test comparison for the original Heart Attack Analysis and Prediction dataset.

Table 3. ML test comparison for the original Z-Alizadeh Sani dataset.

and depict the utilization of machine learning to the first data set with its original data without loss. The ELM technique is superior in achieving the highest accuracy among other methods while at the same time performing the lowest execution time, as the accuracy rate achieved through the use of 200 hidden neurons reached 97.58% with an operating time not exceeding one-tenth of a second. The same result was repeated with the second data set, in which the last method recorded an accuracy of 99.061 and a runtime of 0.0547. Here, it became necessary to compare these results in light of missing data to ensure that the Elm method achieves an advanced accuracy in disease prediction compared to other methods, as shown in and .

Figure 5. Data that was intentionally lost ‘Z-Alizadeh Sani dataset’.

Figure 5. Data that was intentionally lost ‘Z-Alizadeh Sani dataset’.

4.2. Results for ML using datasets after missing data imputing

In this part, although the two targeted data sets did not include lost data, it was important to apply some reliable and proven techniques in advance in the process of calculating the data to ascertain the impact of these missing parts of the data on the accuracy rate in predicting the disease in the final stage and accordingly We randomly deleted data, which was distributed as follows:

  • 3 attributes * 10 cells = 30 missing data cells

  • 5 attributes * 10 cells = 50 missing data cells

  • 10 attributes * 10 cells = 100 missing data cells

and clearly shows the method of scanning data for three characteristics and ten records, considered random. However, the deletion is sequential because the data in the original data set were not arranged and classified based on age, gender, or other things. as shown in .

Table 4. ML test comparison for Heart Attack Dataset with and without missing data.

Table 5. ML test comparison for ‘Z-Alizadeh Sani dataset’ with and without missing data.

Then, two techniques were used to include and predict the value of missing data.

4.2.1. Average estimated method

A single imputation approach uses a complete data set for inference after another method fills in any missing data. One such technique is mean imputation (MI), in which the average is calculated and used to impute the missing data for each variable using the reported values for each variable. Estimates produced using this method may be seriously biased. The variance estimate for a variable might be significantly underestimated if there is a lot of missing data in the variable, and the observed sample mean is used to impute their values, as shown in .

Table 6. Average estimated error table.

4.2.2. k-NN imputation method

The k-NN approach aims to locate the ‘k’ value and samples inside the dataset that are similar to or close to one another. The missing value items are then calculated using these ‘k’ samples. The average score of the k-neighbors in the dataset is applied to impute the missing values for each sample. shows the k-NN working process. also shows the 2nd dataset after imputing the missing 6 F* 10 C data. Compared to the sample, The Mean and k nearest neighbor (KNN) algorithms outperformed median imputation techniques. were k = 2.

Figure 6. K-NN working process.

Figure 6. K-NN working process.

Table 7. ML test comparison for Heart Attack Dataset scores vs. other.

The same eight techniques were applied again to the data sets from which the data was randomly deleted in the previous part. The first time, 30 data cells were deleted. The second time, 50 data cells were deleted, and finally, 100 data cells were deleted. The accuracy was calculated each time and compared to the first accuracy achieved through , the original data, as shown in . The results of each table and figure will be explained separately.

Figure 7. ML test comparison for Heart Attack Dataset with and without missing data.

Figure 7. ML test comparison for Heart Attack Dataset with and without missing data.

Figure 8. ML test comparison ‘Z-Alizadeh Sani dataset’ with and without missing data.

Figure 8. ML test comparison ‘Z-Alizadeh Sani dataset’ with and without missing data.

shows that decision trees (DT) generally have robust accuracy, but there’s a noticeable decline with missing data, especially with the 5 F*10R imputation method. Decision trees are sensitive to missing data, reflected in their decreased accuracy.

Linear Discriminant Analysis (LDA): LDA maintains relatively high accuracy across conditions. There is a slight decrease in missing data, but it performs well compared to other models.

4.2.2.1. Logistic regression (LR)

LR decreases accuracy with missing data, especially with the 10 F*10R imputation method. Logistic regression models can be sensitive to imbalanced or missing data.

4.2.2.2. Naive Bayes (NB)

NB shows decreased accuracy with missing data, particularly with the 5F10R and 10F10R imputation methods.

NB assumes independence between features, and missing data may impact this assumption.

4.2.2.3. Support vector machines (SVM)

SVM maintains high accuracy, even with missing data, demonstrating robustness. SVMs are generally effective in handling complex datasets and missing data.

4.2.2.4. K-nearest neighbors (KNN)

KNN accuracy declines noticeably with missing data, especially with the 5 F*10R imputation method.

KNN can be sensitive to missing values and might struggle with imbalanced datasets.

4.2.2.5. Ensemble model

The ensemble model demonstrates stability in accuracy across conditions, performing well even with missing data.

Ensembles often excel in maintaining predictive power when individual models may falter.

4.2.2.6. Extreme learning machine (ELM 200)

ELM 200 consistently outperforms other models with exceptionally high accuracy, even with missing data. The superior performance of ELM 200 underscores its effectiveness in handling both original and imputed datasets.

The results in suggest that some models, like SVM and the ensemble model, maintain robust performance across different conditions. However, it’s crucial to note that the impact of missing data varies among models, with some experiencing significant accuracy drops. The standout performance of ELM 200 indicates its potential as a powerful algorithm for this dataset and the challenges introduced by missing data.

The comment in is almost similar to the commentary in , and therefore, we will comment on the OVERALL TRENDS that were monitored through the two tables, as follows:

  • Both tables exhibit similar trends across models, with consistent decreases in accuracy when dealing with missing data in various imputation scenarios.

  • The general pattern of specific models outperforming others remains consistent in both tables.

shows a notable shift in the magnitude of accuracy changes, with some models experiencing more significant drops in accuracy when faced with missing data compared to .

  • The impact of missing data appears more pronounced in for models like logistic regression and Naive Bayes.

reinforces that specific models, like Decision Trees and Logistic Regression, are more sensitive to missing data, as evidenced by more significant accuracy declines in .

  • Conversely, robust models like SVM and the ensemble model demonstrate resilience in both tables.

  • ELM 200 maintains exceptional accuracy in both tables, reaffirming its robustness in handling missing data scenarios. The consistent high performance of ELM 200 across tables highlights its reliability as a predictive model.

  • While there are differences in the exact accuracy values, the patterns of model performance remain consistent between the two tables. Both tables underline the challenges posed by missing data and the varying sensitivity of machine learning models to this challenge.

In summary, while there are variations in the magnitude of accuracy changes, the overall trends and model behaviors in handling missing data remain consistent between and . These differences could be attributed to variations in the datasets or specific characteristics of the imputation methods used in the two scenarios.

4.3. Average estimated error

The colloquial term ‘mean error’ describes the average of all mistakes in a collection. Both assessment uncertainty, as well as the difference between the calculated value and the correct value are referred to in this context as ‘errors.’ It can be computed utilizing the subsequent formula (Cene et al., Citation2019): (9) E=[k=1m[[(|oijIij|/(maximin,))]/n]]/m(9)

Where n is the number of imputed values, m is the number of random simulations for each missing value, 0ij is the original value to be imputed, Iij is the imputed value, and j is the corresponding feature to which Oi and Ii belong (Cene et al., Citation2019). The above equation was applied to calculate the average estimated error for the 1st data set named [Heart Attack Analysis & Prediction Dataset]. The above equation was also used to calculate the average estimated error for the 2nd data set called [Z-Alizadeh Sani dataset], and the following results were shown in .

The table presents average estimated error results for the KNN imputation method across the ‘heart attack analysis and prediction’ and ‘Z-ALIZADEH SANI’ datasets. The lower average estimated error percentages suggest that KNN imputation performs well in estimating missing values, contributing to improved overall model accuracy. The table also provides insights into the average estimated error results for the average imputation method. Compared to the two imputation methods, the average process may result in higher average estimated errors, indicating that it might be less accurate in estimating missing values than KNN. Differences in the average estimated error percentages between datasets reveal variations in model performance depending on the dataset characteristics and the chosen imputation method. The results underscore the importance of the imputation method selected in influencing the accuracy of the predictive model, emphasizing that KNN may be a more practical choice in handling missing data in this context. These findings have practical implications for real-world applications, suggesting that the choice of imputation method plays a crucial role in the accuracy of predictive models. The KNN method, in particular, may be more suitable for improving overall model performance.

4.4. Comparing results with others

In this part, the results obtained from using the extreme learning machine, through which the highest accuracy results in predicting the disease were achieved in the first part of this chapter, were compared with the research that used the same target data sets and for the same purpose through the use of different techniques of machine languages and neural networks, according to the and and the and .

Figure 9. ML test comparison of Heart Attack Dataset scores vs. others.

Figure 9. ML test comparison of Heart Attack Dataset scores vs. others.

Figure 10. ML test comparison of Z-Alizadeh Sani dataset scores vs. others.

Figure 10. ML test comparison of Z-Alizadeh Sani dataset scores vs. others.

Table 8. ML test comparison for Z-Alizadeh Sani dataset scores vs. others.

5. Conclusion

Cardiovascular disease poses a myriad of health challenges, and heart problems stand out as a significant manifestation. The precision offered by machine learning (ML) and neural networks in identifying disease incidence underscores their pivotal role in addressing these health concerns. In our investigation, we leveraged a comprehensive cardiovascular disease dataset to assess the efficacy of ML approaches for heart disease diagnosis. The utilization of Extreme Learning Machine (ELM) neural prediction algorithms yielded outstanding results, achieving accuracy rates of 97.58% and 99.06%. Furthermore, our study delved into imputing techniques, revealing that the k-NN imputing technique surpasses the average mean approach in accuracy, as evidenced by calculating the average estimated error score. A significant contribution of this research lies in its extensive examination of commonly used algorithms to discern the most effective ML and neural approaches for cardiovascular disease diagnosis. Among these approaches, the ELM algorithm emerged as a standout performer, demonstrating superior accuracy and efficiency. The practical advantages of our findings are noteworthy. The high accuracy rates achieved by the ELM algorithm signify its potential as a reliable tool for early heart disease diagnosis.

Moreover, the demonstrated superiority of the k-NN imputing technique has practical implications for data preprocessing, enhancing the accuracy of predictive models in real-world applications.

Additionally, the performance of algorithms may vary in different healthcare settings and patient demographics, warranting further exploration. The theoretical implications of this study extend beyond the realm of cardiovascular disease diagnosis. By showcasing the effectiveness of the ELM algorithm and the superiority of the k-NN imputing technique, we contribute to the growing body of knowledge in machine learning applications for healthcare. In light of our findings, future research avenues beckon. Exploring the adaptability of the ELM algorithm to different healthcare datasets and demographic profiles would enhance its generalizability. Investigations into integrating diverse machine learning techniques for a comprehensive predictive model hold promise for advancing the field. In conclusion, our research sheds light on the significant potential of ML and neural networks, notably the ELM algorithm, in enhancing the accuracy of cardiovascular disease diagnosis. The insights gained, and a recognition of limitations pave the way for continued exploration and refinement of machine learning applications in healthcare.

Disclosure statement

No potential conflict of interest was reported by the author(s).

Additional information

Notes on contributors

Ahmed Haitham Najim

Ahmed Haitham Najim obtained an MSc in Information Technology from Alexandria University in 2014. Currently pursuing a PhD at Sfax University, he serves as a lecturer at Imam Al Adhum University College in Baghdad, Iraq.

Nejah Nasri

Dr. Nejah NASRI, an associate professor at the University of Gafsa-Tunisia, holds a Ph.D. in Electrical Engineering and Computer Science from the University of Toulouse - France, obtained in 2010. He received his Habilitation to Direct Research (HDR) in Electrical and Computer Science Engineering from Sfax University - Tunisia in July 2019. He is affiliated with the Smart Systems for Engineering & E-Health Laboratory (SETIT - Sfax University).

References

  • Abd Shehab, M., & Kahraman, N. (2020). A weighted voting ensemble of an efficient regularized extreme learning machine. Computers & Electrical Engineering, 85, 106639. https://doi.org/10.1016/j.compeleceng.2020.106639
  • Alhabib, I. (2022). Komparasi Metode Deep Learning, Naïve Bayes Dan Random Forest Untuk Prediksi Penyakit Jantung. Informatics for Educators and Professional: Journal of Informatics, 6(2), 176–185. https://doi.org/10.51211/itbi.v6i2.1881
  • Alizadehsani, R., Habibi, J., Hosseini, M. J., Mashayekhi, H., Boghrati, R., Ghandeharioun, A., Bahadorian, B., & Sani, Z. A. (2013). A data mining approach for diagnosis of coronary artery disease. Computer Methods and Programs in Biomedicine, 111(1), 52–61. https://doi.org/10.1016/j.cmpb.2013.03.004
  • Alotaibi, F. S. (2019). Implementation of a machine learning model to predict heart failure disease. International Journal of Advanced Computer Science and Applications, 10(6), e100637. https://doi.org/10.14569/IJACSA.2019.0100637
  • Ashish, L., Kumar, S., & Yeligeti, S. (2021). Ischemic heart disease detection using support vector machine and extreme gradient boosting method. Materials Today: Proceedings. https://doi.org/10.1016/j.matpr.2021.01.715
  • Awan, S. E., Bennamoun, M., Sohel, F., Sanfilippo, F. M., & Dwivedi, G. (2019). Machine learning‐based prediction of heart failure readmission or death: Implications of choosing the right model and the right metrics. ESC Heart Failure, 6(2), 428–435. https://doi.org/10.1002/ehf2.12419
  • Bharti, R., Khamparia, A., Shabaz, M., Dhiman, G., Pande, S., & Singh, P. (2021). Prediction of heart disease using a combination of machine learning and deep learning. Computational Intelligence and Neuroscience, 2021, 8387680–8387611. 2021. https://doi.org/10.1155/2021/8387680
  • Cene, V. H., Tosin, M., Machado, J., & Balbinot, A. (2019). Open database for accurate upper-limb intent detection using electromyography and reliable extreme learning machines. Sensors, 19(8), 1864. https://doi.org/10.3390/s19081864
  • Choi, D. J., Park, J. J., Ali, T., & Lee, S. (2020). Artificial intelligence for the diagnosis of heart failure. NPJ Digital Medicine, 3(1), 54. https://doi.org/10.1038/s41746-020-0261-3
  • Dritsas, E., & Trigka, M. (2022). Stroke risk prediction with machine learning techniques. Sensors, 22(13), 4670. https://doi.org/10.3390/s22134670
  • Dwivedi, A. K. (2018). Performance evaluation of different machine learning techniques for prediction of heart disease. Neural Computing and Applications, 29(10), 685–693. https://doi.org/10.1007/s00521-016-2604-1
  • El Hamdaoui, H., Boujraf, S., Chaoui, N. E. H., & Maaroufi, M. (2020). A clinical support system for prediction of heart disease using machine learning techniques [Paper presentation]. 2020, The 5th International Conference on Advanced Technologies for Signal and Image Processing (ATSIP) (pp. 1–5). IEEE.
  • Emon, M. U., Keya, M. S., Meghla, T. I., Rahman, M. M., Al Mamun, M. S., & Kaiser, M. S. (2020). Performance analysis of machine learning approaches in stroke prediction [Paper presentation]. 2020 4th International Conference on Electronics, Communication and Aerospace Technology (ICECA) (pp. 1464–1469). IEEE. https://doi.org/10.1109/ICECA49313.2020.9297525
  • Feeny, A. K., Chung, M. K., Madabhushi, A., Attia, Z. I., Cikes, M., Firouznia, M., Friedman, P. A., Kalscheur, M. M., Kapa, S., Narayan, S. M., Noseworthy, P. A., Passman, R. S., Perez, M. V., Peters, N. S., Piccini, J. P., Tarakji, K. G., Thomas, S. A., Trayanova, N. A., Turakhia, M. P., & Wang, P. J. (2020). Artificial intelligence and machine learning in arrhythmias and cardiac electrophysiology. Circulation. Arrhythmia and Electrophysiology, 13(8), e007952. https://doi.org/10.1161/CIRCEP.119.007952
  • Fernandez-Lozano, C., Hervella, P., Mato-Abad, V., Rodríguez-Yáñez, M., Suárez-Garaboa, S., López-Dequidt, I., Estany-Gestal, A., Sobrino, T., Campos, F., Castillo, J., Rodríguez-Yáñez, S., & Iglesias-Rey, R. (2021). Random forest-based prediction of stroke outcome. Scientific Reports, 11(1), 10071. https://doi.org/10.1038/s41598-021-89434-7
  • Gupta, A., Arora, H. S., Kumar, R., & Raman, B. (2021). DMHZ: A decision support system based on machine computational design for heart disease diagnosis using the z-Alizadeh sani dataset [Paper presentation]. 2021 International Conference on Information Networking (ICOIN) (pp. 818–823). IEEE. https://doi.org/10.1109/ICOIN50884.2021.9333884
  • Gupta, A., Kumar, R., Arora, H. S., & Raman, B. (2022). C-CADZ: Computational intelligence system for coronary artery disease detection using the Z-Alizadeh Sani dataset. Applied Intelligence, 52(3), 2436–2464. https://doi.org/10.1007/s10489-021-02467-3
  • Haq, A. U., Li, J., Memon, M. H., Memon, M. H., Khan, J., & Marium, S. M. (2019). Heart disease prediction system using a model of machine learning and sequential backward selection algorithm for feature selection [Paper Presentation]. 2019 IEEE 5th International Conference for Convergence in Technology (I2ct) (pp. 1–4). IEEE. https://doi.org/10.1109/I2ct45611.2019.9033683
  • Heo, T. S., Kim, Y. S., Choi, J. M., Jeong, Y. S., Seo, S. Y., Lee, J. H., Jeon, J. P., & Kim, C. (2020). Prediction of stroke outcome using natural language processing-based machine learning of radiology report of brain MRI. Journal of Personalized Medicine, 10(4), 286. https://doi.org/10.3390/jpm10040286
  • Imron, M. A., & Prasetyo, B. (2020). Improving algorithm accuracy k-nearest neighbour using z-score normalization and particle swarm optimization to predict customer churn. Journal of Soft Computing Exploration, 1(1), 56–62.
  • Javeed, A., Khan, S. U., Ali, L., Ali, S., Imrana, Y., & Rahman, A. (2022). Machine learning-based automated diagnostic systems developed for heart failure prediction using different types of data modalities: A systematic review and future directions. Computational and Mathematical Methods in Medicine, 2022, 9288452–9288430. https://doi.org/10.1155/2022/9288452
  • Joloudari, J. H., Saadatfar, H., GhasemiGol, M., Alizadehsani, R., Alizadeh Sani, Z., Hasanzadeh, F., Hassannataj, E., Sharifrazi, D., & Mansor, Z. (2022). FCM-DNN: Diagnosing coronary artery disease by deep accuracy Fuzzy C-Means clustering model. arXiv e-prints, arXiv-2202.arXiv preprint arXiv:2202.04645.
  • Joloudari, J. H., Saadatfar, H., GhasemiGol, M., Alizadehsani, R., Sani, Z. A., Hasanzadeh, F., … Mansor, Z. (2022). FCM-DNN: diagnosing coronary artery disease by deep accuracy fuzzy C-means clustering model. arXiv preprint arXiv:2202.04645.
  • Kavitha, M., Gnaneswar, G., Dinesh, R., Sai, Y. R., & Suraj, R. S. (2021). Heart disease prediction using hybrid machine learning model [Paper presentation]. The 6th International Conference on Inventive Computation Technologies (ICICT) (pp. 1329–1333). IEEE.
  • Kondababu, A., Siddhartha, V., Kumar, B. B., & Penumutchi, B. (2021). A comparative study on machine learning-based heart disease prediction. Materials Today: Proceedings. https://doi.org/10.1016/j.matpr.2021.01.475
  • Kristensen, S. L., Mogensen, U. M., Jhund, P. S., Rørth, R., Anand, I. S., Carson, P. E., Desai, A. S., Pitt, B., Pfeffer, M. A., Solomon, S. D., Zile, M. R., Køber, L., & McMurray, J. J. V. (2019). N-terminal pro-B-type natriuretic peptide levels for risk prediction in patients with heart failure and preserved ejection fraction according to atrial fibrillation status—Circulation. Circulation. Heart Failure, 12(3), e005766. https://doi.org/10.1161/CIRCHEARTFAILURE.118.005766
  • Krittanawong, C., Virk, H. U. H., Bangalore, S., Wang, Z., Johnson, K. W., Pinotti, R., Zhang, H., Kaplin, S., Narasimhan, B., Kitai, T., Baber, U., Halperin, J. L., & Tang, W. H. W. (2020). Machine learning prediction in cardiovascular diseases: A meta-analysis. Scientific Reports, 10(1), 16057. https://doi.org/10.1038/s41598-020-72685-1
  • Kwegyir, D., Frimpong, E. A., & Opoku, D. (2021). Optimization of feedforward neural network training using modified local leader phase spider monkey optimization. International Research Journal of Engineering and Technology, 8(7), 2157–2167.
  • Li, X., Wu, M., Sun, C., Zhao, Z., Wang, F., Zheng, X., Ge, W., Zhou, J., & Zou, J. (2020). Using machine learning to predict stroke‐associated pneumonia in Chinese acute ischaemic stroke patients. European Journal of Neurology, 27(8), 1656–1663. https://doi.org/10.1111/ene.14295
  • Lin, C.-H., Hsu, K.-C., Johnson, K. R., Fann, Y. C., Tsai, C.-H., Sun, Y., Lien, L.-M., Chang, W.-L., Chen, P.-L., Lin, C.-L., & Hsu, C. Y. (2020). Evaluation of machine learning methods to stroke outcome prediction using a nationwide disease registry. Computer Methods and Programs in Biomedicine, 190, 105381. https://doi.org/10.1016/j.cmpb.2020.105381
  • Martin-Isla, C., Campello, V. M., Izquierdo, C., Raisi-Estabragh, Z., Baeßler, B., Petersen, S. E., & Lekadir, K. (2020). Image-based cardiac diagnosis with machine learning: A review. Frontiers in Cardiovascular Medicine, 7, 1. https://doi.org/10.3389/fcvm.2020.00001
  • Olsen, C. R., Mentz, R. J., Anstrom, K. J., Page, D., & Patel, P. A. (2020). Clinical applications of machine learning in the diagnosis, classification, and prediction of heart failure. American Heart Journal, 229, 1–17. https://doi.org/10.1016/j.ahj.2020.07.009
  • Ozelsancak, R., Tekkarismaz, N., Torun, D., & Micozkadioglu, H. (2019). Heart valve disease predicts mortality in hemodialysis patients: a single center experience. Therapeutic Apheresis and Dialysis, 23(4), 347–352. https://doi.org/10.1111/1744-9987.12774
  • Park, S. J., Hussain, I., Hong, S., Kim, D., Park, H., & Benjamin, H. C. M. (2020). Real-time gait monitoring system for consumer stroke prediction service [Paper presentation]. 2020 IEEE International Conference on Consumer Electronics (ICCE), IEEE (pp. 1–4). https://doi.org/10.1109/ICCE46568.2020.9043098
  • Ristow, B., Ali, S., Whooley, M. A., & Schiller, N. B. (2008). Usefulness of left atrial volume index to predict heart failure hospitalization and mortality in ambulatory patients with coronary heart disease and comparison to left ventricular ejection fraction (from the Heart and Soul Study). The American Journal of Cardiology, 102(1), 70–76. https://doi.org/10.1016/j.amjcard.2008.02.099
  • Riyaz, L., Butt, M. A., Zaman, M., & Ayob, O. (2022). Heart disease prediction using machine learning techniques: A quantitative review. In International Conference on Innovative Computing and Communications (pp. 81–94). Springer.
  • Sankararaman, S. (2022). A machine learning approach to detect aortic valve dysfunction through phase portrait feature extraction. The European Physical Journal Special Topics, 231(5), 819–826. https://doi.org/10.1140/epjs/s11734-021-00326-3
  • Segar, M. W., Jaeger, B. C., Patel, K. V., Nambi, V., Ndumele, C. E., Correa, A., Butler, J., Chandra, A., Ayers, C., Rao, S., Lewis, A. A., Raffield, L. M., Rodriguez, C. J., Michos, E. D., Ballantyne, C. M., Hall, M. E., Mentz, R. J., de Lemos, J. A., & Pandey, A. (2021). Development and validation of machine learning–based race-specific models to predict 10-year risk of heart failure: A multicohort analysis. Circulation, 143(24), 2370–2383. https://doi.org/10.1161/CIRCULATIONAHA.120.053134
  • Shade, J. K., Ali, R. L., Basile, D., Popescu, D., Akhtar, T., Marine, J. E., Spragg, D. D., Calkins, H., & Trayanova, N. A. (2020). Pre-procedure application of machine learning and mechanistic simulations predicts the likelihood of paroxysmal atrial fibrillation recurrence following pulmonary vein isolation—Circulation. Circulation. Arrhythmia and Electrophysiology, 13(7), e008213. https://doi.org/10.1161/CIRCEP.119.008213
  • Sharma, V., Yadav, S., & Gupta, M. (2020). Heart disease prediction using machine learning techniques [Paper presentation]. 2020, The 2nd International Conference on Advances in Computing, Communication Control and Networking (ICACCCN) (pp. 177–181). IEEE.
  • Shi, K., Bechler, K., & Ho, V. (2021). Predicting myocardial infarction risk using supervised and unsupervised machine learning methods. https://cs229.stanford.edu/proj2021spr/report2/81980162.pdf
  • Singh, A., & Kumar, R. (2020). Heart disease prediction using machine learning algorithms [Paper presentation]. 2020 International Conference on Electrical and Electronics Engineering (ICE3) (pp. 452–457). IEEE. https://doi.org/10.1109/ICE348803.2020.9122958
  • Sirsat, M. S., Fermé, E., & Câmara, J. (2020). Machine learning for brain stroke: A review. Journal of Stroke and Cerebrovascular Diseases, 29(10), 105162. https://doi.org/10.1016/j.jstrokecerebrovasdis.2020.105162
  • Takci, H. (2018). Improvement of heart attack prediction by the feature selection methods. Turkish Journal of Electrical Engineering & Computer Sciences, 26(1), 1–10. https://doi.org/10.3906/elk-1611-235
  • Tiwari, P., Colborn, K. L., Smith, D. E., Xing, F., Ghosh, D., & Rosenberg, M. A. (2020). Assessment of a machine learning model applied to harmonized electronic health record data for the prediction of incident atrial fibrillation. JAMA Network Open, 3(1), e1919396-e1919396. https://doi.org/10.1001/jamanetworkopen.2019.19396
  • Trayanova, N. A., Popescu, D. M., & Shade, J. K. (2021). Machine learning in Arrhythmia and electrophysiology. Circulation Research, 128(4), 544–566. https://doi.org/10.1161/CIRCRESAHA.120.317872
  • Valarmathi, R., & Sheela, T. (2021). Heart disease prediction using hyperparameter optimization (HPO) tuning. Biomedical Signal Processing and Control, 70, 103033. https://doi.org/10.1016/j.bspc.2021.103033
  • Vennemann, B., Obrist, D., & Rösgen, T. (2019). Automated diagnosis of heart valve degradation using novelty detection algorithms and machine learning. PloS One, 14(9), e0222983. https://doi.org/10.1371/journal.pone.0222983
  • Xu, W., Li, C., Jia, D., Cao, Y., Dong, Z., Zhang, M., Bai, Y., Zhu, R., Tang, X., & Dou, Y. (2021). A dendritic neuron model for disease prediction [Paper presentation]. 2021 IEEE International Conference on Advances in Electrical Engineering and Computer Applications (AEECA), IEEE (pp. 1118–1122). https://doi.org/10.1109/AEECA52519.2021.9574192
  • Yuan, P. (2021). Research on predicting heart attack through active learning [Paper presentation]. 2021, The 2nd International Conference on Big Data & Artificial Intelligence & Software Engineering (ICBASE) (pp. 12–18). IEEE.
  • Yuvalı, M., Yaman, B., & Tosun, Ö. (2022). Classification comparison of machine learning algorithms using two independent CAD datasets. Mathematics, 10(3), 311. https://doi.org/10.3390/math10030311