# Adaptive Stacking Ensemble Techniques for Early Severity Classification of COVID-19 Patients
## 3 Proposed Method
### Stacking Ensemble Model Construction
### Evaluation Metrics

We utilized a standard set of evaluation metrics for classification problems, including precision, recall, F1 score, specificity, and AUC score. The precision, recall, specificity, and F1 score were derived from a confusion matrix that classified the predictions into four categories: True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN). Specifically, TP represents the number of correctly predicted positive instances, TN represents the number of correctly predicted negative instances, FP represents the number of negative instances incorrectly predicted as positive, and FN represents the number of positive instances incorrectly predicted as negative. Precision is defined as the ratio of correctly predicted positive instances to all instances predicted as positive. It provides a measure of the accuracy of positive predictions. The equation used to determine precision is defined as follows:

\[Precision=\frac{TP}{TP+FP} \tag{4}\]

Recall, also known as the True Positive Rate (TPR), quantifies the ratio of correctly predicted positive cases to all actual positives. It offers insights into the model's capacity to identify and retrieve relevant instances. The equation for recall is defined as follows:

\[Recall=\frac{TP}{TP+FN} \tag{5}\]

The F1 score, which is the harmonic mean of the precision and recall, provides a balance between these two metrics and is particularly useful in scenarios where one metric is more valuable than the other. The equation for the F1 score is defined as follows:

\[F1 Score=2\times\frac{Precision\times Recall}{Precision+Recall} \tag{6}\]

In contrast, specificity represents the proportion of actual negative cases that are correctly classified. The equation for specificity is formally defined as follows. \[Specificity=\frac{TN}{TN+FP} \tag{7}\]

The AUC score quantifies the entire two-dimensional area under the Receiver Operating Characteristic (ROC) curve, providing a comprehensive performance measure across all possible classification thresholds. The AUC score is formally defined as the integral of the ROC curve, which is the area between the ROC curve and False Positive Rate (FPR) axis. The equation is defined as follows:

\[AUC=\int_{0}^{1}TPR\Big{(}FPR^{-1}(x)\Big{)}dx\;\;where \tag{8}\] \[FPR=1-Specificity=\frac{FP}{TN+FP}\]

where \(TPR\Big{(}FPR^{-1}(x)\Big{)}\) represents the TPR as a function of the FPR. It maps the FPR to TPR to define the ROC curve. The integral spans from zero to one, effectively capturing the entire area under the ROC curve. ### Performance of the Prediction Models

To evaluate our proposed technique, we conducted comparative experiments across three clinical severity classes using five groups of clinical variables, as defined by a data-driven strategy. Specifically, we carried out three sets of experiments: (1) Type 1 severity prediction for Groups 1-5; (2) Type 2 severity prediction for Groups 1-5; (3) Type 3 severity prediction for Groups 1- 5. The performance evaluation utilized a dataset comprising 1695 patients, which was divided during the data splitting and feature selection process. Moreover, we conducted comparative analyses with 14 well-known single classifiers, including Logistic Regression and XGBoost models. These models have previously been applied in studies utilizing the KDBC dataset to predict COVID-19 severity in South Korea [23; 49; 50]. To compare our results with those of more advanced methods, we also conducted experiments with two AutoML approaches: PyCaret, and H2O.ai [51; 52]. PyCaret offers 16 classifiers, such as Linear Discriminant Analysis (LDA) and the Gradient Boosting Classifier (GBM), and streamlines the overall machine learning process by identifying optimal classifiers through efficient tuning. H2O.ai offers 18 classifiers, such as Distributed Random Forest (DRF) and the Generalized Linear Model (GLM), and enables the identification of the optimal classifiers or the automatic generation of stacking ensembles by combining models.