Improving Obesity Classification Performance through SMOTE and Feature Selection in Machine Learning Models
DOI:
https://doi.org/10.35746/jtim.v8i4.1033Keywords:
Obesity classification, SMOTE-NC, Seature Selection, Random Forest, Multiclass ClassificationAbstract
This study investigates the performance of machine learning models for seven-class obesity classification using Synthetic Minority Over-sampling Technique for Nominal and Continuous features (SMOTE-NC) and model-based feature selection. The UCI obesity dataset initially contained 2,111 records from Colombia, Peru, and Mexico. After removing 24 exact duplicates, 2,087 unique records were retained and divided using a stratified 80:20 training-test split. To prevent data leakage, SMOTE-NC was applied exclusively to the training folds within the cross-validation pipeline. Feature selection was performed using Random Forest-based SelectFromModel with a median importance threshold, reducing 31 encoded features to 16 selected features. Logistic Regression, Support Vector Machine, and Random Forest were evaluated using repeated stratified five-fold cross-validation with ten repetitions. The ablation analysis produced mean macro F1-scores of 93.21\% for the baseline, 93.27\% for SMOTE-NC only, 93.69\% for feature selection only, and 93.89\% for the combined SMOTE-NC and feature-selection pipeline. The combined pipeline significantly outperformed the baseline after Holm correction (adjusted $p < 0.001$), whereas SMOTE-NC alone did not produce a significant improvement (adjusted p = 0.527). After GridSearchCV optimization, Random Forest achieved 94.98\% accuracy and a macro F1-score of 94.84\% on the untouched test set. These findings demonstrate that the combined pipeline improves multiclass obesity classification, with feature selection providing the primary performance contribution and SMOTE-NC serving as a complementary class-balancing technique.
Downloads
References
D. Mohajan and H. K. Mohajan, “Body mass index (bmi) is a popular anthropometric tool to measure obesity among adults,” Journal of Innovations in Medical Research, vol. 2, no. 4, pp. 25–33, 2023. https://doi.org/10.56397/jimr/2023.04.06.
R. Dieterich, J. Chang, C. Danford, P. W. Scott, C. Wend, and J. Demirci, “The relationship between internalized weight stigma during pregnancy and breastfeeding: A prospective longitudinal study,” Obesity, vol. 29, no. 5, pp. 919–927, 2021. https://doi.org/10.1002/oby.23139.
A. Ataey, E. Jafarvand, D. Adham, and E. Moradi-Asl, “The relationship between obesity, overweight, and the human development index in world health organization eastern mediterranean region countries,” Journal of Preventive Medicine and Public Health, vol. 53, no. 2, pp. 98–105, 2020. https://doi.org/10.3961/jpmph.19.100.
OECD, Health at a Glance: Asia/Pacific 2020. Health at a Glance: Asia/Pacific, OECD, 2020. https://doi.org/10.1787/26b007cd-en.
A. Chatterjee, M. W. Gerdes, and S. G. Martinez, “Identification of risk factors associated with obesity and overweight—a machine learning overview,” Sensors (Switzerland), vol. 20, no. 9, 2020. https://doi.org/10.3390/s20092734.
F. M. Palechor and A. de la H. Manotas, “Dataset for estimation of obesity levels based on eating habits and physical condition in individuals from colombia, peru and mexico,” Data in Brief, vol. 25, 2019. https://doi.org/10.1016/j.dib.2019.104344.
H. Syahidah, N. Irsandi, A. N. Ajizah, and A. Amelia, “Obesity prediction using machine learning algorithms,” IJATIS: Indonesian Journal of Applied Technology and Innovation Science, vol. 2, no. 1, pp. 53–62, 2025. https://doi.org/10.57152/ijatis.v2i1.1869.
R. Yanez-Sepulveda et al., “Supervised machine learning algorithms for the classification of obesity levels using anthropometric indices derived from bioelectrical impedance analysis,” Scientific Reports, vol. 15, no. 1, 2025. https://doi.org/10.1038/s41598-025-15264-6.
Scikit-learn developers, “Common pitfalls and recommended practices.” scikit-learn, 2024.
Scikit-learn developers, “Pipeline.” scikit-learn, 2024.
N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, “SMOTE: Synthetic minority over-sampling technique,” Journal of Artificial Intelligence Research, vol. 16, pp. 321–357, Jun 2002. https://doi.org/10.1613/jair.953.
Scikit-learn developers, “Feature selection.” scikit-learn documentation, 2024.
T. Abigail and M. V. Overbeek, “Ensemble learning - random forest algorithm to classify obesity level,” IJNMT (International Journal of New Media Technology), vol. 11, no. 2, pp. 68–77, 2025. https://doi.org/10.31937/ijnmt.v11i2.3709.
Scikit-learn developers, “Gridsearchcv.” scikit-learn, 2024.
Scikit-learn developers, “f1 score.” scikit-learn, 2024.
D. Berrar, “Using p-values for the comparison of classifiers: pitfalls and alternatives,” Data Mining and Knowledge Discovery, vol. 36, no. 3, pp. 1102–1139, 2022. https://doi.org/10.1007/s10618-022-00828-1.
M. A. Valles-Coral et al., “Mathematical modeling and statistical evaluation of hybrid deep learning architectures for multiclass classification of cervical cells in digital papanicolaou images,” Mathematics, vol. 14, no. 7, p. 1139, 2026. https://doi.org/10.3390/math14071139.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Tsanaiya Rafa Zuhura, Vania Rapita Augesta, Septian Eko Prasetyo

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.









