Exploring the effect of ensemble size and technique on predictive accuracy of hepatitis B outcome
Abstract
Machine learning (ML) models for hepatitis B virus (HBV) outcome prediction must address high variance, bias, and class imbalance. Previous ensemble-learning studies have commonly combined only two models or considered a limited set of ensemble techniques. This study evaluates how ensemble size, from two to five models, affects performance across voting, bagging, boosting, and stacking approaches. Experiments evaluated ten machine learning models on the UCI Hepatitis dataset using 5-fold cross-validation, with performance assessed using accuracy, precision, recall, F1-score, and area under the receiver operating characteristic curve (AUC). Among individual models, the support vector machine (SVM) achieved the highest accuracy (84.52%) and an AUC of 0.873, while CatBoost and random forest (RF) achieved accuracies of 83.87% and 83.23%, respectively; K-nearest neighbors (KNN) and naïve Bayes (NB) produced comparatively high recall. The five-model soft-voting ensemble achieved 91.84% accuracy, 0.960 AUC, 92.16% F1-score, and 95.92% recall. These findings indicate that multi-model ensembles can improve outcome prediction and high-risk patient identification. The results also suggest that performance depends on strategic model selection rather than ensemble size alone. The proposed 2 + n framework provides a structured approach to flexible model combination across ensemble techniques. Validation using larger, independent clinical datasets is required before broader application.
