Loading [MathJax]/jax/output/SVG/jax.js
Research article

Cardiovascular disease prediction using hyperparameters-tuned LSTM considering COVID-19 with experimental validation

  • Received: 05 July 2023 Revised: 27 August 2023 Accepted: 05 September 2023 Published: 14 September 2023
  • Heart disease, globally recognized as a leading cause of death, has seen its impact magnified by the emergence of COVID-19. The heightened demand for early detection and diagnosis of heart disease has forced the development of innovative, intelligent systems. This research offers a novel approach by leveraging extended short-term memory networks (LSTM) and including COVID-19 as a significant parameter in cardiac arrest analysis. A comparative study is conducted between LSTM and other prevalent techniques, such as support vector machines (SVM), linear regression (LR), and artificial neural networks (ANN), focusing on accuracy and other prognostic criteria for heart disease. We aim to develop an intelligent system powered by LSTM to predict heart disease, thereby assisting healthcare professionals in making well-informed decisions about heart disease management, stroke prevention, and patient monitoring. Additionally, hyperparameter tuning has been performed to optimize the LSTM model's performance in cardiac arrest prediction. The results underscore that LSTM, especially when trained with COVID-19 as an input parameter, surpasses other established techniques in prediction accuracy. The proposed model underwent experimental testing, showcasing its proficiency in predicting cardiovascular disease.

    Citation: Kuna Dhananjay Rao, Mudunuru Satya Dev Kumar, Paidi Pavani, Darapureddy Akshitha, Kagitha Nagamaleswara Rao, Hafiz Tayyab Rauf, Mohamed Sharaf. Cardiovascular disease prediction using hyperparameters-tuned LSTM considering COVID-19 with experimental validation[J]. AIMS Bioengineering, 2023, 10(3): 265-282. doi: 10.3934/bioeng.2023017

    Related Papers:

    [1] Kayode Oshinubi, Augustina Amakor, Olumuyiwa James Peter, Mustapha Rachdi, Jacques Demongeot . Approach to COVID-19 time series data using deep learning and spectral analysis methods. AIMS Bioengineering, 2022, 9(1): 1-21. doi: 10.3934/bioeng.2022001
    [2] Zheng Guo, Siqi Li, Kaicong Chen, Xuehui Zang . Robust QRS complex detection in noisy electrocardiogram based on underdamped periodic stochastic resonance. AIMS Bioengineering, 2023, 10(3): 283-299. doi: 10.3934/bioeng.2023018
    [3] Sumaiya Noor, Salman A. AlQahtani, Salman Khan . Chronic liver disease detection using ranking and projection-based feature optimization with deep learning. AIMS Bioengineering, 2025, 12(1): 50-68. doi: 10.3934/bioeng.2025003
    [4] Júlia Novaes Matias, Gyovanna Sorrentino dos Santos Campanari, Gabriela Achete de Souza, Vinícius Marinho Lima, Ricardo José Tofano, Claudia Rucco Penteado Detregiachi, Sandra M. Barbalho . Metabolic syndrome and COVID-19. AIMS Bioengineering, 2020, 7(4): 242-253. doi: 10.3934/bioeng.2020021
    [5] Mehmet Yavuz, Waled Yavız Ahmed Haydar . A new mathematical modelling and parameter estimation of COVID-19: a case study in Iraq. AIMS Bioengineering, 2022, 9(4): 420-446. doi: 10.3934/bioeng.2022030
    [6] Islam Uddin, Salman A. AlQahtani, Sumaiya Noor, Salman Khan . Deep-m6Am: a deep learning model for identifying N6, 2′-O-Dimethyladenosine (m6Am) sites using hybrid features. AIMS Bioengineering, 2025, 12(1): 145-161. doi: 10.3934/bioeng.2025006
    [7] Prasantha Bharathi Dhandapani, Dumitru Baleanu, Jayakumar Thippan, Vinoth Sivakumar . On stiff, fuzzy IRD-14 day average transmission model of COVID-19 pandemic disease. AIMS Bioengineering, 2020, 7(4): 208-223. doi: 10.3934/bioeng.2020018
    [8] Ayub Ahmed, Bashdar Salam, Mahmud Mohammad, Ali Akgül, Sarbaz H. A. Khoshnaw . Analysis coronavirus disease (COVID-19) model using numerical approaches and logistic model. AIMS Bioengineering, 2020, 7(3): 130-146. doi: 10.3934/bioeng.2020013
    [9] Kranthi Kumar Lella, Alphonse PJA . A literature review on COVID-19 disease diagnosis from respiratory sound data. AIMS Bioengineering, 2021, 8(2): 140-153. doi: 10.3934/bioeng.2021013
    [10] Sarbaz H. A. Khoshnaw, Kawther Y. Abdulrahman, Arkan N. Mustafa . Identifying key critical model parameters in spreading of COVID-19 pandemic. AIMS Bioengineering, 2022, 9(2): 163-177. doi: 10.3934/bioeng.2022012
  • Heart disease, globally recognized as a leading cause of death, has seen its impact magnified by the emergence of COVID-19. The heightened demand for early detection and diagnosis of heart disease has forced the development of innovative, intelligent systems. This research offers a novel approach by leveraging extended short-term memory networks (LSTM) and including COVID-19 as a significant parameter in cardiac arrest analysis. A comparative study is conducted between LSTM and other prevalent techniques, such as support vector machines (SVM), linear regression (LR), and artificial neural networks (ANN), focusing on accuracy and other prognostic criteria for heart disease. We aim to develop an intelligent system powered by LSTM to predict heart disease, thereby assisting healthcare professionals in making well-informed decisions about heart disease management, stroke prevention, and patient monitoring. Additionally, hyperparameter tuning has been performed to optimize the LSTM model's performance in cardiac arrest prediction. The results underscore that LSTM, especially when trained with COVID-19 as an input parameter, surpasses other established techniques in prediction accuracy. The proposed model underwent experimental testing, showcasing its proficiency in predicting cardiovascular disease.



    Cardiovascular diseases constitute a prominent cause of mortality globally. In this regard, early detection and diagnosis are critical for effective treatment. To predict the risk of a heart attack, various techniques, and technologies can be used. The Internet of Things (IoT) devices can continuously monitor parameters such as heart rate, blood pressure, and oxygen saturation levels. These devices can transmit the collected data to a central system where Machine Learning (ML) algorithms can be leveraged to analyze the information and as certain the potential risk of a heart attack. Such integrated systems hold promises for enhancing proactive healthcare management by enabling timely risk prediction and preventive interventions based on real-time physiological data. But the IoT devices can be costly and require a consistent internet connection. Furthermore, in IoT technology, factors such as battery life and sensor calibration may have an impact on prediction accuracy [1],[2]. ECG monitoring entails the precise positioning of sensors on the body to diligently observe and record the intricate electrical activity of the heart. The data is then analyzed to detect anomalies indicating a risk of heart attack. Some patients may find ECG monitoring uncomfortable, and the data may be influenced by factors such as movement and electrode placement [3],[4]. The Arduino platform is a microcontroller platform that can be used to build custom heart rate monitoring devices. These devices can be programmed to collect and analyze data. Further, send alerts if a heart attack is imminent. Setting up and programming Arduino devices necessitates sound technical knowledge. Furthermore, factors such as sensor calibration and environmental conditions may have an impact on prediction accuracy [5],[6]. Machine Learning has emerged as a prevalent technique extensively employed in the prediction of heart attacks. It analyses data using algorithms and statistical models to identify patterns that may indicate the likelihood of a cardio arrest.

    The ANN is a machine-learning algorithm designed to emulate the structural and functional characteristics of the human brain. By leveraging its architecture, ANNs possess the capability to acquire intricate patterns and correlations within data, enabling them to generate predictions and insights based on acquired knowledge. ANN can be used in heart attack prediction by training the network with historical patient data and using the network to predict the likelihood of a heart attack for a new patient [7][9]. Logistic Regression (LR) is a statistical machine learning algorithm employed to examine the association between a dependent variable, such as the occurrence of a heart attack, and one or more independent variables, including but not limited to age, gender, and blood pressure. Its utilization facilitates the understanding of the probabilistic relationship and provides insights into the influence of these independent variables on the likelihood of the specified outcome. LR can be used in heart attack prediction by building a model that calculates the probability of a heart attack based on the patient's input features [10][12]. SVM (Support Vector Machine) is a type of machine learning algorithm that separates data into different classes by finding the hyperplane that maximally separates the classes. SVM can be used in heart attack prediction by separating patients who have had a heart attack from those who have not, based on their input features [13][15]. In [16], a new approach called Improved Feature Space-based Gradient Boosting Regression Tree Ensemble (IFS-GBRTE) to predicting complications in Type 2 Diabetes (T2D) cases. The proposed method employs a gradient-boosting ensemble algorithm with classification and regression tree (CART) base learners to expand the feature space using existing theories and refine it through cross-validation. The technique outperforms individual and ensemble models with an amazing 82.49% accuracy. This breakthrough not only improves the accuracy of T2D complication risk prediction, but it also has the ability to guide early prevention, effective screening, and comprehensive care regimens, ultimately lowering mortality rates and optimizing healthcare budget allocation. In [17], the prediction model has been the focus of studies since the last century in the diagnosis and prognosis of various diseases. With the advancement in computational technology, machine learning (ML) has become the widely used tool to develop a prediction model. This review is to investigate the current development of a prediction model for the risk of cardiovascular disease (CVD) among type 2 diabetes (T2DM) patients using machine learning. In [18], Colorectal cancer (CRC) is the third leading cause of cancer-related deaths worldwide, often originating from precancerous polyps. Detecting and classifying these polyps accurately and early during colonoscopy is crucial. Our innovative approach introduces an interpretable deep neural network, named multi-task real-time deep neural network with Shapley additive explanations. This method simultaneously detects and classifies polyps according to Yamada guidelines, and segments them. Notably, this is the first instance of using deep learning for Yamada classification during colonoscopy. We validate our approach through comprehensive experiments on CVC-CLINIC and CVC-COLON datasets, showing strong performance using metrics like AUC, precision, recall, F1 score and accuracy. Our method offers real-time efficiency, superior to other deep learning methods, providing interpretable feedback that meets colorectal surgeon requirements. This valuable decision support minimizes missed diagnoses and misclassifications, enhancing colonoscopy's effectiveness.

    The above-mentioned literature mostly focuses on machine learning-based algorithms to detect cardiovascular diseases considering the input as diabetics, smoking habits, pulse rate, and oxygen levels. However, after COVID-19 pandemic, there are several sudden deaths have been observed due to cardio arrest in healthy persons. Despite its primary classification as a respiratory disease, COVID-19 has the potential to have a significant impact on the cardiovascular system [19][21]. Along with respiratory difficulties, some people who get the virus may develop cardiovascular complications, such as myocarditis (inflammation of the heart muscle), thrombosis (the formation of blood clots), and blood vessel damage. It is critical to recognize that the complex link between COVID-19 and cardiovascular diseases defies simple categorization. Not every COVID-19 patient will develop cardiovascular difficulties, and the virus is not the sole cause of such complications. The interplay of different elements, ranging from pre-existing health issues and age to the complexities of immune response, influences the nature and severity of symptoms. Practitioners use a comprehensive strategy to assess an individual's cardiovascular well-being, incorporating several benchmarks such as symptoms, medical history, and diagnostic testing. COVID-19 may play a role in this framework, particularly if individuals continue to experience cardiovascular symptoms after infection with COVID-19. In recent times, it has been observed that after COVID-19, the number of cardiac arrest cases has increased. In addition, recent studies have demonstrated a strong correlation between COVID-19 and cardiac attack, making it a major factor in predicting cardiovascular diseases. This motivates to develop a model that focuses on the probability of cardio arrest chances in COVID-19-affected and non-COVID patients.

    Motivated by the need to consider COVID as one of the important parameters, this study proposed a COVID-based LSTM model to predict cardiovascular disease. LSTM models possess the capability to acquire intricate patterns and establish relationships within temporal data, enabling them to generate predictions based on learned insights. In the context of heart attack prediction, LSTM's potential is noteworthy due to its ability to effectively capture long-term dependencies and discern complex patterns present in time-series data. This unique capacity empowers LSTM models to contribute significantly to the advancement of heart attack prediction by accurately identifying critical indicators and risk factors over extended periods. Further, to analyze the impact of COVID-19 on cardiovascular diseases, hyperparameter-tuned LSTM models are being employed. These models are being trained using ECG peak values and COVID-19 as parameters to predict the likelihood of cardiovascular disease in patients. The use of hyperparameter tuning ensures optimal performance of the LSTM models, leading to accurate predictions. This research holds substantial potential for enhancing the precision of cardiovascular disease prediction, while concurrently facilitating prompt patient management and treatment. The comparative analysis has been carried out among proposed hyperparameter-tuned LSTM models with SVM, ANN, and LR models. The LSTM model has shown superiority in predicting cardiovascular diseases in this context because it can capture temporal dependencies in data, which is critical in medical applications. The proposed technique has been validated experimentally under different operating conditions. Finally, the proposed model will provide valuable insights into the efficacy of LSTM models in predicting cardiovascular diseases and will have a noteworthy contribution to the early detection and treatment of such diseases.

    The major contribution of the paper has been highlighted as:

    • A hyperparameter-based LSTM model has been proposed for cardiac arrest prediction.

    • The proposed model has undergone comparative evaluations against established techniques, including SVM, ANN, and LR, with regard to its effectiveness in predicting cardiac arrest.

    • In the proposed model, COVID-19 has been considered as an input training parameter in order to correlate COVID and cardiac arrest.

    • The proposed cardiac arrest prediction model has been validated experimentally under various operating conditions.

    The rest of the paper is organized as follows: In section II and Section III depict the LSTM model and hyperparameters tuning of LSTM respectively. Section IV discusses the analysis and discussion of the results. Finally, section V highlights the conclusion of the work.

    In this section, LSTM based model has been discussed to predict cardiovascular disease. Long short-term memory (LSTM) neural networks are brought out to encounter the drawbacks of recurrent neural networks. LSTM can be considered an advanced sequential network that allows information stored in short-term memory for longer durations. The drawback of RNNs is that they cannot remember information for a longer time, here comes the problem of vanishing gradient. Thus, LSTMs have been identified as a viable solution to address the challenge of vanishing gradient, thereby enhancing the efficacy of cardiovascular disease prediction. They can learn the long-term dependencies. Figure 1 depicts a detailed view of the LSTM network. Here, ‘c’ represents the vector representation of the neuron, and the time state is denoted with ‘t’. At the current instant ‘t’, the input layer is expressed as X(t) and at the previous moment (t−1), the hidden layer is expressed as H(t−1). The internal state Sc is the cell state where we can add or remove the information. Gates are connected to this cell state and are used to control the information that passes through it. Gates are the structures that decide which information needs to be passed through them. A gate refers to a sigmoidal layer that is influenced by the input layer at the current time step and the hidden layer at the preceding time step [20].

    Figure 1.  LSTM architecture.

    Forget gate: The primary role of the forget gate is to discern the components of information that necessitate retention and those that can be disregarded within the context of the overall memory system. Thus, we can say that the forget gate is a sigmoid layer that decides whether information needs to be remembered or forgotten. It is represented by Fc. The output of the forget gate is either 0 or 1. Here, if the output is ‘1’, then the information will be retained or remembered. If the output of Fc is ‘0’ then it means that the information will be forgotten. The inputs to the forget gate are X(t) and H(t−1). The forget gate can be evaluated using (1).

    f(t)=σ(WfXx(t)+Wfhh(t1)+bf)

    Input gate: The input gate serves as the component responsible for assimilating new information derived from the input into the cell. This gate plays a pivotal role in determining the specific new information that should be incorporated into the cell state. The input gate encompasses both a sigmoid layer and a tanh layer, working in tandem to facilitate this decision-making process. The sigmoid layer regulates the values that need to be added to the cell state which is represented as ‘ic’. The tanh layer, denoted as ‘gc’, fulfills the purpose of generating a vector representing the new state, ‘sc’. This new state vector is subsequently combined with the previous state, thereby facilitating the update process. These two are represented using Eqs 2,3.

    i(t)=σ(WiXx(t)+Wihh(t1)+bi)

    g(t)=tanh(WgXx(t)+Wghh(t1)+bg)

    The derived Eqs 2,3 are multiplied and then the useful information from forget gate is multiplied by the previous cell state to update the information from the previous state to the current cell state. This is represented using Eq 3.

    s(t)=g(t)*i(t)+s(t1)*f(t)

    Output gate: The information which needs to be output is obtained by the output gate ‘oc’. It comprises a sigmoid layer and a Tanh layer. The tanh layer is applied to the current cell state ‘sc’ to scale the values to (−1 to +1). This is multiplied by the sigmoid layer output to obtain the cell state information. This is represented using Eqs 5,6.

    o(t)=σ(WoXx(t)+Wohh(t1)+bo)

    h(t)=tanh(s(t))*o(t)

    When it comes to selecting hyperparameters for an LSTM model, the following key parameters need to be considered:

    The number of LSTM layers: The quantity of LSTM layers can influence the model's capacity to capture intricate relationships within the data. However, it is crucial to exercise caution when adding excessive layers, as it can potentially result in overfitting of the model.

    The number of LSTM units: The quantity of LSTM units within each layer can also influence the model's capacity to capture intricate data relationships. Nevertheless, caution must be exercised when adding a surplus of units, as it may escalate the computational complexity of the model.

    Learning rate: The learning rate plays a crucial role in regulating the speed at which the model adjusts its parameters during the training process. Employing a high learning rate may result in rapid convergence but can lead to suboptimal performance. Conversely, a low learning rate may prolong the convergence time excessively. Thus, selecting an appropriate learning rate is essential for achieving optimal training outcomes.

    Dropout rate: Dropout is a regularization technique employed during training, whereby nodes within the network are randomly omitted. This mechanism aids in mitigating the risk of overfitting. The dropout rate, defined as the probability of node dropout, governs the extent to which nodes are excluded from the network during each training iteration.

    Batch size: The batch size denotes the number of samples processed in each training iteration. Opting for a larger batch size can expedite convergence; however, it is important to consider the increased demand for memory and computational resources that accompany it.

    Number of epochs: The number of epochs determines the frequency with which the model iterates over the complete training dataset. Training with a limited number of epochs can result in underfitting, whereby the model fails to capture complex patterns in the data. Conversely, excessive epochs can lead to overfitting, where the model becomes overly specialized to the training dataset and exhibits reduced generalization capabilities. Thus, selecting an appropriate number of epochs is crucial for achieving a well-balanced model performance [22][24].

    Cardiovascular disease management benefits from effective handling of temporal dependencies, accommodating irregular data sampling, enabling early risk detection, analyzing real-time wearable or remote data, and providing contextual insights through consideration of medical history and lifestyle using Long Short-Term Memory (LSTM) models. The capacity of LSTM to capture evolving illness traits over time helps to comprehend disease development, while its adaptability to irregular data points assures reliable findings despite varying measurement intervals. The model's sensitivity to tiny changes allows for fast alarms for cardiovascular risks, allowing for proactive actions, while its contextual awareness improves the accuracy of outcome estimates. This holistic approach to cardiovascular care alters it by combining disparate parts into a coherent framework for informed decision-making. Due to above-mentioned special features, LSTM techniques have been adopted in cardiovascular disease prediction in the present study.

    Figure 2.  Overview of the proposed cardiovascular diseases detection system.

    The proposed LSTM based cardiovascular disease prediction system has been depicted in Figure 2. In the proposed system, electrocardiogram (ECG) peak signal and COVID have been considered as parameters to forecast cardiac arrest. A recent study compared different machine learning models and found that the LSTM model achieved the highest prediction accuracy in many applications. In this regard, in the present paper, the LSTM model has been used to predict cardiac arrest. Furthermore, the hyperparameters tuning mechanism has been adopted to improve the LSTM model's performance. LSTM models, in general, have exhibited remarkable proficiency in handling sequential data and have demonstrated successful applications across a range of domains, including but not limited to time series prediction, language modeling, and speech recognition. In the context, of cardiac arrest prediction, LSTM models can analyze time-series data that has been generated from ECGs to identify patterns or abnormalities that might indicate a higher risk of cardiac arrest. To potentially enhance the accuracy of the LSTM model, an additional parameter, namely oxygen level, has been incorporated alongside the ECG peak signal and COVID. This integration aims to leverage the combined information from these factors, further augmenting the model's predictive capabilities. The MAX30100 is a sensor that measures oxygen saturation levels and heart rate. Including this data alongside ECG and COVID, information can provide a more comprehensive understanding of the patient's cardiovascular health and overall well-being. Incorporating the MAX30100 data into the LSTM model can potentially enhance the model's ability to detect abnormalities and patterns in the data, as it offers a different perspective on the patient's heart rate and oxygen levels. Nevertheless, ensuring the quality and representativeness of the MAX30100 data utilized for both training and testing the model is of paramount importance. Combining multiple inputs in an LSTM model can potentially improve the accuracy of cardiac arrest prediction by capturing a more holistic view of the patient's health. Nonetheless, selecting appropriate hyperparameters and using high-quality training data are crucial considerations for building accurate and reliable LSTM models. One such concept is using a Raspberry Pi as a controller to gauge the likelihood of developing heart disease. The AD8232 and a push-pull button for COVID-19 input are the inputs for this prediction model. The AD8232 is a heart rate monitor that records heartbeat information and measures the electrical activity of the heart. When determining if a patient is a COVID-19 patient or not, the push-pull button is used. We've decided in advance that a 1 denotes a COVID-19 patient and a 0 denotes a non-COVID patient. Using the patient's heart rate, ECG, and COVID-19 as input, the LSTM algorithm (discussed in section 2) has been examined for cardiovascular disease prediction. The developed LSTM model can then accurately forecast the patient's risk of heart disease. The model's final result will show whether the patient is at risk for heart disease or not. Medical professionals can use this predictive model to spot heart disease early warning symptoms and take the required actions to stop additional difficulties.

    In this section, LSTM hyperparameter-tuning techniques have been elaborated in detail The hyperparameter tuning involves the systematic exploration and selection of optimal parameter values that govern the behavior and performance of an LSTM model. In LSTM, hyperparameters are not learned from data, but rather they are set by the user or the machine learning engineer prior to training the algorithm. The process of hyperparameter tuning entails an iterative search for the optimal combination of hyperparameters that maximizes the algorithm's performance on a dedicated validation set. Various techniques can be employed to accomplish this task, including grid search, random search, or Bayesian optimization, which facilitate the systematic exploration and evaluation of different hyperparameter configurations. Hyperparameter tuning is an important step in the LSTM workflow, as it can significantly impact the performance of the algorithm. By selecting the optimal hyperparameters, the algorithm can achieve better accuracy, faster convergence, and improved generalization to new data.

    Hyperparameter tuning is an important step in the process of developing an optimal LSTM model. To enhance the model's performance, several hyperparameters can be subject to tuning, encompassing the number of LSTM layers and units, learning rate, dropout rate, batch size, sequence length, and activation function. Exploring and optimizing these hyperparameters can contribute to the refinement and effectiveness of the model. Each of these hyperparameters holds the potential to influence the model's capacity to comprehend intricate patterns within the input sequence and mitigate the risk of overfitting. Finding the optimal combination of hyperparameters requires experimentation, and a grid search or random search algorithm can be used to automate the process. Ultimately, the goal of hyperparameter tuning is to achieve a well-performing LSTM model that can accurately predict outputs for a given input sequence [25][27].

    Hyperparameter tuning using GridSearchCV from sci-kit-learn. GridSearchCV is a function designed to systematically explore a specified parameter space, exhaustively searching for the optimal combination of hyperparameters that yields the highest performance for a given estimator. A multilayer perceptron (MLP) classifier is used as the estimator, and a parameter space is defined using a dictionary object. The parameter space includes several hyperparameters that can be tuned, such as the number of hidden layers and their sizes, the activation function, the optimization algorithm, the regularization parameter alpha, and the learning rate. GridSearchCV performs cross-validation with the given hyperparameters and selects the combination that results in the highest accuracy score. The n_jobs parameter is set to -1 to use all available CPUs, and the cv parameter is set to 3 to perform a 3-fold cross-validation. Upon fitting the GridSearchCV object to the training data, the optimal hyperparameters discovered are displayed in the console by accessing the clf.best_params_ attribute. These hyperparameters can then be used to build a final MLP classifier that should perform better than a default MLP classifier with no hyperparameter tuning. GridSearchCV operates by systematically exploring a pre-defined hyperparameter space specified by the user. It evaluates the model's performance for each unique combination of hyperparameters using cross-validation. In this example, the hyperparameter space is defined by the “parameter_space” dictionary. For each combination of hyperparameters, the GridSearchCV function trains an MLPClassifier model using the training data and evaluates its performance using cross-validation with 3 folds (as specified by the “c” parameter). The performance of each model is then averaged over the folds to obtain a cross-validation score. Finally, GridSearchCV returns the combination of hyperparameters that resulted in the highest cross-validation score as the best hyperparameters found. This is printed to the console in the last line of the code. Figure 2 depicts the operation of the hyperparameter tuning model. Figure 3 depicts the steps of the optimal hyperparameter-tuning. GridSearchCV, a comprehensive hyperparameter tuning methodology, has different advantages over previous methods. GridSearchCV ensures that the ideal configuration is determined inside the search space by thoroughly exploring all feasible hyperparameter combinations within a specific grid. This intensive search method provides a thorough grasp of the correlations between hyperparameters and model performance, as well as results that are easily interpretable and insights into parameter relevance. Its organized exploration reduces the danger of missing important hyperparameter interactions, and its deterministic nature ensures reproducibility and allows for baseline comparisons with other tuning methods. GridSearchCV is ideal for novices and smaller parameter spaces because of its ease of implementation. However, while GridSearchCV excels in thoroughness, its computing requirements may not be suitable for large search fields. Other techniques such as random search or Bayesian optimization may be more efficient alternatives, emphasizing the necessity of method selection based on individual problem settings and available resources.

    Figure 3.  Hyperparameters tuning technique.

    In this section, the cardiac arrest prediction technique using LSTM has been proposed. The proposed system's effectiveness has been studied in a real-time framework.

    Figure 4.  Experimental test bench.

    The experimental prototype has been developed to predict cardiac arrest and has been depicted in Figure 4. The test bench includes the AD8232, MAX30100, and a push-pull button. The AD8232 is a specialized monitoring chip designed for single-lead ECG measurement, enabling the precise assessment of the heart's electrical activity (Figure 5). The measured ECG signal for different persons has been depicted in Figure 5. The MAX30100 is a dedicated module functioning as a pulse oximeter and heart rate sensor, primarily employed for quantifying heart rate and determining the blood oxygen saturation level. The push-pull button is used to give input that is 1 or 0 to specify whether the person has a history of COVID-19 or not. The inclusion of COVID-19 as one of the important parameters in cardiac arrest prediction because patients with COVID-19 exhibit cardiac muscle inflammation because this virus directly damages the heart, even in individuals who were previously healthy and had no cardiac issues. This type of inflammation damages the cardiac muscle, alters heart rhythm, and impairs blood pumping at the highest level. The human heart's electrical activity can be measured through an electrocardiogram (ECG) signal. The ECG signal provides valuable insights into the heart's health and can help identify various heart conditions, including the risk of a heart attack. The developed LSTM model will be trained considering the input datasets collected from AD8232, MAX30100, and a push-pull button. The trained model uses the peak value of the ECG signal (Figure 5) to determine the risk of a heart attack. The model's training has determined that if the peak value falls between −0.25 to 0.50, the patient is at risk of a heart attack. If the peak value falls between 0.50 to 1.25, the patient is not at immediate risk of a heart attack, but some over-peaks might be allowed due to exercise or other physical activities. However, if the peak value exceeds 1.25 and falls between 1.25 to 1.50, it indicates that the patient is again at risk of a heart attack.

    Figure 5.  ECG waveform of the different persons.

    Based on the output from this sensor (MAX30100), a machine-learning model can be trained to prognosticate an individual's risk level by utilizing their SpO2 values. In this particular scenario, the machine learning model has been trained to classify SpO2 values into three distinct categories, thereby determining the corresponding risk levels associated with each category. SpO2 values between 0 to 50 have been classified as high risk, values between 50 to 75 as mild risk, and values between 75 to 100 as non-risk, which indicates that the individual is healthy.

    Figure 6.  Comparative analysis of different ML techniques.

    Based on the provided accuracy scores, we can see that all four models - SVM, LR, ANN, and LSTM - have varying levels of performance in predicting the target variable. The Support Vector Machine (SVM) has the lowest accuracy score of 76%, which is the least accurate among the four models. SVMs are recognized for their proficiency in handling intricate datasets; however, their performance may not always be optimal when confronted with datasets containing a high number of features. Logistic Regression (LR) has an accuracy score of 78.8%, which is higher than SVM but still lower than ANN and LSTM. LR is a linear model that can work well on datasets with few features but may struggle on more complex datasets. Artificial Neural Networks (ANNs) have an accuracy score of 85%, which is higher than both SVM and LR but still lower than LSTM. ANNs are good at handling complex data and can be very powerful, but they can also be prone to overfitting and may require careful tuning to perform well. Finally, the Long Short-Term Memory (LSTM) model has the highest accuracy score of 88.5%, making it the most accurate model among the above-discussed models. Figure 6 depicts the comparative analysis among different ML algorithms (LSTM, SVM, LR, and ANN) and it has been observed that the LSTM-based model has been outperformed in terms of accuracy.

    Further, the hyperparameter tuning of LSTM can improve the overall accuracy and reliability of cardiovascular disease prediction. In this regard, hyperparameter tuning (discussed in section 3) has been adopted in order to find reliable and best prediction results. Further, hyperparameters are values that are set prior to training the LSTM network and can significantly impact its performance. In this work, several key hyperparameters within the LSTM architecture have been examined, including the number of LSTM layers, the number of LSTM units per layer, the choice of activation function, the dropout rate, and the learning rate. Table 1 depicts the optimally tuned hyperparameters such as hidden layer size, Solver, Alpha, learning rate and activation function. These hyperparameters have been deemed critical and subject to comprehensive analysis in order to optimize the LSTM model's performance. By tuning these hyperparameters, it has been observed that performance enhancement of the LSTM model by adjusting its architecture and regularization. For example, increasing the number of LSTM layers or units can improve the model's ability to capture complex temporal dependencies, while adding dropout regularization can help prevent overfitting. Further, hyperparameter tuning can be an effective way to optimize an LSTM model for a specific task and improve its performance and accuracy. However, it's important to note that hyperparameter tuning should be done carefully and systematically to avoid overfitting and to ensure that the network generalizes well to unseen data. After tuning the hyperparameter (hidden layer size, Solver, Alpha, learning rate and activation function), the overall accuracy has been improved from 88.5 to 91%. This depicts the efficacy of the optimal hyperparameter tuning. Figure 7 depicts a comparative analysis of with and without hyperparameter tuning. It also highlights the significance of optimal tuning by improving the overall model performance by predicting accurate results. Further, Table 2 depicts the hyperparameter tuning in terms of accuracy, sensitivity, specificity and AUC. There is no change in sensitivity and specificity but accuracy and AUC are higher during hyperparameters tuning.

    Table 1.  Hyperparameters configuration of LSTM Scheme.
    Parameters Selected Optimal parameters
    Hidden layer size (50, 50, 50), (50, 100, 50), (100) (50, 100, 50)
    Solver Sgd, adam Adam
    Alpha 0.0001,0.05 0.0001
    Learning rate Constant, adaptive Adaptive
    Activation function Tanh, sigmoid Tanh

     | Show Table
    DownLoad: CSV
    Table 2.  Hyperparameters tuning.
    LSTM Accuracy Sensitivity Specificity AUC
    Without tuning 88.5 1.0 90.8 1.0
    With hyperparameters tuning 91.0 1.0 92.1 1.0

     | Show Table
    DownLoad: CSV
    Figure 7.  Hyperparameters tuned LSTM and non-hyperparameters tuned LSTM.
    Table 3.  Prediction analysis using different techniques with test datasets.
    Trained data SVM LR ANN LSTM
    (Suffering Patient) - 1 Yes Yes Yes Yes
    (Non-suffering Patient) - 2 No No Yes No
    (Suffering Patient) - 3 Yes Yes No Yes
    (Suffering Patient) - 3 Yes Yes No Yes
    (Suffering Patient) - 4 Yes Yes Yes Yes
    (Non-suffering Patient) - 5 No No No No
    (Non-suffering Patient) - 6 Yes Yes No No

     | Show Table
    DownLoad: CSV

    Further, to judge the performance of different machine learning models (LSTM, SVM, LR and ANN) for predicting cardiac arrest, the predefined dataset has been framed and tested for prediction accuracy. Table 3 depicts that the LSTM model outperformed other machine learning models (SVM, LR and ANN) in terms of accuracy and efficiency. The LSTM model's proficiency in handling sequential data, including heart rate over time, proves highly advantageous in predicting cardiac arrests. The use of LSTM for predicting heart attacks is promising and could have significant implications for improving patient outcomes. However, it's important to continue to evaluate and improve the model's performance to ensure its accuracy and reliability in real-world clinical settings.

    This work offers an LSTM-based model for cardiovascular illness prediction and compares it to established ML techniques such as ANN, SVM, and LR. The results depict that the LSTM model outperforms the previous models in terms of predictive ability. A significant 2.5% improvement in cardiovascular disease prediction has been achieved by precisely adjusting the LSTM model's hyperparameters. The study carefully tests the model under a wide range of operational scenarios, continuously producing extremely reliable accuracy. This demonstrates the model's utility as an early-stage cardiovascular disease screening tool. Results highlight the tremendous promise of LSTM-based models in the field of healthcare. The model's versatility is particularly impressive, as evidenced by its use of COVID-19 data. This demonstrates the potential for these approaches to successfully address emerging health concerns. In essence, the study makes a strong case for the usefulness of LSTM-based models in cardiovascular disease prediction, paving the way for early identification and intervention. More clarity and emphasis on key lessons could help this effort. Highlighting how the LSTM model outperforms traditional ML techniques and how hyperparameter adjustment leads to this gain would provide a better understanding of the model's superiority. Furthermore, the model's adaptability to the dynamic context of COVID-19 data might be explained more explicitly, since it demonstrates the model's usefulness in real-world, developing circumstances. By improving these characteristics, the conclusion would better capture the relevance of the study's findings as well as its implications for future research and healthcare applications.

    The authors declare they have not used Artificial Intelligence (AI) tools in the creation of this article.


    Acknowledgments



    The authors present their appreciation to King Saud University for funding this research through Researchers Supporting Program number (RSPD2023R704), King Saud University, Riyadh, Saudi Arabia.

    Conflict of interest



    The authors declare no conflict of interest.

    Author Contributions:



    The authors contributed equally on the completion of this manuscript.

    [1] Patel J, TejalUpadhyay D, Patel S (2015) Heart disease prediction using machine learning and data mining technique. Heart Dis 7: 129-137.
    [2] Zang J, You P (2023) An industrial IoT-enabled smart healthcare system using big data mining and machine learning. Wirel Netw 29: 909-918. https://doi.org/10.1007/s11276-022-03129-z
    [3] Ebrahimi Z, Loni M, Daneshtalab M, et al. (2020) A review on deep learning methods for ECG arrhythmia classification. Expert Syst Appl X 7: 100033. https://doi.org/10.1016/j.eswax.2020.100033
    [4] Fujiwara K, Abe E, Kamata K, et al. (2018) Heart rate variability-based driver drowsiness detection and its validation with EEG. IEEE T Biomed Eng 66: 1769-1778. https://doi.org/10.1109/TBME.2018.2879346
    [5] Pandey H, Prabha S (2020) Smart health monitoring system using IOT and machine learning techniques. 2020 sixth international conference on bio signals, images, and instrumentation (ICBSII) 2020: 1-4. https://doi.org/10.1109/ICBSII49132.2020.9167660
    [6] Ali NS, Alyasseri ZAA, Abdulmohson A (2018) Real-time heart pulse monitoring technique using wireless sensor network and mobile application. Int J Electr Comput Eng 8: 5118. https://doi.org/10.11591/ijece.v8i6.pp5118-5126
    [7] Guo D, Zhang G, Peng H, et al. (2021) Segmentation and measurements of carotid intima-media thickness in ultrasound images using the improved convolutional neural network and support vector machine. J Med Imag Health In 11: 15-24. https://doi.org/10.1166/jmihi.2021.3264
    [8] Filist S, Al-Kasasbeh RT, Shatalova O, et al. (2022) Developing neural network model for predicting cardiac and cardiovascular health using bioelectrical signal processing. Comput method Biomec Biomed Eng 25: 908-921. https://doi.org/10.1080/10255842.2021.1986486
    [9] Attia ZI, Kapa S, Lopez-Jimenez F, et al. (2019) Screening for cardiac contractile dysfunction using an artificial intelligence–enabled electrocardiogram. Nat Med 25: 70-74. https://doi.org/10.1038/s41591-018-0240-2
    [10] Rana JS, Tabada GH, Solomon MD, et al. (2016) Accuracy of the atherosclerotic cardiovascular risk equation in a large contemporary, multiethnic population. J Am Coll Cardiol 67: 2118-2130. https://doi.org/10.1016/j.jacc.2016.02.055
    [11] Stehli J, Fuchs TA, Bull S, et al. (2014) Accuracy of coronary CT angiography using a submillisievert fraction of radiation exposure: comparison with invasive coronary angiography. J Am Coll Cardiol 64: 772-780. https://doi.org/10.1016/j.jacc.2014.04.079
    [12] O'Donoghue M L, Braunwald E, White H D, et al. (2014) Effect of darapladib on major coronary events after an acute coronary syndrome: the SOLID-TIMI 52 randomized clinical trial. Jama 312: 1006-1015. https://doi.org/10.1001/jama.2014.11061
    [13] Saeb S, Lonini L, Jayaraman A, et al. (2017) The need to approximate the use-case in clinical machine learning. Gigascience 6: gix019. https://doi.org/10.1093/gigascience/gix019
    [14] Cherkassky V (1997) The nature of statistical learning theory~. IEEE T Neural Network 8: 1564-1564. https://doi.org/10.1109/TNN.1997.641482
    [15] Tang H, Gao S, Wang L, et al. (2021) A novel intelligent fault diagnosis method for rolling bearings based on wasserstein generative adversarial network and convolutional neural network under unbalanced dataset. Sensors 21: 6754. https://doi.org/10.3390/s21206754
    [16] Wang YY, Wang ST, Sima XT, et al. (2023) Expanded feature space-based gradient boosting ensemble learning for risk prediction of type 2 diabetes complications. Appl Soft Comput 144: 110451. https://doi.org/10.1016/j.asoc.2023.110451
    [17] Kee OT, Harun H, Mustafa N, et al. (2023) Cardiovascular complications in a diabetes prediction model using machine learning: a systematic review. Cardiovasc Diabetol 22: 13. https://doi.org/10.1186/s12933-023-01741-7
    [18] Wang S, Yin Y, Wang D, et al. (2021) An interpretable deep neural network for colorectal polyp diagnosis under colonoscopy. Knowl-based Syst 234: 107568. https://doi.org/10.1016/j.knosys.2021.107568
    [19] Tobler DL, Pruzansky AJ, Naderi S, et al. (2022) Long-term cardiovascular effects of COVID-19: emerging data relevant to the cardiovascular clinician. Curr Atheroscler Rep 24: 563-570. https://doi.org/10.1007/s11883-022-01032-8
    [20] Xie Y, Xu E, Bowe B, et al. (2022) Long-term cardiovascular outcomes of COVID-19. Nat Med 28: 583-590. https://doi.org/10.1038/s41591-022-01689-3
    [21] Dale CE, Takhar R, Carragher R, et al. (2023) The impact of the COVID-19 pandemic on cardiovascular disease prevention and management. Nat Med 29: 219-225. https://doi.org/10.1038/s41591-022-02158-7
    [22] Maurya JP, Manoria M, Joshi S (2022) Cardiac Arrhythmia Classification Using Cascaded Deep Learning Approach (LSTM & RNN). International Conference on Machine Learning, Image Processing, Network Security and Data Sciences. Cham: Springer Nature Switzerland 3-13. https://doi.org/10.1007/978-3-031-24352-3_1
    [23] Pandya S, Gadekallu TR, Reddy PK, et al. (2022) InfusedHeart: A novel knowledge-infused learning framework for diagnosis of cardiovascular events. IEEE Trans Comput Soc Sy 2022: 1-10. https://doi.org/10.1109/TCSS.2022.3151643
    [24] Greff K, Srivastava RK, Koutník J, et al. (2016) LSTM: a search space odyssey. IEEE T Neur Net Lear 28: 2222-2232. https://doi.org/10.1109/TNNLS.2016.2582924
    [25] Bergstra J, Bengio Y (2012) Random search for hyper-parameter optimization. J Mach Learn Res 13: 281-305.
    [26] Li L, Jamieson K, DeSalvo G, et al. (2017) Hyperband: A novel bandit-based approach to hyperparameter optimization. J Mach Learn Res 18: 6765-6816.
    [27] Rao KD, Kumar MSD, Akshitha D, et al. (2022) Machine Learning Based Cardiovascular Disease Prediction. 2022 International Conference on Computer, Power and Communications (ICCPC). India: Chennai: 118-122.
  • Reader Comments
  • © 2023 the Author(s), licensee AIMS Press. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0)
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Metrics

Article views(1606) PDF downloads(56) Cited by(0)

Figures and Tables

Figures(7)  /  Tables(3)

/

DownLoad:  Full-Size Img  PowerPoint
Return
Return

Catalog