The Harms of Class Imbalance Corrections for Machine Learning Based Prediction Models: A Simulation Study

Publication date

2025-02-10

Authors

Carriero, Alex
Luijken, KimORCID 0000-0001-5192-8368
de Hond, Anne A.H.ORCID 0000-0002-3473-3398
Moons, CarlISNI 0000000390720943
van Calster, Ben
van Smeden, MaartenORCID 0000-0002-5529-1541

Editors

Advisors

Supervisors

Document Type

Article

Collections

Open Access logo

License

cc_by_nc_nd

Abstract

Introduction: Risk prediction models are increasingly used in healthcare to aid in clinical decision-making. In most clinical contexts, model calibration (i.e., assessing the reliability of risk estimates) is critical. Data available for model development are often not perfectly balanced with the modeled outcome (i.e., individuals with vs. without the event of interest are not equally prevalent in the data). It is common for researchers to correct for class imbalance, yet, the effect of such imbalance corrections on the calibration of machine learning models is largely unknown. Methods: We studied the effect of imbalance corrections on model calibration for a variety of machine learning algorithms. Using extensive Monte Carlo simulations we compared the out-of-sample predictive performance of models developed with an imbalance correction to those developed without a correction for class imbalance across different data-generating scenarios (varying sample size, the number of predictors, and event fraction). Our findings were illustrated in a case study using MIMIC-III data. Results: In all simulation scenarios, prediction models developed without a correction for class imbalance consistently had equal or better calibration performance than prediction models developed with a correction for class imbalance. The miscalibration introduced by correcting for class imbalance was characterized by an over-estimation of risk and was not always able to be corrected with re-calibration. Conclusion: Correcting for class imbalance is not always necessary and may even be harmful to clinical prediction models which aim to produce reliable risk estimates on an individual basis.

Keywords

calibration, class imbalance, machine learning, prediction modeling, Epidemiology, Statistics and Probability

Citation

Carriero, A, Luijken, K, de Hond, A, Moons, K G M, van Calster, B & van Smeden, M 2025, 'The Harms of Class Imbalance Corrections for Machine Learning Based Prediction Models : A Simulation Study', Statistics in Medicine, vol. 44, no. 3-4, e10320. https://doi.org/10.1002/sim.10320