# Adaptive Stacking Ensemble Techniques for Early Severity Classification of COVID-19 Patients
## 3 Proposed Method
### Stacking Ensemble Model Construction
The prediction results for the _CSS_ of the original eight classes were generally poorer than those of the proposed model. This difference was primarily due to data imbalances, which were particularly noticeable in classes with a limited number of data (i.e., number of supports) in the test dataset. As a result, in some classes, such as _'Oxygen supply with facial mask required'_, _'Non-invasive mechanical ventilation'_, _'Invasive mechanical ventilation'_, and _'Multi-organ failure or ECMO'_, the Precision, Recall, and F1 scores were very low or close to zero. This indicates that the performance and reliability may be significantly reduced, especially in classes with insufficient data samples. The proposed model applies a data-driven strategy, reconfiguring the original eight classes into Types 1, 2, and 3. This adjustment alleviated the prevailing data imbalance and facilitated a relatively consistent performance across the different classes. In addition, the use of an oversampling strategy effectively mitigated the shortcomings of the training data, thereby improving the overall performance of the model. Healthcare data have unique characteristics that can lead to concerns regarding performance degradation or the distortion of data attributes during oversampling. Therefore, we evaluated the performances of Logistic Regression, XGBoost, PyCaret, H2O.ai, and our proposed model by using Group 5 clinical variables across clinical severity types 1, 2, and 3. Evaluations were conducted both before and after applying oversampling using the SMOTE and ADASYN techniques. We utilized external libraries such as _'imbalanced-learn'_ in Python to perform the oversampling and then processed the data under the same conditions. For each model included in the performance evaluation, a total of 20 experiments were conducted, and the average performance results were recorded. Table 13 and Figure 11 present the performance results of the proposed models, demonstrating the effectiveness of the oversampling strategy. \begin{table}
\begin{tabular}{c c c c c c c c} \hline
**Type** & **Class Name** & **Precision** & **Recall** & **F1 Score** & **Specificity** & **AUC** & **Support** \\ \hline \multirow{6}{*}{
\begin{tabular}{c} Proposed Model \\ (Type 1, Group 5) \\ \end{tabular} } & No limitation of activity & 0.8725 & 0.9855 & 0.9256 & 0.7570 & 0.9025 & 1337 (78.8\%) \\ \cline{2-8}  & Limited activity but no oxygen supply required & 0.3456 & 0.4981 & 0.4081 & 0.8385 & 0.6715 & 101 (6\%) \\ \cline{2-8}  & Oxygen supply with nasal prong required & 0.4480 & 0.3444 & 0.3894 & 0.9088 & 0.8147 & 143 (8.4\%) \\ \cline{2-8}  & Oxygen supply with facial mask required & 0.0022 & 0.0011 & 0.0015 & 0.9894 & 0.8793 & 13 (0.8\%) \\ \cline{2-8}  & Non-invasive mechanical ventilation & 0.0069 & 0.0067 & 0.0068 & 0.9802 & 0.7369 & 11 (0.6\%) \\ \cline{2-8}  & Invasive mechanical ventilation & 0.0000 & 0.0000 & 0.0000 & 0.9973 & 0.9298 & 13 (0.8\%) \\ \cline{2-8}  & Multi-organ failure or ECMO & 0.0000 & 0.0000 & 0.0000 & 0.9991 & 0.7367 & 4 (0.2\%) \\ \cline{2-8}  & Death & 0.7984 & 0.7967 & 0.7975 & 0.9574 & 0.9713 & 74 (4.4\%) \\ \cline{2-8}  & Average/total Support & **0.2717** & **0.3291** & **0.3161** & **0.9285** & **0.8303** & 1696 (100\%) \\ \hline \end{tabular}
\end{table} 
Table 11: Performance results of the original eight classes using the LGBM model.