Evaluating machine learning algorithms for human immunodeficiency virus classification under severe class imbalance requires looking beyond overall accuracy to minority-class detection and probability calibration, according to a study analyzing testing records from Ethiopia. Researchers investigating demographic health data found that standard metrics like raw accuracy masked severe diagnostic failures, while common balancing techniques and post-hoc calibration methods produced markedly divergent effects across different classifier architectures.
Human immunodeficiency virus remains an important public-health challenge across sub-Saharan Africa, including Ethiopia, where statistical risk stratification tools could potentially support diagnostic strategies. To examine how severe imbalance between infected and uninfected cases influences predictive modeling, the investigators evaluated data from the 2016 Ethiopian Demographic and Health Survey HIV testing program. After partitioning the survey records into a seventy percent training cohort and a thirty percent independent testing cohort, the researchers applied feature-selection techniques to isolate eight important predictors for subsequent model development.
The research team benchmarked multiple classification architectures, including Random Forest, Classification and Regression Tree, k-Nearest Neighbours, Support Vector Machine, Logistic Regression, and Naïve Bayes. To address the severe scarcity of positive infection cases, the investigators implemented the Synthetic Minority Over-sampling Technique, designated as SMOTE. Crucially, the over-sampling procedure was applied exclusively within the training partition, ensuring that model evaluation on the independent test set reflected the natural, unmanipulated disease distribution encountered in real-world population screening.
To capture model behavior across both majority and minority classes, the analysis employed multiple evaluation criteria: accuracy, sensitivity, specificity, balanced accuracy, Receiver Operating Characteristic area under the curve, and the Matthews correlation coefficient. The experimental results demonstrated that overall classification accuracy provided an inadequate assessment of model performance under extreme class imbalance. For instance, the k-Nearest Neighbours model achieved an overall accuracy of 0.94 yet yielded a sensitivity of only 0.05, a balanced accuracy of 0.50, and a Matthews correlation coefficient of 0.002, failing almost completely to detect positive cases.
In contrast to nearest-neighbor classification, other algorithms demonstrated stronger utility for identifying positive HIV status within the testing set. Naïve Bayes displayed the highest sensitivity at 0.77 and achieved the highest area under the Receiver Operating Characteristic curve at 0.72. Meanwhile, Logistic Regression demonstrated a comparatively balanced performance across both classes, achieving a sensitivity of 0.69 alongside a specificity of 0.68. These findings highlighted that different algorithmic frameworks navigate severe imbalance with varying degrees of sensitivity toward the minority population.
The evaluation also revealed that synthetic balancing did not consistently improve generalization to the naturally distributed test set and actually harmed the performance of tree-based models. When SMOTE was applied in training, Random Forest sensitivity fell substantially from 0.46 to 0.23, while its area under the Receiver Operating Characteristic curve dropped from 0.71 to 0.63. Similarly, Classification and Regression Tree sensitivity decreased from 0.58 down to 0.23, accompanied by a drop in area under the curve from 0.69 to 0.59. The findings indicate that synthetic over-sampling can distort decision boundaries for decision trees evaluated on naturally distributed data.
In addition to discrimination metrics, the researchers analyzed probability calibration using calibration slope, calibration intercept, Brier score, log loss, and reliability diagrams. Before recalibration, substantial miscalibration was evident across models, with calibration slopes ranging from 0.020 to 0.828 and calibration intercepts ranging from -4.130 to -3.016. The team applied Platt scaling for post-hoc recalibration, which markedly improved probability alignment, producing calibration slopes of 0.810 to 1.147 and intercepts of -0.769 to 0.549. Calibrated log loss values subsequently ranged between 0.074 and 0.080, with Naïve Bayes achieving the lowest calibrated log loss at 0.074.
The authors concluded that evaluating machine learning models under severe HIV class imbalance must extend beyond accuracy and area under the curve to incorporate minority-class performance and probability calibration. Although Platt scaling effectively improved the reliability of predicted probabilities, synthetic over-sampling techniques like SMOTE can compromise tree-based classifier performance on unskewed test data. Furthermore, the researchers emphasized that external and temporal validation remain necessary before any of these algorithmic approaches can be translated into practical clinical or public health applications.
Subject of Research: Machine learning classification and probability calibration under severe HIV class imbalance
Article Title: Machine learning models for HIV status classification under class imbalance using discrimination and probability calibration
Article References: Yilema, S. A., Rad, N. N., Debusho, L. K., & Chen, D.-G. (2026). Machine learning models for HIV status classification under class imbalance using discrimination and probability calibration. Discover Social Science and Health. https://doi.org/10.1007/s44155-026-00507-2
Image Credits: AI Generated
DOI: 10.1007/s44155-026-00507-2
Keywords: HIV status classification, class imbalance, probability calibration, Platt scaling, SMOTE, Random Forest, Classification and Regression Tree, k-Nearest Neighbours, Support Vector Machine, Logistic Regression, Naïve Bayes, Ethiopian Demographic and Health Survey, Brier score, log loss, Matthews correlation coefficient, balanced accuracy, reliability diagrams
News Source: Teresa Odom. (November 23, 2026). Platt Scaling Substantially Improves Machine Learning Probability Calibration for HIV Classification. Scienmag.



