<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">WJCD</journal-id><journal-title-group><journal-title>World Journal of Cardiovascular Diseases</journal-title></journal-title-group><issn pub-type="epub">2164-5329</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/wjcd.2023.139052</article-id><article-id pub-id-type="publisher-id">WJCD-128020</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Medicine&amp;Healthcare</subject></subj-group></article-categories><title-group><article-title>
 
 
  A Novel Approach to Heart Failure Prediction and Classification through Advanced Deep Learning Model
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Abdalla</surname><given-names>Mahgoub</given-names></name><xref ref-type="aff" rid="aff1"><sub>1</sub></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><label>1</label><addr-line>Dubai, United Arab Emirates</addr-line></aff><pub-date pub-type="epub"><day>07</day><month>09</month><year>2023</year></pub-date><volume>13</volume><issue>09</issue><fpage>586</fpage><lpage>604</lpage><history><date date-type="received"><day>27,</day>	<month>August</month>	<year>2023</year></date><date date-type="rev-recd"><day>24,</day>	<month>September</month>	<year>2023</year>	</date><date date-type="accepted"><day>27,</day>	<month>September</month>	<year>2023</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  In this study, the author will investigate and utilize advanced machine learning models related to two different methodologies to determine the best and most effective way to predict individuals with heart failure and cardiovascular diseases. The first methodology involves a list of classification machine learning algorithms, and the second methodology involves the use of a deep learning algorithm known as MLP or Multilayer Perceptrons. Globally, hospitals are dealing with cases related to cardiovascular diseases and heart failure as they are major causes of death, not only for overweight individuals but also for those who do not adopt a healthy diet and lifestyle. Often, heart failures and cardiovascular diseases can be caused by many factors, including cardiomyopathy, high blood pressure, coronary heart disease, and heart inflammation
   
  [1]
  
  
  . Other factors, such as irregular shocks or stress, can also contribute to heart failure or a heart attack. While these events cannot be predicted, continuous data from patients’ health can help doctors predict heart failure. Therefore, this data-driven research utilizes advanced machine learning and deep learning techniques to better analyze and manipulate the data, providing doctors with informative decision-making tools regarding a person’s likelihood of experiencing heart failure. In this paper, the author employed advanced data preprocessing and cleaning techniques. Additionally, the dataset underwent testing using two different methodologies to determine the most effective machine-learning technique for producing optimal predictions. The first methodology involved employing a list of supervised classification machine learning algorithms, including Na&amp;iuml;ve Bayes (NB), KNN, logistic regression, and the SVM algorithm. The second methodology utilized a deep learning (DL) algorithm known as Multilayer Perceptrons (MLPs). This algorithm provided the author with the flexibility to experiment with different layer sizes and activation functions, such as ReLU, logistic (sigmoid), and Tanh. Both methodologies produced optimal models with high-level accuracy rates. The first methodology involves a list of supervised machine learning algorithms, including KNN, SVM, Adaboost, Logistic Regression, Naive Bayes, and Decision Tree algorithms. They achieved accuracy rates of 86%, 89%, 89%, 81%, 79%, and 99%, respectively. The author clearly explained that Decision Tree algorithm is not suitable for the dataset at hand due to overfitting issues. Therefore, it was discarded as an optimal model to be used. However, the latter methodology (Neural Network) demonstrated the most stable and optimal accuracy, achieving over 87% accuracy while adapting well to real-life situations and requiring low computing power overall. A performance assessment and evaluation were carried out based on a confusion matrix report to demonstrate feasibility and performance. The author concluded that the performance of the model in real-life situations can advance not only the medical field of science but also mathematical concepts. Additionally, the advanced preprocessing approach behind the model can provide value to the Data Science community. The model can be further developed by employing various optimization techniques to handle even larger datasets related to heart failures. Furthermore, different neural network algorithms can be tested to explore alternative approaches and yield different results.
 
</p></abstract><kwd-group><kwd>Heart Disease Prediction</kwd><kwd> Cardiovascular Disease</kwd><kwd> Machine Learning  Algorithms</kwd><kwd> Lazy Predict</kwd><kwd> Multilayer Perceptrons (MLPs)</kwd><kwd> Data Science  Techniques and Analysis</kwd><kwd> Deep Learning Activation Functions</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Cardiovascular diseases or CVDs, such as heart attacks or heart failure is one of the major factors of death globally. It is estimated by the World Health Organization (WHO) that over 17.9 millions died from cardiovascular-related diseases every year, representing 32% of total deaths in the world [<xref ref-type="bibr" rid="scirp.128020-ref2">2</xref>] . This constitutes a substantial portion of the worldwide mortality rate, underscoring the importance of fighting and preventing heart diseases. These conditions encompass irregularities in blood flow, blood vessels, and heart function disorders. The application of Data Science and Machine Learning has been extensive in the medical sector, aiding doctors in predicting and making crucial decisions using extensive datasets. This not only preserves lives but also generates improved machine-learning models through research documents stemming from these predictions.</p><p>There are number of machine learning algorithms to use to predict heart disease from a given dataset, including K-means clustering, Random Forest, logistic regression, SVM, as well as ensemble and Neural Network algorithms.</p></sec><sec id="s2"><title>2. Summary</title><p>In the manuscript titled “A Novel Approach to Heart Failure Prediction and Classification through Advanced Deep Learning Model”. The objective of this scientific project is to utilize various machine learning techniques and algorithms to achieve better results when selecting the best features.</p><p>The successful implementation of this project will hopefully aid in detecting heart disease symptoms and categorizing it, leading to earlier diagnosis for patients and further scientific advancement.</p></sec><sec id="s3"><title>3. Research Questions</title><p>&#183; The aim of using standard classification algorithms such as logistic regression, Na&#239;ve Bayes, Support vector Machines and decision trees, etc., is to increase accuracy.</p><p>&#183; The objective of utilizing deep learning algorithms is to determine if they can produce better results consistently.</p></sec><sec id="s4"><title>4. Literature Reviews</title><p>On Pooja Anbuselvan’s paper which was published on 11-Nov-2020 [<xref ref-type="bibr" rid="scirp.128020-ref3">3</xref>] , she employed a range of different supervised classification algorithms to address the challenge of achieving improved results and accuracy. The algorithms tested included Logistic Regression, Na&#239;ve Bayes, Support Vector Machine, K-Nearest Neighbor, Decision Tree, Random Forest, and XGBoost. Reported accuracies ranged from 57.83% to 86.89%. I have some reservations about this paper as some of these algorithms could be omitted in favor of more complementary choices. For instance, the Decision Tree could be replaced with the Random Forest algorithm, as Random Forest is essentially a collection of Decision Tree algorithms working in tandem. Apart from the XGBoost algorithm used for the optimization process, the author did not explore other optimization alternatives. The test and training data were divided into an 80/20 ratio.</p><p>As for the scientific paper obtained from Hal Science, written by Anna Karen G&#225;rate-Escamila, Amir Hajjam El Hassani, and Emmanuel Andres [<xref ref-type="bibr" rid="scirp.128020-ref4">4</xref>] , which was submitted and published on 22-Aug-2022, the authors constructively used different feature selection processes to select relevant features for the study of heart diseases. They successfully showcased the use of Chi-square and PCA techniques to reduce the number of features, and objectively arrived at a suitable dataset that could be validated by six machine learning algorithms: logistic regression, decision tree, gradient-boosted tree, multilayer perceptron, Na&#239;ve Bayes, and random forest. The authors achieved an impressive accuracy average between 98.7% to 99.4%, considering they reduced the total number of features from 74 to 17 and 13 features. The evaluation metric used to assess the performance of these six machine learning classifiers was the confusion matrix. The only drawback of this paper is that the authors did not offer a broader view of their cleaning and wrangling techniques, apart from reducing the number of features in the dataset. Additionally, their literature review and related work were not comprehensive enough to draw a conclusive assessment of the overall subject at hand. Other relatable literature reviews were studied and reviewed [<xref ref-type="bibr" rid="scirp.128020-ref5">5</xref>] [<xref ref-type="bibr" rid="scirp.128020-ref6">6</xref>] [<xref ref-type="bibr" rid="scirp.128020-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.128020-ref8">8</xref>] .</p></sec><sec id="s5"><title>5. Dataset Description</title><p>The dataset is a multi-dimensional dataset, consisting of 76 attributes, including but not limited to age, sex, chest pain readings represented by the abbreviation ”cp”, resting blood pressure represented by the abbreviation ”trestbps”, etc. However, based on all previous experiments by other scientists who utilized this dataset, only 14 features were selected for this project. Therefore, I will use the same features to determine if better results can be achieved.</p><p>The following is a summary of the dataset description for the 14 features that will be used, presented in a table format as shown below <xref ref-type="table" rid="table1">Table 1</xref>.</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> List of features &amp; definitions—This list contains all of the features in the dataset and provides insight into the behavior of patients that either resulted in a heart attack or not</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >No.</th><th align="center" valign="middle" >Features</th><th align="center" valign="middle" >Definition</th></tr></thead><tr><td align="center" valign="middle" >1</td><td align="center" valign="middle" >age</td><td align="center" valign="middle" >The age of the person</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >sex</td><td align="center" valign="middle" >The sex orientation of the indiduval either male or female representing 1 for male and 0 for female</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >cp</td><td align="center" valign="middle" >Type of chest pain, 0 represents asymptomatic, 1 atypical angina, 2 non-anginal pain and 3 typical angina</td></tr><tr><td align="center" valign="middle" >4</td><td align="center" valign="middle" >trestbps</td><td align="center" valign="middle" >Resting blood pressure is represented in mmHg (unit)</td></tr><tr><td align="center" valign="middle" >5</td><td align="center" valign="middle" >chol</td><td align="center" valign="middle" >Showing the serum cholesterol in mg/dl (unit)</td></tr><tr><td align="center" valign="middle" >6</td><td align="center" valign="middle" >fbs</td><td align="center" valign="middle" >Result of fasting blood sugar is determined based on the value of of an individual with 120 mg/dl, hence if fbs is more than 120 mg/dl the result is 1 or else is 0</td></tr><tr><td align="center" valign="middle" >7</td><td align="center" valign="middle" >restecg</td><td align="center" valign="middle" >Resting ECG</td></tr><tr><td align="center" valign="middle" >8</td><td align="center" valign="middle" >thalach</td><td align="center" valign="middle" >Max heart rate achieved</td></tr><tr><td align="center" valign="middle" >9</td><td align="center" valign="middle" >exang</td><td align="center" valign="middle" >Exercise induced angina</td></tr><tr><td align="center" valign="middle" >10</td><td align="center" valign="middle" >oldpeak</td><td align="center" valign="middle" >ST depression induced by exercise relative to rest</td></tr><tr><td align="center" valign="middle" >11</td><td align="center" valign="middle" >slope</td><td align="center" valign="middle" >The slope of the peak exercise ST segment</td></tr><tr><td align="center" valign="middle" >12</td><td align="center" valign="middle" >ca</td><td align="center" valign="middle" >The number of major vessels</td></tr><tr><td align="center" valign="middle" >13</td><td align="center" valign="middle" >thal</td><td align="center" valign="middle" >A blood disorder called thalassemia</td></tr><tr><td align="center" valign="middle" >14</td><td align="center" valign="middle" >target</td><td align="center" valign="middle" >Diagnosis of heart disease</td></tr></tbody></table></table-wrap><p>The dataset has a shape of (1025, 14), with 14 columns representing the total number of features and 1025 rows representing the results and outcomes of 1025 patients. The data is in numerical form, facilitating its cleaning and manipulation in Python. Cleaning the dataset can be a daunting task, but in this paper, we will thoroughly examine it as part of the scientific study. The following is a screenshot taken from a Jupyter Notebook showing the dataset being displayed using a pandas DataFrame, as illustrated in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p></sec><sec id="s6"><title>6. Ethical Considerations</title><p>When it comes to the implementation of regulations and ethical reviews in AI-driven applications within the healthcare industry, there is nothing more important and interesting to discuss. It is crucial to ensure that the data and the functionality of data science-based applications operate within specific parameters of data protection and confidentiality, free from any breaches [<xref ref-type="bibr" rid="scirp.128020-ref9">9</xref>] . In my opinion, the following list of ethical reviews deserves the utmost attention:</p><p>&#183; Data Protection Rules: The healthcare industry, being responsible for handling and managing data, must prioritize safeguarding it to prevent any breaches or hacking attempts.</p><p>&#183; Data Quality: The data used in the application should be of the highest quality, ensuring it is easily accessible and usable for all relevant parties.</p><p>&#183; Complete Transparency: Researchers, scientists, and scholars should have access to the data, enabling them to contribute to scientific advancements that can benefit society as a whole [<xref ref-type="bibr" rid="scirp.128020-ref10">10</xref>] .</p></sec><sec id="s7"><title>7. Methodology &amp; Model Evaluation</title><p>The methodology that I will follow to conduct a thorough analysis and draw a conclusion on the best model to use for the Heart Disease application is presented in the following cycle of steps:</p><p>a) Data collection</p><p>b) Data cleaning and pre-processing</p><p>c) Feature selection</p><p>d) Exploratory data analysis (EDA)</p><p>e) Model selection and training</p><p>f) Model evaluation</p><p>1) Data collection</p><p>As mentioned earlier, the data was obtained from the world-renowned website “Kaggle” [<xref ref-type="bibr" rid="scirp.128020-ref11">11</xref>] .</p><p>Originally the dataset was created by the below list of creators:</p><p>&#183; Hungarian Institute of Cardiology, Budapest: Andras Janosi, M.D. [<xref ref-type="bibr" rid="scirp.128020-ref12">12</xref>] .</p><p>&#183; University Hospital, Zurich, Switzerland: William Steinbrunn, M.D. [<xref ref-type="bibr" rid="scirp.128020-ref12">12</xref>] .</p><p>&#183; University Hospital, Basel, Switzerland: Matthias Pfisterer, M.D. [<xref ref-type="bibr" rid="scirp.128020-ref12">12</xref>] .</p><p>&#183; V.A. Medical Center, Long Beach and Cleveland Clinic Foundation: Robert Detrano, M.D., Ph.D [<xref ref-type="bibr" rid="scirp.128020-ref12">12</xref>] .</p><p>Furthermore, the dataset contains a list of 76 experiments on heart disease or failure. However, only 14 attributes were selected based on the Cleveland researcher medical database approach, which are relevant for determining and predicting the presence of heart failure in a patient. Therefore, it can be concluded that the dataset represents a binary classification problem. The data in the dataset is considered to be of a well-structured dataset.</p><p>2) Data cleaning and pre-processing</p><p>All missing values were handled using various Python techniques and subsequently missing data were removed. As a result of our cleaning and processing efforts, the provided dataset now includes 14 features.</p><p>3) Feature selection</p><p>The cleaning process mentioned in point 2) led to the reduction of the number of relevant features from 76 to 14, which are the most important features used for predicting and evaluating heart failure or heart attacks.</p><p>4) Exploratory data analysis (EDA)</p><p>As we have established, the cleaned dataset contains over 1000 cases of heart readings, with the target variable output determining whether a particular patient suffered from heart failure or not. Upon examining and conducting various data analyses on the dataset, we arrived at the following findings.</p><p>We can simply establish from <xref ref-type="fig" rid="fig2">Figure 2</xref> above that, on average, males suffer from heart-related diseases such as heart attacks and failures more frequently than females. However, from a gender perspective, males are less prone to heart failures than females. The graph illustrates that the number of males without heart disease exceeds 400, whereas the count for males with heart disease is around 300.</p><p>On the other hand, the data for females indicates that fewer than 100 females are without heart-related diseases, while over 200 have some form of heart failure or disease. It is important to note that the total number of males and females presented in this paper is 713 and 312, respectively.</p><p>As shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>, we can observe that the data illustrates a slightly higher number of individuals with heart disease compared to those without heart failure or disease.</p><p>Chest pain types consist of Typical Angina, Atypical Angina, non-anginal pain, and asymptomatic. The term “Angina” refers to normal chest pain, where “Typical (classic) angina chest pain consists of (1) Substernal chest pain or discomfort that is (2) Provoked by exertion or emotional stress and (3) relieved by rest or nitroglycerine (or both). Atypical (probable) angina chest pain applies when 2 out of 3 criteria of classic angina are present” [<xref ref-type="bibr" rid="scirp.128020-ref13">13</xref>] . On the other hand, non-anginal chest pain is simply non-cardiac chest pain, which consists of a feeling of heaviness and shortness of breath, often described as a painful squeezing sensation in the chest. As for asymptomatic chest pain, it is defined as a silent or absence of chest pain, known as SMI (Silent (asymptomatic) myocardial ischemia). Simply put, chest pain refers to the type of pain that occurs in the heart muscles, leading to discomfort in breathing and pain in the chest. This discomfort can be accompanied by pain in other areas of the body, such as the shoulders, neck, arms, and jaw.</p><p>Taking <xref ref-type="fig" rid="fig4">Figure 4</xref> &amp; <xref ref-type="fig" rid="fig2">Figure 2</xref> into consideration and in conjunction with <xref ref-type="fig" rid="fig5">Figure 5</xref> (Chest pain vs Gender), we can also establish from the figure that females experience heart failure more frequently than men.</p><p>Cholesterol is simply a fatty substance that travels through the bloodstream. There are two ways in which cholesterol can travel: high-density lipoproteins (HDL) and low-density lipoproteins (LDL). The difference between the two lies in the fact that HDL is considered good cholesterol because it picks up fatty substances and transports them to the liver for disposal. On the other hand, LDL is considered bad cholesterol because if there is an excess amount of it in the bloodstream, it can lead to the clogging of arteries, ultimately resulting in heart failures and heart attacks [<xref ref-type="bibr" rid="scirp.128020-ref14">14</xref>] . As shown in <xref ref-type="fig" rid="fig6">Figure 6</xref>, we can observe that as the cholesterol level in the bloodstream increases, the heart rate may also rise even</p><p>with minimal exercise. This indicates a higher susceptibility to heart failure and heart attacks.</p><p>5) Model selection and training</p><p>The features and variables identified in the dataset are labelled with a known set of target values, indicating that we are dealing with a classification problem. Since the target values are known and discrete in nature, supervised learning algorithms such as regression algorithms, decision trees, and k-nearest neighbors algorithms are ideal for building a better supervised learning classifier to predict unseen patient data.</p><p>A data split of 30/70 was implemented, with 30% of the data allocated to the test dataset and 70% assigned to the training dataset.</p><p>To efficiently test over 25 different machine learning classifiers, a new and practical machine learning technique was employed, known as the Lazy Predict project [<xref ref-type="bibr" rid="scirp.128020-ref15">15</xref>] . This technique is implemented as a library model that can be installed in your system environment, such as Jupyter Notebook, VS Code, or any similar interactive development platform.</p><p>6) Model Evaluation</p><p>However, I have selected the results of six machine learning algorithms specifically for prediction and testing purposes. I also utilized the confusion matrix for model evaluation, as it is the best fit for our classification model challenge. The figure below illustrates the accuracy outcomes obtained from these chosen algorithms.</p><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> List of machine learning algorithm results—Here is a list of the results obtained from various machine learning models for our dataset</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >No.</th><th align="center" valign="middle" >Algorithm Model</th><th align="center" valign="middle" >Accuracy</th></tr></thead><tr><td align="center" valign="middle" >1</td><td align="center" valign="middle" >K-Nearest Neighbors</td><td align="center" valign="middle" >86%</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >SVM</td><td align="center" valign="middle" >89%</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >AdaBoost</td><td align="center" valign="middle" >89%</td></tr><tr><td align="center" valign="middle" >4</td><td align="center" valign="middle" >Logistic Regression</td><td align="center" valign="middle" >81%</td></tr><tr><td align="center" valign="middle" >5</td><td align="center" valign="middle" >Na&#239;ve Bayes</td><td align="center" valign="middle" >79%</td></tr><tr><td align="center" valign="middle" >6</td><td align="center" valign="middle" >Decision Tree</td><td align="center" valign="middle" >99%</td></tr></tbody></table></table-wrap><p>As observed in <xref ref-type="table" rid="table2">Table 2</xref>, these traditional machine learning algorithms have demonstrated several remarkable accuracies, averaging at 87.1%. If we exclude the Decision Tree algorithm, the average accuracy drops to 84.8%. The decision to exclude the Decision Tree algorithm was based on the fact that achieving 97% accuracy appears to be an overfitting scenario for the provided dataset.</p><p>Deep Learning/Neural Network</p><p>I have also opted to utilize a comprehensive algorithm in the realm of Deep Learning or Neural Network algorithms for the following reasons:</p><p>Deep learning has gained tremendous popularity in the field of scientific computing, and industries heavily depend on its algorithms to tackle complex problems. Deep learning algorithms employ various types of neural networks to address specific tasks [<xref ref-type="bibr" rid="scirp.128020-ref16">16</xref>] .</p><p>Deep learning algorithms encompass a wide range of types, with each type being suitable for specific datasets and problem statements. The list below highlights some of the types of deep learning algorithms:</p><p>&#183; Generative Adversarial Networks (GANs)</p><p>&#183; Recurrent Neural Networks (RNNs)</p><p>&#183; Deep Belief Networks (DBNs)</p><p>&#183; Multilayer Perceptrons (MLPs)</p><p>&#183; Long Short Term Memory Networks (LSTMs)</p><p>&#183; Autoencoders</p><p>&#183; Convolutional Neural Networks (CNNs)</p><p>While many of these deep learning algorithms can yield a satisfactory outcome, in our case the most suitable deep learning to employ for our classification problem is Multilayer Perceptrons (MLPs).</p><p>Multilayer Perceptrons (MLPs)</p><p>MLPs are designed to address machine learning problems, especially those related to image recognition models. When you think of a perceptron, I want you to envision a brain neuron. The purpose of each neuron is to analyze the provided data and transmit information to another neuron.</p><p>In the field of deep learning, a perceptron or neuron analyzes this data using an activation function and then forwards the output to the next neuron.</p><p>As depicted in <xref ref-type="fig" rid="fig7">Figure 7</xref> above, the data is fed into the input layer of the network. Each neuron is initialized with its own weights and learning rate, also known as bias. The layer then passes the output to the next neuron in the subsequent layer, after computing the output using an activation function.</p><p>Once the final output is determined, the model can train itself by initiating a backpropagation algorithm.</p><p>This algorithm involves reassessing the weights by traversing back through the network to determine the extent of error responsibility for each node. The model is then retrained to provide improved results and outcomes [<xref ref-type="bibr" rid="scirp.128020-ref17">17</xref>] .</p><p>Define MLP-Neural Network Architecture</p><p>1) Network type: Multilayer Perceptron (MLP).</p><p>2) Number of hidden layers: 3.</p><p>3) Total layers: 3 (Three hidden layers + input layer + output layer).</p><p>4) Input shape: between 14 to 20 nodes in the input layer.</p><p>5) Hidden layer 2: between 10 to 15 nodes.</p><p>6) Output layer: between 8 to 12 nodes.</p><p>7) Activation function: ReLU, Tanh and Logistics independently.</p><p>Model Evaluation—Deep Learning</p><p>MLP Classifier were established with the above parameters, different iteration count were used to test out not only one activation function but also Tanh, logistics and many others, the below table is summary of the results of running numerous tests and training on our MLP classifier.</p><table-wrap id="table3" ><label><xref ref-type="table" rid="table3">Table 3</xref></label><caption><title> MLP algorithm results—Here is a summary of the results obtained from the neural networks (MLP) algorithm classifier</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >No.</th><th align="center" valign="middle" >MLP Classifier</th><th align="center" valign="middle" >Activation Function</th><th align="center" valign="middle" >Train/Test Split</th><th align="center" valign="middle" >Hidden Layers Size (# of Nodes1, # of Nodes 2, …)</th><th align="center" valign="middle" >No of Iterations</th><th align="center" valign="middle" >Accuracy</th></tr></thead><tr><td align="center" valign="middle" >1</td><td align="center" valign="middle" >Test 1</td><td align="center" valign="middle" >Relu</td><td align="center" valign="middle" >70/30</td><td align="center" valign="middle" >3 Hidden Layers (14, 10, 8)</td><td align="center" valign="middle" >50</td><td align="center" valign="middle" >81.81%</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >Test 2</td><td align="center" valign="middle" >Relu</td><td align="center" valign="middle" >70/30</td><td align="center" valign="middle" >3 Hidden Layers (15, 10, 8)</td><td align="center" valign="middle" >100</td><td align="center" valign="middle" >88.31%</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >Test 3</td><td align="center" valign="middle" >Relu</td><td align="center" valign="middle" >70/30</td><td align="center" valign="middle" >3 Hidden Layers (20, 15, 12)</td><td align="center" valign="middle" >150</td><td align="center" valign="middle" >86.36%</td></tr><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" >Average</td><td align="center" valign="middle" >Relu</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" >85.49%</td></tr><tr><td align="center" valign="middle" >1</td><td align="center" valign="middle" >Test 1</td><td align="center" valign="middle" >Tanh</td><td align="center" valign="middle" >70/30</td><td align="center" valign="middle" >3 Hidden Layers (14, 10, 8)</td><td align="center" valign="middle" >50</td><td align="center" valign="middle" >85.06%</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >Test 2</td><td align="center" valign="middle" >Tanh</td><td align="center" valign="middle" >70/30</td><td align="center" valign="middle" >3 Hidden Layers (15, 10, 8)</td><td align="center" valign="middle" >100</td><td align="center" valign="middle" >76.62%</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >Test 3</td><td align="center" valign="middle" >Tanh</td><td align="center" valign="middle" >70/30</td><td align="center" valign="middle" >3 Hidden Layers (20, 15, 12)</td><td align="center" valign="middle" >150</td><td align="center" valign="middle" >81.49%</td></tr><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" >Average</td><td align="center" valign="middle" >Tanh</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" >81.06%</td></tr><tr><td align="center" valign="middle" >1</td><td align="center" valign="middle" >Test 1</td><td align="center" valign="middle" >Logistic</td><td align="center" valign="middle" >70/30</td><td align="center" valign="middle" >3 Hidden Layers (14, 10, 8)</td><td align="center" valign="middle" >50</td><td align="center" valign="middle" >87.01%</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >Test 2</td><td align="center" valign="middle" >Logistic</td><td align="center" valign="middle" >70/30</td><td align="center" valign="middle" >3 Hidden Layers (15, 10, 8)</td><td align="center" valign="middle" >100</td><td align="center" valign="middle" >86.36%</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >Test 3</td><td align="center" valign="middle" >Logistic</td><td align="center" valign="middle" >70/30</td><td align="center" valign="middle" >3 Hidden Layers (20, 15, 12)</td><td align="center" valign="middle" >150</td><td align="center" valign="middle" >85.35%</td></tr><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" >Average</td><td align="center" valign="middle" >Logistic</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" >86.24%</td></tr><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" >Overall Average</td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" ></td><td align="center" valign="middle" >84.26%</td></tr></tbody></table></table-wrap><p>The developed MLP classifier yielded a satisfactory set of results. Various activation functions, including ReLU, Tanh, and Logistics, were utilized during testing, as illustrated in <xref ref-type="table" rid="table3">Table 3</xref>. Multiple hidden layers were also incorporated to ensure random distribution of initial weights and their subsequent updates through the backpropagation technique. The average accuracy rates for ReLU, Tanh, and Logistics were approximately 85.49%, 81.06%, and 86.24%, respectively, resulting in an overall accuracy of 84.26%. This represents a penalty for not achieving the expected output or an error rate of 15.7%.</p></sec><sec id="s8"><title>8. Discussion of Results (Model Analysis and Reporting)</title><p>All the machine learning algorithms and techniques we’ve introduced have provided exceptional and remarkably accurate evaluation results for our heart failure dataset. Among the conventional machine learning algorithms, our model can accurately predict outputs from unseen data with an average accuracy exceeding 86%. Notably, the Support Vector Machine (SVM) algorithm emerges as the top-performing machine learning model, with the exception of the decision tree algorithm. SVM has produced a predictive model with 89% accuracy and an error rate of 11%.</p><p>Consequently, we have excluded the decision tree algorithm, which achieved 99% accuracy, from our considerations due to its tendency to overfit. An overfit model is not suitable for real-world scenarios and is prone to making inaccurate predictions on unseen data. Nevertheless, there are potential solutions to tackle the overfitting problem in decision tree algorithms. These include training the model on even larger datasets or implementing regularization techniques to penalize excessive parameter values. These solutions are designed to decrease the overall complexity of the model.</p><p>On the other hand, the usage of the MLP algorithm has produced similar results to the traditional machine learning algorithms. As shown in <xref ref-type="fig" rid="fig8">Figure 8</xref>, the average accuracy percentages for the ReLU, Tanh, and Logistic activation functions are 85%, 81%, and 86%, respectively, with an overall average of 84% and a loss value of 16%.</p><p>In my opinion, employing the MLP classifier in our classification scenario is a superior approach for the following reasons. Firstly, the MLP algorithm continuously learns from itself in real-life environments by adjusting the total weights during each iteration, enhancing the overall prediction model and generating accurate outputs. Additionally, as the dataset continues to grow in size, the model can self-train on unseen data, further improving its performance.</p><p>The second reason why the MLP algorithm is the most suitable choice in this case is its handling of unseen data. Based on the loss curve results obtained from all the classifiers used in this scientific paper, the loss curve of MLPs shows signs of progressive improvement during each iteration phase, particularly when the MLP classifier uses logistic-based activation functions.</p><p>This theory has been tested using three different activation functions for the MLP classifier.</p><p>Let’s begin with the MLP classifier using the ReLU activation function. As illustrated in <xref ref-type="fig" rid="fig9">Figure 9</xref>, we can observe that the model quickly adapted to the given dataset and successfully dealt with test data, producing accurate predictions within the first 10 iterations.</p><p>The utilization of the ReLU activation function significantly improved the overall performance. However, after the 10<sup>th</sup> iteration, the model’s training progress became more static with no visible improvement.</p><p>This limitation of the model can be attributed to the use of ReLU, as it assigns a zero value to inactive elements on the negative axis. Consequently, it failed to recognize data in that region and was unable to effectively train our data to gradually recognize unseen or new data.</p><p>Moving on to the next model with the implementation of the Tanh activation function, as depicted in <xref ref-type="fig" rid="fig1">Figure 1</xref>0 above, we can observe that this model performs better than the previous one. The model demonstrates gradual improvement with each iteration, indicating that it is learning from past data and utilizing that knowledge to predict future data points.</p><p>Our last test is with the use of the Logistic regression activation function or Sigmoid in the above <xref ref-type="fig" rid="fig8">Figure 8</xref>, we can see the smooth descent with every iteration from iteration number 1 to 20, the result was a loss of 55%. The model accuracy is tested with every iteration and each iteration is considered a progressive iteration as the more the model is trained and tested against the test dataset the more the model is able to recognize the given data and perform positively. So far, the use of the Sigmoid activation function has resulted in producing a better and more stable model.</p><p>MLP classifier with Logistic feature as an activation function will perform the best in real life, also the computational power of the use of this method will not only produce an optimal results but also will leave room for improvement.</p><p>On another hand, we can realize that with an MLP classifier the model produces a better predictive result gradually and the model recognize the given dataset much efficiently than other Machine learning algorithms such as naive Bayes or decision tree, where they merely perform well on real-life datasets.</p></sec><sec id="s9"><title>9. Conclusion and Future Work</title><p>In this paper, we propose two different comparative machine learning approaches to predict heart disease cases in unseen data. These approaches encompass traditional machine learning concepts and a neural network algorithm.</p><p>The results from both approaches are promising, particularly for the neural network or deep learning based algorithms.</p><p>Previous research literature suggests that classification algorithms like decision trees are not ideal for this challenge due to their tendency to overfit [<xref ref-type="bibr" rid="scirp.128020-ref18">18</xref>] . However, the use of deep learning algorithms proves to be the best approach for predicting unseen data and handling large datasets in real life. We evaluate the models using a confusion matrix and F1 Score metrics.</p><p>As predicted, the MLP algorithm outperforms other classification algorithms such as decision trees, random forest, KNN algorithm, and regression when predicting unseen heart patient data.</p><p>To enhance and build upon this research, we may explore the adaptation of various feature selection methods and preprocessing techniques, including data binning and the removal of irrelevant features that may lack significance. Furthermore, should a larger dataset become available, we can delve into additional optimization techniques.</p><p>Furthermore, we can test different neural network algorithms, including the CNN neural network, which is tailored and designed for binary classification tasks.</p></sec><sec id="s10"><title>Acknowledgements</title><p>I would like to express my deep appreciation to my wife, Nozima Nazarova, whose inspiration has fuelled my desire to contribute to the medical community and advance knowledge in the field of data science research.</p><p>I am also grateful to my alma mater at Goldsmiths, University of London, for providing me with the foundation in Data Science and Artificial Intelligence. I extend special thanks to Prof. Zimmer and all the faculty and lecturers at the university for their invaluable roles in stimulating our intellectual growth.</p></sec><sec id="s11"><title>Authors Contribution Statement</title><p>The Author conceived and designed the study, collected and analyzed the data, interpreted the results, and drafted the manuscript. Also, the Author provided valuable guidance and critical revisions throughout the research process. The author read and approved the final version of the manuscript.</p></sec><sec id="s12"><title>Data Availability and Access</title><p>The datasets generated during and/or analyzed during the current study are available in the Zenodo repository at the following link: DOI-link, A Novel Approach to Heart Failure Prediction and Classification through Advanced Deep Learning Model|Zenodo.</p></sec><sec id="s13"><title>Funding</title><p>The author would like to acknowledge that this research project did not receive any external funding or financial support. All aspects of this study, including data collection, analysis, and manuscript preparation, were self-funded.</p></sec><sec id="s14"><title>Author’s Information</title><p>Abdalla Ali Mahgoub holds a Master’s degree of Science in Data Science and Financial Technology from Goldsmiths, The University of London. He is currently a renowned Investment Ops/Data Analyst at Ghobash Trading and Investment Co Limited, specializing in financial operations and financial data analysis. Abdalla has extensive publications in the fields of finance, Investment, healthcare, and retail, and has presented his work at numerous conferences and social media channels.</p><p>Additionally, he helped build various startups related not only to e-commerce businesses but also to AI-based ventures.</p></sec><sec id="s15"><title>Conflicts of Interest</title><p>The author declares no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s16"><title>Cite this paper</title><p>Mahgoub, A. (2023) A Novel Approach to Heart Failure Prediction and Classification through Advanced Deep Learning Model. World Journal of Cardiovascular Diseases, 13, 586-604. https://doi.org/10.4236/wjcd.2023.139052</p></sec><sec id="s17"><title>List of Abbreviations</title><p>Adaboost Adaptive Boosting Algorithm</p><p>AI Artificial Intelligence</p><p>ca The Number of Major Vessels</p><p>chol Cholesterol</p><p>CNNs Convolutional Neural Networks</p><p>cp Chest Pain</p><p>CVDs CardioVascular Diseases</p><p>DBNs Deep Belief Networks</p><p>DL Deep Learning</p><p>EDA Exploratory Data Analysis</p><p>exang Exercise Induced Angina</p><p>fbs Fasting Blood Sugar</p><p>GANs Generative Adversarial Networks</p><p>HDL High-Density Lipoproteins</p><p>KNN K-Nearest Neighbors Algorithm</p><p>LDL Low-Density Lipoproteins</p><p>LSTMs Long Short Term Memory Networks</p><p>M.D. Doctor of Medicine</p><p>ML Machine Learning</p><p>MLPs Multilayer Perceptrons</p><p>NB Naive Bayes algorithm</p><p>No. Number</p><p>oldpeak ST Depression Induced by Exercise Relative to Rest</p><p>Ph.D Doctor of Philosophy</p><p>ReLU Rectified Linear Unit</p><p>restecg Resting Electrocardiography or Resting ECG</p><p>RNNs Recurrent Neural Networks</p><p>slope The Slope of the Peak Exercise ST Segment</p><p>SMI Silent (Asymptomatic) Myocardial Ischemia</p><p>SVM Support Vector Machine Algorithm</p><p>Tanh Hyperbolic Tangent</p><p>thal A Blood Disorder Called Thalassemia</p><p>thalach Maximum Heart Rate Achieved</p><p>trestbps Resting Blood Pressure</p><p>V.A. Medical Center Department of Veterans Affairs Medical Center</p><p>vs Versus</p><p>VS Code Visual Studio Code</p><p>WHO World Health Organization</p></sec></body><back><ref-list><title>References</title><ref id="scirp.128020-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Lung National Heart and Blood Institute (NHLBI) (2022) Heart Failure. NHLBI.  
https://www.nhlbi.nih.gov/health/heart-failure</mixed-citation></ref><ref id="scirp.128020-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">World Health Organization (WHO) (2021) Cardiovascular Diseases (CVDs).  
https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases-(cvds)</mixed-citation></ref><ref id="scirp.128020-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Anbuselvan, P. (2020) Heart Disease Prediction Using Machine Learning Techniques. International Journal of Engineering Research &amp; Technology, 9, 1-4.  
https://www.ijert.org/research/heart-disease-prediction-using-machine-learning-techniques-IJERTV9IS110259.pdf</mixed-citation></ref><ref id="scirp.128020-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Hajjam, E.L. Hassani, A., Andres, E. and Gárate-Escamila, A.K. (2022) Classification Models for Heart Disease Prediction Using Feature Selection and PCA. Informatics in Medicine Unlocked, 19, Article No. 100330. 
https://doi.org/10.1016/j.imu.2020.100330</mixed-citation></ref><ref id="scirp.128020-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Iqbal, J., Irfan, R., Hussain, S., Algarni, A.D., Bukhari, S.S.H., Alturki, N., Ullah, S.S. and Ul Hassan, C.A. (2022) Effectively Predicting the Presence of Coronary Heart Disease Using Machine Learning Classifiers. Sensors, 22, Article 7227.  
https://pubmed.ncbi.nlm.nih.gov/36236325/ 
https://doi.org/10.3390/s22197227</mixed-citation></ref><ref id="scirp.128020-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Goel, R. (2021) Heart Disease Prediction Using Various Algorithms of Machine Learning. Proceedings of the International Conference on Innovative Computing &amp; Communication, Ghaziabad, 12 July 2021, 1-5.</mixed-citation></ref><ref id="scirp.128020-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Chiam, Y.K., Malik, A.W., Wan Ahmad, W.A., Yazdani, A. and Varathan, K.D. (2021) A Novel Approach for Heart Disease Prediction Using Strength Scores with Significant Predictors. BMC Medical Informatics and Decision Making, 21, Article No. 194. https://doi.org/10.1186/s12911-021-01527-5</mixed-citation></ref><ref id="scirp.128020-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Bahrami, B. and Shirvani, M.H. (2015) Prediction and Diagnosis of Heart Disease by Data Mining Techniques. Journal of Multidisciplinary Engineering Science and Technology, 2, 1-5. 
https://www.jmest.org/wp-content/uploads/JMESTN42350475.pdf</mixed-citation></ref><ref id="scirp.128020-ref9"><label>9</label><mixed-citation publication-type="book" xlink:type="simple">Boddington, P. (2017) Towards a Code of Ethics for Artificial Intelligence Research. Ed. by Michael Wooldridge Barry O’Sullivan. Springer Publishing, Oxford, 1-5, 27-28.</mixed-citation></ref><ref id="scirp.128020-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Wade, D. (2007) Ethics of Collecting and Using Healthcare Data. BMJ, 334, 1330.  
https://doi.org/10.1136/bmj.39247.679329.80</mixed-citation></ref><ref id="scirp.128020-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Yasser H.M. (2022) Heart Disease Dataset.  
https://www.kaggle.com/datasets/yasserh/heart-disease-dataset</mixed-citation></ref><ref id="scirp.128020-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">William, S., Matthias, P., Andras, J. and Detrano, R. (1988) Heart Disease. UCI Machine Learning Repository. https://archive.ics.uci.edu/dataset/45/heart+disease</mixed-citation></ref><ref id="scirp.128020-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Hospital Medicine Cardiology Healthcare. (2017) Typical Chest Pain vs. Atypical Chest Pain. https://www.timeofcare.com/typical-vs-atypical-chest-pain/</mixed-citation></ref><ref id="scirp.128020-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Pietrangelo, A. (2020) Does High Cholesterol Cause Heart Disease.  
https://www.healthline.com/health/cholesterol-and-heart-disease</mixed-citation></ref><ref id="scirp.128020-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Pandala, S.R. and Silva, B. (2022) Lazy Predict Project. The Python Package Index. https://pypi.org/project/lazypredict/</mixed-citation></ref><ref id="scirp.128020-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Hearty, J. (2016) Advanced Machine Learning with Python. Packt Publishing, Birmingham, 77-92.</mixed-citation></ref><ref id="scirp.128020-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Biswal, A. (2023) Top 10 Deep Learning Algorithms You Should Know in 2023. Simplilearn. 
https://www.simplilearn.com/tutorials/deep-learning-tutorial/deep-learning-algorithm</mixed-citation></ref><ref id="scirp.128020-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Shabaz, M., Dhiman, G., Pande, S., Singh, P., Bharti, R. and Khamparia, A. (2021) Prediction of Heart Disease Using a Combination of Machine Learning and Deep Learning. Computational Intelligence and Neuroscience, 2021, Article ID: 8387680.  
https://doi.org/10.1155/2021/8387680</mixed-citation></ref></ref-list></back></article>