An effective methodology for diabetes prediction in the case of class imbalance
Dr Vincent Hooper highlights how a machine learning methodology can improve diabetes prediction in clinical datasets affected by class imbalance
This article draws on peer-reviewed research conducted at SP Jain School of Global Management and published in Bioengineering (2025, 12, 35). The study develops a novel machine learning methodology for diabetes prediction that outperforms existing algorithms when clinical data suffer from class imbalance.
The clinical stakes of getting prediction right
Diabetes remains one of the most consequential public health challenges worldwide. According to the International Diabetes Federation’s Diabetes Atlas (11th edition, 2025), an estimated 589 million adults aged 20–79 are living with diabetes, and that figure is projected to reach 853 million by 2050.
Early detection is critical: when clinicians can identify at-risk individuals before the disease takes hold, lifestyle interventions and targeted treatment can slow or even reverse its progression. Machine learning offers a powerful tool for this purpose, sifting through biological and social indicators to flag patients who might otherwise be missed.
Yet a persistent technical obstacle undermines many predictive models. Real-world clinical datasets are frequently imbalanced: healthy patients vastly outnumber diabetic ones. In the widely used PIMA Indians Diabetes Dataset, for example, roughly two thirds of observations are non-diabetic. A classifier trained on such data can achieve deceptively high overall accuracy simply by predicting the majority class, while failing to identify the very patients who most need attention. The consequences in a clinical setting are serious: missed diagnoses, delayed treatment, and poorer health outcomes for the most vulnerable.
A simpler path to better predictions
Our research, conducted at SP Jain School of Global Management in collaboration with Sofia University, set out to address this class imbalance problem without resorting to computationally expensive deep learning architectures or elaborate feature selection procedures. The methodology we propose introduces two straightforward preprocessing steps—resampling and random shuffling—before applying a standard support vector machine classifier with balanced class weights and k-fold cross validation.
Resampling supplements the minority class so that both classes are represented more evenly in the training data. Random shuffling then rearranges the order of observations, preventing the model from learning spurious patterns tied to the sequence of the data rather than the genuine relationships among variables. These steps are combined with Python’s built-in balanced class weighting and tested under both standard k-fold and stratified k-fold cross validation. The entire pipeline is simple to implement, fast to execute, and requires no specialist hardware.
Results that rival deep learning
The results are striking. Our proposed methodology achieved a classification accuracy of 95.5 per cent on the PIMA dataset, with 100 per cent specificity and over 91 per cent sensitivity. By comparison, the classical approach—shuffling and balanced class weights alone, without resampling—yielded accuracies between 83 and 85 per cent and notably lower sensitivity scores. The proposed methodology also outperformed published results from several other research groups using Random Forest, Naive Bayes, Adaboost, and SHAP-based ensemble methods on the same dataset.
Perhaps most remarkably, our simple machine learning pipeline came within roughly 2.5 percentage points of the best reported deep neural network accuracies, while achieving a perfect specificity of 100 per cent—a result none of the deep learning benchmarks matched. This means our model correctly identified every non-diabetic patient in the test set, producing zero false positives. In clinical terms, that translates to fewer unnecessary follow-up procedures and reduced patient anxiety, while still detecting over 91 per cent of diabetic cases.
Why it matters for healthcare
The practical implications extend well beyond a single dataset. The methodology avoids feature selection, which eliminates an entire source of researcher bias and saves considerable analytical time. It is agnostic to the type of cross validation, performing comparably under both k-fold and stratified k-fold approaches, which suggests robustness across datasets of different sizes and structures. And because it relies on standard Python libraries rather than bespoke deep learning frameworks, it can be deployed in resource-constrained clinical environments where computational infrastructure is limited.
For public health professionals and policymakers, this work offers an accessible, evidence-based tool for diabetes prescreening. By improving the identification of at-risk individuals, clinicians can allocate preventive resources more effectively, tailor interventions to individual risk profiles, and ultimately reduce the burden of a disease that exacts an enormous toll on patients, families, and health systems.
Looking ahead
Future work at SP Jain School of Global Management will extend this methodology to larger diabetes datasets, multiclass classification problems, and datasets with high-dimensional feature spaces. We also plan to incorporate additional evaluation metrics such as the Matthews Correlation Coefficient and nested stratified cross validation to further strengthen model reliability. As artificial intelligence becomes increasingly embedded in healthcare decision-making, ensuring that predictive models are not only accurate but also simple, interpretable, and ethically sound is an imperative that this research directly serves.
This research was conducted at SP Jain School of Global Management, Dubai.
Reference: Toleva, B.; Atanasov, I.; Ivanov, I.; Hooper, V. An Effective Methodology for Diabetes Prediction in the Case of Class Imbalance. Bioengineering 2025, 12, 35.
https://doi.org/10.3390/bioengineering12010035
https://idf.org/news-and-resources/news/idf-diabetes-atlas-11th-edition/