Abstract
Keywords
Introduction
Severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2), a novel coronavirus disease, was first detected in Wuhan, China, in December 2019.1–3 As an infectious disease caused by the third coronavirus, COVID-19 poses significant public health challenges due to its rapid spread across populations.4–6 This disease is associated with tract infections in human and animal bodies, causing fever, cough, and cold, and sometimes leading to death among infected patients, often following acute respiratory distress syndrome or pneumonia.7,8 COVID-19 has a high incidence and mortality rate and has brought about many challenges and overwhelming burdens among patients and healthcare workers in healthcare settings.9,10 This disease induced considerable morbidity and mortality in more than 200 countries and regions. 11 Despite the World Health Organization (WHO) announcing the end of the COVID-19 pandemic, it is now considered endemic, affecting a significant number of people worldwide. 12 The previous studies on this topic demonstrated that chronic diseases potentially impact the severity, poor prognosis, and mortality of COVID-19, and they are considered significant risk factors for this disease.11,13
This disease has manifold burdens among patients with chronic diseases, and the risk of COVID-19 mortality in this condition would be increased significantly.14,15 Chronic Kidney Disease (CKD), as an essential chronic condition, is highly associated with an augmented risk of severe COVID-19 infection.16,17 Hence, physicians should advise patients with CKD and closely monitor them to prevent direct exposure to this infection.18,19 One cohort study found that the incidence of COVID-19 among CKD patients was 4.09%, compared with 0.46% in the general population. Also, the crude death rate of this disease in CKD was 44.6%, compared to 4.7% in CKD patients without COVID-19, indicating the significant impact of CKD in worsening and increasing the COVID-19 prognosis and mortality rate.20,21 Generally, hospitalized COVID-19 patients with CKD, especially in stages 3 to 5 of this disease, have a significantly higher death rate than non-CKD patients, requiring a comprehensive and effective management strategy for these patients.22,23
Preventive strategies are essential to enhance clinical and therapeutic measures for CKD patients infected with COVID-19, aiming to improve prognosis and reduce mortality.24,25 Also, early detection and precise evaluation of disease severity among CKD patients infected with COVID-19 enhance clinical decision-making.26,27 Past biomedical studies have demonstrated that the machine learning (ML) approach effectively establishes predictive models in healthcare settings to achieve prevention goals for various health conditions.28–30 Although the ML approach has been used as an appropriate preventive strategy in several previous studies to predict the COVID-19 mortality risk among other populations using prognostic factors,31–35 few efforts have been made to develop prediction models for this purpose among CKD patients. Luo et al. developed ML models for COVID-19 mortality risk among CKD patients using laboratory data in one study. 26 Despite Luo’s research, the current study aimed to predict COVID-19 mortality risk among these patients using clinical comorbidity and medication data to gain new insights into preventive strategies via an ML approach.
Methods
Study design
Figure 1 shows the roadmap for this study, including all steps taken to develop prediction models for COVID-19 death risk among CKD patients. As shown in this figure, we first established a database and described the input and output features, along with the frequency of samples in each feature. Secondly, to enhance the quality of the database for analysis and model development, we employed several preprocessing techniques, including identifying duplicate records, handling invalid values, and handling missing data. Thirdly, we employed FS techniques, including both univariate and multivariate regression analysis, to reduce data dimensionality and select more suitable factors for establishing prediction models of death risk. Fourthly, we utilized selected ML algorithms to develop prediction models. To assess the validity of the established models, we employed a hold-out strategy, dividing the original dataset into training and validation sets. To mitigate bias in the performance measures arising from the data, we evaluated the ML algorithms using a 10-fold cross-validation approach. To achieve optimal algorithm performance, hyperparameters were tuned via grid search, and the best-performing settings were selected and reported for each algorithm. Fifthly, the performance of various established prediction models was compared and analyzed to identify the best model with the highest predictive performance efficiency. Sixthly, the best-performing model was obtained to predict the mortality risk of COVID-19 among CKD patients. The roadmap of this study.
Population characteristics
The current retrospective study used single-center data from 556 hospitalized patients with CKD at Shariati Hospital in Tehran City who were treated for COVID-19 over 6 months from 01 March 2020 to 30 August 2020. The data of these patients were stored in one integrated database in (.SAV) format. Among 556 hospitalized patients, 216 were associated with deceased cases, and 340 were associated with alive cases. A schema of the database, regarding the variable view and data view, in (.SAV) format, is depicted in Figures 2 and 3, respectively. As shown in these figures, the data used for analysis and the development of prediction models are structured. Definitions of all variables and data on several risk factors, ranging from dementia to antidepressant drug use, for approximately 20 samples are presented in this data view. Moreover, the data on the death status after COVID-19 infection among CKD patients are presented in a data view schema with two statuses of 0 and 1 that are associated with alive and deceased cases, respectively. The database view in the variable view screen. The database view in the data view screen.

Inclusion and exclusion criteria
In this study, we used data from patients with CKD progression stages 3b-5, focusing on kidney insufficiency, and every patient in the cohort had respiratory failure following COVID-19. These populations focused on hospitalized patients with chronic kidney disease who had been diagnosed with COVID-19 symptoms, such as respiratory failure, and who were diagnosed with COVID-19 based on diagnostic test results. On the contrary, the patients with acute kidney disease, acute respiratory failures of other diseases, concurrently having malignant tumors, and post-transplant patients were excluded from this study.
Outcome variable
The outcome variable in this study was the mortality status of CKD patients infected with COVID-19. The death occurred in 24 to 33 days following COVID-19 infections in deceased cases. In this data-driven study, we aimed to estimate the mortality risk of COVID-19 among CKD patients, using this variable as the target. In the current database, statuses were categorized as deceased and alive cases, assigned the codes 1 and 0, respectively. The assessment of COVID-19-related mortality among CKD patients was based on positive diagnostic test results. These patients were receiving medications for CKD, and this information was documented in their medical records.
Additionally, after getting a COVID-19 infection, they also received COVID-19-related medications to reduce the severity of symptoms related to this disease. All samples had respiratory failure due to COVID-19. All features extracted and recorded in the database were the results of assessing CKD patients with respiratory failure status following COVID-19, and their information regarding these features was recorded in the database.
Features
The current features leveraged in this study were demographic, comorbidity, and medication use, including age, sex, kidney disease type, coronary artery disease, congestive heart failure, peripheral vascular disease, cerebrovascular disease, hemiplegia, dementia, chronic pulmonary disease, diabetes, hypertension, connective tissue disorder, liver disease, peptic ulcer disease, systemic corticosteroid use, other immunosuppressant drugs use, beta-blocker use, antiplatelet agent, oral antidiabetic drug use, insulin use, and antidepressant drug use. They were measured and assessed in 2 to 3 days after COVID-19 confirmation, following diagnostic test results.
Database preparation
We performed some steps to investigate and prepare the current database for data analysis. First, we reviewed it regarding the duplicate data. The data belonged to a single person and were stored in multiple rows within the current database. Second, any data with abnormal values (i.e., values not defined in the database) were deleted, and we removed these patients’ data from the database. Third, we addressed missing patient data, encountering two situations in this regard. If any feature in a record had missing values exceeding 5%, we excluded that row from the current database. Otherwise, we imputed missing data. In this process, we utilized the K-means clustering algorithm to categorize similar records based on their features. In the next step, we filled in the missing data using the values of the corresponding features belonging to similar records. If the missing data were in the outcome variable, we deleted the corresponding record if we could not find the actual data.
Feature selection
One way to select more relevant features for building predictive models in ML is to leverage feature selection (FS). This approach would simplify the database by eliminating irrelevant features, thereby enhancing classification accuracy, reducing computation time and training complexity, improving generalization, and facilitating data understanding.36–38 To conduct the FS technique, we employed univariate and multivariate regression analysis with a significance level of p < 0.05.
ML development and assessment
We leveraged the selected ML algorithms to build models predicting mortality risk among CKD patients. To this end, the ensemble and non-ensemble algorithms were used in Weka 3.9. The ensemble algorithms were XG-Boost (an extension algorithm), Random Forest (RF), and Ada-Boost. In addition, Artificial Neural Networks (ANNs), Support Vector Classifier (SVC), Logistic Regression (LR), K-Nearest Neighbour (K-NN), and Decision Tree (DT) algorithms were used as base algorithms.
Algorithms’ performance and hyperparameter adjustment
The current study employed a grid search to evaluate the algorithms’ performance during training. This approach enables evaluating various combinations of each algorithm’s hyperparameters to assess its performance. Finally, the combination of hyperparameters with the highest performance would be selected as the representative performance of each algorithm. The hyperparameters considered for adjustment to obtain the best-performing model for each algorithm are presented as follows:
Ada-Boost: classifier type and number of iterations.
ANN: number of neurons, learning rate, and maximum epoch.
DT: confidence factor and minimum number of objects in leaves.
K-NN: K (number of similar cases to be considered), prediction or range target, and distance computation.
LR: binomial procedure, confidence interval, maximum iterations, and scale.
RF: maximum features, maximum tree depth, minimum samples in leaves, and minimum samples for splitting.
SVC: tolerance parameter, C (control parameter), and kernel type.
XG-Boost: max depth of tree, Gamma, Eta, minimum child weight, and number of epochs.
To comprehensively evaluate ML model performance and identify the best model for predicting mortality risk, we used a range of performance metrics, including Positive Predictive Value (PPV), Negative Predictive Value (NPV), sensitivity, specificity, accuracy, and F-Score. Selecting these criteria provides more predictive efficiency insights into their performance across positive and negative cases.
Additionally, the Area Under the Receiver Operating Characteristic (ROC) curve was used to compare the algorithms’ predictive ability for mortality risk and to assess their performance efficiency at different thresholds for positive and negative cases.
Hold-out strategy
Due to the lack of clinical data in other settings, we used a hold-out strategy to split the data and evaluate validation performance. This way, all data are randomly split into two sets: a training set and a validation set. The training set is used to build and estimate model parameters, and the validation set is used to evaluate the established ML models. Generally, 70% and 30% (or two-thirds and one-third) of the data are used in the hold-out strategy to train and validate ML models.39,40 The current study used two-thirds of the data for training and one-third for validation. Moreover, to mitigate bias regarding the data distribution in the performance reports, we employed K-fold cross-validation to report the performance of the algorithms in training mode, and the mean of performances in (K = 10) training iterations was considered.
Feature importance
Feature importance (FI), also known as feature identification, feature attribution, or model explainability, enables researchers to look beyond the black box of ML algorithms and understand how they operate during training and the importance of each feature for prediction. FI provides an output metric or score, allowing us to rank features from most to least significant for the output class. They are often obtained by systematically varying features to identify which produce the most significant change in predictive strength, thereby generating an essential score for each feature that enables ranking.41,42 In this study, we used Permutation Feature Importance (PFI) to rank the critical predictors of COVID-19 mortality risk among CKD patients. PFI is a model inspection method that ranks the contribution of individual features to the statistical functionality of a fitted model on a specified tabular dataset. PFI measures the importance of individual features to a model’s forecasting ability by computing the change in model error when the values of the features are shuffled (or permuted).
Statistical analysis
In this study, we used univariate analysis (Chi-square test) and multivariate regression to investigate differences between deceased and alive cases and to determine the importance of each feature in selecting the best features for ML-based mortality prediction. p < 0.05 was considered a meaningful statistical level in this respect. The statistical analysis was conducted using IBM SPSS Statistics version 25.
Results
Database preparation
The characteristics of the sample used among deceased and living CKD patients.
The bolds indicate the significant level at P<0.05.
According to Table 1, the features, including age, kidney disease type, coronary artery disease, congestive heart failure, peripheral vascular disease, cerebrovascular disease, chronic pulmonary disease, diabetes, hypertension, connective tissue disorder, liver disease, systemic corticosteroid, other immunosuppressant drugs use, beta-blocker use, antiplatelet agent, oral antidiabetic drug use, and insulin use obtained significant difference between dead and alive cases statistically (p < 0.05). On the contrary, the sex, hemiplegia, dementia, peptic ulcer disease, and antidepressant drug use did not differ between them.
Multivariate analysis
The multivariate analysis of CKD patients.
aRegression coefficient.
bOdd Ration.
cConfidence Interval.
The bolds indicate the significant level at P<0.05.
As shown in Table 2, 15 risk factors, including age (β = 0.113, OR = 1.285, 95% CI of OR = [1.131–1.426]), kidney disease type (β = 0.05, OR = 1.09, 95% CI of OR = [1.04–1.16]), coronary artery disease (β = 0.348, OR = 1.524, 95% CI of OR = [1.415–1.672]), congestive heart failure (β = 0.226, OR = 1.421, 95% CI of OR = [1.313–1.572]), peripheral vascular disease (β = 0.128, OR = 1.219, 95% CI of OR = [1.198–1.315]), cerebrovascular disease (β = 0.071, OR = 1.13, 95% CI of OR = [1.05–1.2]), chronic pulmonary disease (β = 0.461, OR = 1.664, 95% CI of OR = [1.476–1.763]), diabetes (β = 0.725, OR = 2.203, 95% CI of OR = [1.979–2.501]), hypertension (β = 0.917, OR = 2.578, 95% CI of OR = [2.152–2.816]), systemic corticosteroid (β = 0.143, OR = 1.275, 95% CI of OR = [1.269–1.419]), other immunosuppressant drugs use (β = 0.198, OR = 1.356, 95% CI of OR = [1.307–1.503]), beta-blocker use (β = 0.251, OR = 1.485, 95% CI of OR = [1.359–1.723]), antiplatelet agent (β = 0.133, OR = 1.234, 95% CI of OR = [1.208–1.301]), oral antidiabetic drug use (β = 0.386, OR = 1.515, 95% CI of OR = [1.452–1.613]), and insulin use (β = 0.354, OR = 1.493, 95% CI of OR = [1.433–1.579]) were considered the critical factors to predict COVID-19 mortality among CKD patients (p < 0.05). In contrast, the risk factors of sex, hemiplegia, dementia, connective tissue disorder, liver disease, peptic ulcer disease, and antidepressant drug use were excluded from the current study (p > 0.05).
Model construction and assessment
The performance evaluation of ML models.
The range of hyperparameters using Grid search to tune ML algorithms.
As Table 3 shows, the XG-Boost model, with a PPV of 90.78%, NPV of 95.64%, sensitivity of 93.36%, specificity of 93.88%, accuracy of 93.68%, and F-score of 92.06%, achieved superior performance compared to other models. RF, with a PPV of 76.86%, NPV of 91.55%, sensitivity of 88.15%, specificity of 82.87%, accuracy of 84.94%, and F-score of 82.12%, obtained satisfactory performance after XG-Boost. On the contrary, the ANN and K-NN models, which had more performance criteria, exhibited the lowest predictive performance, ranging from nearly 50% to 70%. By comparing the models’ performance metrics, SVC, Ada-Boost, LR, and DT ranked third to sixth, respectively, in terms of predictive efficiency for mortality risk.
The ROC curves for the ML models in training and validation modes are shown in Figures 4 and 5, respectively. The ML models’ performance in training mode. The ML models’ performance in validation mode.

In training mode (Figure 4), XG-Boost with an AU-ROC of 0.921 and a 95% CI of [0.906–0.941] outperformed other models. RF and SVC with AU-ROC of 0.843 and 95% CI = [0.82–0.876] and AU-ROC of 0.813 and 95% CI = [0.806–0.831] obtained satisfactory performance to predict mortality. The Ada-Boost, LR, DT, and K-NN with AU-ROC of [0.6–0.8] were considered the fourth to seventh models in terms of performance. The lowest performance was observed for the ANN, with an AU-ROC of 0.567 and a 95% CI of [0.533–0.589]. According to Figure 5, in validation mode, the XG-Boost model, with an AU-ROC of 0.851 and a 95% CI of [0.835–0.877], demonstrated a notable predictive ability compared to other ML models. The Ada-Boost, SVC, and RF models, with AU-ROC ranging from 0.7 to 0.8, achieved nearly favourable predictive performance for mortality risk. Other models, including DT, LR, K-NN, and ANN, had AU-ROC scores below 0.7. The K-NN model, with an AU-ROC of 0.525 and a 95% CI of [0.507, 0.531], demonstrated lower predictive ability in this respect. Generally, comparing the ML models using various performance criteria in the current study demonstrated that XG-Boost has higher performance efficiency in predicting COVID-19 mortality risk among CKD patients.
Feature importance assessment
We considered XG-Boost, the best-performing model, to identify the most predictive features for COVID-19 mortality among CKD patients and enhance the model’s interpretability. The PFI of XG-Boost for eight more efficient risk factors is depicted in Figure 5. Based on the PFI depicted in Figure 6, the risk factors, including hypertension, diabetes, chronic obstructive pulmonary disease, chronic atherosclerotic disease, age, insulin use, beta-blocker use, and congestive heart failure, were identified as significant predictors of COVID-19 mortality among CKD patients. The PFI of the XG-Boost model.
Discussion
This study aims to construct an efficient ML model to assess and predict the COVID-19 mortality risk of CKD patients. We used eight ML models, including Ada-Boost, ANN, DT, LR, K-NN, RF, SVC, and XG-Boost. Also, we trained ML algorithms on clinical and medication data to build the models. Concisely, based on the current study’s results, the XG-Boost with a PPV of 90.78%, NPV of 95.64%, sensitivity of 93.36%, specificity of 93.88%, accuracy of 93.68%, F-score of 92.06%, and AU-ROC of 0.921 and 0.851 was recognized as the best model for predicting mortality, according to XG-Boost, hypertension, diabetes, chronic pulmonary disease, chronic artery disease, age, insulin use, beta-blocker use, and congestive heart failure seemed to have better predictive ability than others regarding COVID-19 mortality among CKD patients.
Despite numerous studies on leveraging ML models to build predictive models of COVID-19 mortality risk, one effort by Luo focused on this topic among CKD patients. Their research developed a predictive model of COVID-19 mortality risk among patients with CKD using laboratory parameters. LightGBM, as an ensemble model with an AU-ROC of 0.833, demonstrated superior performance efficiency compared to others in mortality prediction. 26 In the current study, the XG-Boost AU-ROC values of 0.921 and 0.851 provided more predictive insight than those in Luo’s study, indicating the substantial role of clinical data in predicting the mortality risk of COVID-19 among these patients. Ponce et al. developed ML models to predict the mortality risk of patients with acute kidney injury (AKI) using demographic, comorbidity, laboratory, and AKI characteristics. Their study revealed that the Elastic Net model, with an AUC-ROC of 0.823 (95% CI 0.761–0.885) in the validation mode, is the best-performing model for prediction purposes. 43 In the current study, XG-Boost achieved an AU-ROC of 0.851 and a 95% CI of [0.835–0.877] in validation mode, performing satisfactorily, similar to Ponc’s study. Additionally, age and hypertension were among the most significant features in that study and are considered critical in the current research.
As stated, numerous studies have explored this topic in general populations, and we have summarized some of them here. An et al. used ML models to predict mortality risk among COVID-19 patients. The SVM with an AU-ROC of 0.963 [0.946, 0.979] and 0.962 [0.945, 0.979] using Lasso and a linear kernel was the best model for mortality prediction. 44 Additionally, age was identified as a significant predictor of mortality, consistent with the current study’s findings. Banoe et al. reported that the inspired modification of a partial least squares (SIMPLS) model with AU-ROC >0.85 has favourable predictive ability. 45 Pourhomayoun et al. used ML techniques to predict mortality risk in patients with COVID-19, achieving an accuracy of 89.98% for predictive purposes. 31 Shanbehzadeh et al. applied various ANN architectures to predict mortality among COVID-19 patients, yielding an AUC-ROC of 0.888 as their performance metric. 46 Generally, the present study demonstrated satisfactory predictive performance, similar to previous studies on this topic among general populations.
This study demonstrated hypertension, diabetes, CPD, CAD, and age as the five top-ranking risk factors influencing the mortality prediction among CKA patients. According to our study, diabetes and hypertension are recognized as significant risk factors in the general population. The results of Albitar et al.’s study have revealed that advanced age, hypertension, and diabetes are three critical risk factors of COVID-19 death among the general population. 47 Wu et al. in their meta-analysis indicated that diabetes increases the risk of mortality among COVID-19 patients. 48 Another systematic review and meta-analysis by Corona et al. has shown that diabetes is the most important factor increasing the risk of COVID-19 mortality. 49 Comparing the findings of the current research on CKD populations with those of previous studies on general populations provides insight into the role of diabetes in COVID-19 mortality risk. Although diabetes is the most important risk factor among the general population, the current findings demonstrated that hypertension is the top-ranking risk factor for the mortality risk of COVID-19 among CKD patients who are infected with COVID-19. So, hypertension can play a more essential role in clinical decision-making regarding COVID-19 mortality and the assessment of clinical progression in CKD patients. Moreover, age is considered the most significant risk factor in studies examining COVID-19 mortality risk in the general population. 50 Like diabetes, current research has identified age as a crucial risk factor for COVID-19 mortality among CKD patients, contradicting previous findings in general populations, which generally state that age is the most critical risk factor in this context. CPD and CAD are two significant comorbidities in predicting death risk in CKD patients, which is consistent with other studies working on COVID-19 risk prediction among general populations. 51 Typically, comparing the importance of these factors between CKD in the current research and general populations in the previous studies shows that although, some risk factors are common regarding the importance in predicting COVID-19 mortality risk, the ranking of importance is different between CKD and general populations, and identifying more critical risk factors in this situation can be essential the clinical decision making by healthcare providers in clinical environments, depending on the type of populations are investigated.
Limitations and future implications
During this research, we encountered several limitations and constraints, which we addressed. First, we used a single-center database, which may impact the models’ generalizability. Therefore, using multi-center databases or large registries helps resolve this issue as much as possible. Some risk factors, such as laboratory parameters used in previous studies, are missing from the current database, potentially affecting the models’ performance. We recommend conducting a prospective study to consider these critical factors to achieve more accurate predictive insights.
Additionally, some data were lost and embedded using statistical techniques, which can influence the models’ generalizability. A prospective study eliminates this limitation. Another limitation of the current study was the failure to leverage the ML model’s external validity to assess its generalizability. For future research, we recommend employing this approach to evaluate the predictive capabilities of ML models in other clinical settings.
Conclusion
In this study, XG-Boost achieved AU-ROC scores of 0.921 and 0.851 in the training and validation sets, respectively. We concluded that the ML models could provide us with favourable predictive insights into the mortality risk of COVID-19 among CKD patients. Also, features of hypertension, diabetes, chronic pulmonary disease, chronic artery disease, age, insulin use, beta-blocker use, and congestive heart failure were known as the best predictors in this regard. According to the results, XG-Boost, an efficient model, can serve as a robust knowledge base for prediction systems. Physicians can use these systems to evaluate patients based on these risk factors, thereby enhancing diagnostic and therapeutic protocols by promoting individual decision-making.
Footnotes
Acknowledgments
We thank all the people who assisted us in all steps of this study.
Ethical considerations
This study was approved by the ethics committee of Tehran University of Medical Sciences (Reg No: 96-11-582002) on 03 Apr 2024. All methods were carried out in accordance with relevant guidelines and regulations.
Consent to participate
Due to the retrospective nature of this study, informed consent was waived for this research.
Author contributions
R.N. conducted the writing, review, and editing of this manuscript.
Funding
The author received no financial support for the research, authorship, and/or publication of this article.
Declaration of conflicting interests
The author declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Data Availability Statement
The dataset generated and analyzed during the current study is not publicly available due to privacy concerns. However, de-identified data used in this study can be made available from the corresponding author upon reasonable request, subject to approval from the institutional review board and in compliance with data protection regulations.
