## 4 Experiments
### Results
The stacking model demonstrates significant efficacy by integrating the attributes of several models, namely MLP and XGBoost, to overcome limitations that individual models cannot solve, especially in imbalanced categorization scenarios. Notwithstanding the deficiencies of the component models, including inadequate memory for the minority class and excessive focus on the majority class, the stacked model effectively capitalizes on the diverse predictions from both models to enhance overall performance. The stacking technique integrates various models, enhancing accuracy and recall by mitigating the biases and deficiencies of individual classifiers, yielding a balanced and robust output. This ultimately produces a model that surpasses other models on all metrics and demonstrates far more accuracy when integrated with a comprehensive solution than any individual model. This illustrates how the stacking method might enhance models' generalization ability amid complex data distributions. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Class** & **Precision** & **Recall** & **F1 Score** & **Support** \\ \hline MLP & 0 & 0.92 & 1.00 & 0.96 & 22 \\  & 1 & 0.00 & 0.00 & 0.00 & 2 \\  & Accuracy & 0.92 & & & 24 \\  & Macro Avg & 0.46 & 0.50 & 0.48 & 24 \\  & Weighted Avg & 0.84 & 0.92 & 0.88 & 24 \\ \hline XGBoost & 0 & 0.96 & 1.00 & 0.98 & 22 \\  & 1 & 1.00 & 0.50 & 0.67 & 2 \\  & Accuracy & 0.96 & & & 24 \\  & Macro Avg & 0.98 & 0.75 & 0.82 & 24 \\  & Weighted Avg & 0.96 & 0.96 & 0.95 & 24 \\ \hline Stacked Model & 0 & 1.00 & 1.00 & 1.00 & 22 \\  & 1 & 1.00 & 1.00 & 1.00 & 2 \\  & Accuracy & 1.00 & & & 24 \\  & Macro Avg & 1.00 & 1.00 & 1.00 & 24 \\  & Weighted Avg & 1.00 & 1.00 & 1.00 & 24 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Model performance comparison. Support: number of samples in each class. Figure 12: Confusion matrices for MLP, XGBoost, and stacked model in predicting liquefaction. Figure 13 shows the MLP, XGBoost, and stacked models with their AUC values for performance evaluation. It is evident that the highest AUC is for the stacked model, proving that it achieves better classification performance by combining the powers of its base models effectively. The performance of XGBoost is not too bad but close enough, whereas MLP falls behind, which means there is still room for improvement. These results point toward the advantages of ensemble methods such as stacking in enhancing predictive power over individual models. Figure 14 shows the PR curves of three models--MLP, XGBoost, and the stacked model--with AUC values to assess their performance on imbalanced data. The stacked model has the highest PR AUC, implying a better precision-recall trade-off, followed by XGBoost and MLP. Thus, the stacked model maintains high accuracy while maintaining high recall, making it the most effective for highly imbalanced data. Figure 15 compares the results of the stacking model to MLP and XGBoost classifiers on four essential metrics: accuracy, ROC AUC, log loss, and F1 score. The stacked model outperformed the MLP and XGBoost predictors on most criteria, including accuracy, ROC AUC, and F1 score. However, it has a substantially smaller log loss than MLP but somewhat  
Figure 14: Precision–recall curve comparison: MLP, XGBoost, and stacked models. Figure 13: ROC curve comparison: MLP, XGBoost, and stacked model. more than XGBoost. As a result, the stacked model performed better in general prediction and confidence, as it relied on its base models for higher accuracy and resilience when compared to class-balanced performance for the single MLP and XGBoost models. Figure 16 shows the neuron counts vs. accuracy and loss of the stacked model over training epochs. The model with 64 neurons demonstrated the highest accuracy and least loss. This indicates that 64 neurons are at a better balancing point between the complexity and generalization of the model, such that the stacking model can catch underlying patterns more effectively while reducing overfitting.