# Adaptive Stacking Ensemble Techniques for Early Severity Classification of COVID-19 Patients
## 3 Proposed Method
### Stacking Ensemble Model Construction  
In this phase, we propose an adaptive stacking ensemble technique that automatically combines multiple single classifiers. Ensemble techniques generate multiple weak classifiers from a given training dataset, and then combine them to form a single strong classifier. This approach can reduce the errors owing to bias and variance that can occur when using a single model. As a result, ensemble techniques provide a better predictive performance than that achieved using individual models. Ensemble techniques are broadly classified into bagging, boosting, and stacking techniques, as illustrated in Figure 5.  
Figure 5: Ensemble techniques for bagging, boosting, and stacking. \begin{table}
\begin{tabular}{c c c c} \hline \multicolumn{2}{c}{**Severity Class**} & \multicolumn{2}{c}{**Before Oversampling**} & \multicolumn{2}{c}{**After Oversampling**} \\  & & _(_**_u_ = 3956_) & _(_**_u_ = 5885_) \\ \hline \multirow{2}{*}{Type 1} & Low-Severity & 3723 (94.12\%) & 3723 (66.66\%) \\  & High-Severity & 233 (5.88\%) & 1862 (33.34\%) \\ \hline \multirow{2}{*}{Type 2} & Mild & 3358 (84.89\%) & 3358 (60.13\%) \\  & Severe & 420 (10.61\%) & 1500 (25.87\%) \\  & Critical & 178 (4.50\%) & 782 (14.00\%) \\ \hline \multirow{4}{*}{Type 3} & Asymptomatic & 3123 (78.95\%) & 3123 (55.92\%) \\  & Mild & 235 (5.94\%) & 635 (11.37\%) \\ \cline{1-1}  & Moderate & 365 (9.23\%) & 765 (13.70\%) \\ \cline{1-1}  & Severe & 64 (1.61\%) & 493 (8.83\%) \\ \cline{1-1}  & Fatal & 169 (4.27\%) & 569 (10.19\%) \\ \hline \end{tabular}
\end{table} 
Table 3: Oversampling ratio of Clinical Severity Score (CSS). During bagging, the training data are randomly resampled to form multiple subsets of the same size. Weak classifiers trained on these subsets are combined using a voting mechanism for the final prediction. Bagging reduces the variance to improve the model performance but cannot effectively address model bias. Additionally, each model has the same weight in the final vote, which can limit the flexibility in certain applications. In contrast, the boosting technique considers the multiple generated models to be unequal and reflects the weights assigned to each model in the final prediction vote. Initially, the models were trained using all available training data. Subsequently, the predictive performance was evaluated to adjust the weights of the training samples. The well-classified data points receive lower weights, whereas the poorly classified data points receive higher weights. The models are then trained sequentially on the weighted data samples. The final prediction is made using a weighted vote that includes models with varying confidence levels. Boosting improves the model performance by adjusting the bias; however, it has drawbacks, such as a slower learning speed and vulnerability to overfitting, especially in the presence of noisy data. The stacking technique generates a meta-classifier by learning from the predictions of two or more base classifiers. This technique typically performs better than a single model because it can leverage the individual strengths and weaknesses of each base classifier. However, stacking is computationally intensive and can lead to overfitting if not carefully tuned. Despite these difficulties, stacking can provide a superior predictive performance when correctly executed. This approach is particularly useful in handling the outliers that can negatively affect a single model. In this paper, we employed a multilayer stacking ensemble approach that integrates different base classifiers over multiple layers under the assumption that the learning outcomes of the individual models are independent. Figure 6 shows the model construction process for the proposed adaptive stacking ensemble technique. Initially, the module for _'selecting candidate base classifiers'_ identifies the classifiers that should be included in the stacking ensemble. At this stage, \(m\) single classifiers are trained.