Enhancing Obesity Diagnosis with Explainable AI: A Transparent and User-Friendly Approach
Abstract
Obesity is a major global health concern that increases the risk of chronic diseases such as diabetes, cardiovascular disease, and cancer while imposing substantial socioeconomic burdens. Traditional obesity diagnosis methods often suffer from limited accuracy and poor interpretability. This study proposes an interpretable machine learning framework for obesity diagnosis using the Kaggle obesity dataset, which includes features related to Body Mass Index (BMI), dietary habits, and lifestyle factors. Several machine learning algorithms, including Random Forest (RF), Gradient Boosting (GB), Support Vector Classifier (SVC), and Extreme Gradient Boosting (XGB), were evaluated, with XGB achieving the highest accuracy of 98%. To enhance transparency and trustworthiness, the Explainable Artificial Intelligence (XAI) techniques SHapley Additive exPlanations (SHAP) and Local Interpretable Model-agnostic Explanations (LIME) were employed. SHAP provided global explanations by identifying BMI, dietary behaviors, and physical activity as the most influential predictors, whereas LIME generated local explanations for individual predictions. Furthermore, an interactive user interface developed using Python Tkinter enables users to input lifestyle data, obtain obesity predictions, and understand the contribution of different features to the model’s decision. The proposed framework combines high predictive performance with interpretability, making it a practical tool for personalized obesity assessment and management.
Keywords:
Obesity, Explainable artificial intelligence, Machine learning models, User-friendly interfaceReferences
- [1] Cervantes, R. C., & Palacio, U. M. (2020). Estimation of obesity levels based on computational intelligence. Informatics in Medicine Unlocked, 21, 100472. https://doi.org/10.1016/j.imu.2020.100472
- [2] Baseri, M. F. M., & Saad, A. F. (2023). Dietry monitoring system using decision tree to control human obesity. International Journal of Artificial Intelligence, 10(1), 9–20. https://doi.org/10.36079/lamintang.ijai-01001.485
- [3] Garg, S., & Pundir, P. (2021). MOFit: A framework to reduce obesity using machine learning and IoT. 2021 44th International Convention on Information, Communication and Electronic Technology (MIPRO) (pp. 1733–1740). IEEE. https://doi.org/10.23919/MIPRO52101.2021.9596673
- [4] Putri, A. I., Husna, N. A., Cia, N. M., Arba, M. A., Aisyi, N. R., Pramesthi, C. H., & Irdayusman, A. S. (2024). Implementation of K-Nearest Neighbors, Naïve Bayes classifier, support vector machine and decision tree algorithms for obesity risk prediction. Public Research Journal of Engineering, Data Technology and Computer Science, 2(1), 26–33. https://doi.org/10.57152/predatecs.v2i1.1110
- [5] Khater, T., Tawfik, H., & Singh, B. (2024). Explainable artificial intelligence for investigating the effect of lifestyle factors on obesity. Intelligent Systems with Applications, 23, 200427. https://doi.org/10.1016/j.iswa.2024.200427
- [6] Anguita-Ruiz, A., Segura-Delgado, A., Alcalá, R., Aguilera, C. M., & Alcalá-Fdez, J. (2020). eXplainable Artificial Intelligence (XAI) for the identification of biologically relevant gene expression patterns in longitudinal human studies, insights from obesity research. PLoS Computational Biology, 16(4), e1007792. https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1007792
- [7] Aiosa, G. V., Palesi, M., Sapuppo, F., & Xibilia, M. G. (2023). Explainable AI-based clinical decision support system for obesity comorbidity analysis. 2023 IEEE 19th International Conference on E-Science (E-Science) (pp. 1–6). IEEE. https://doi.org/10.1109/e-Science58273.2023.10254948
- [8] Roy, M., Das, S., & Protity, A. T. (2023). OBESEYE: Interpretable diet recommender for obesity management using machine learning and explainable AI. https://doi.org/10.48550/arXiv.2308.02796
- [9] Khokhar, S., & Holden, J. (2024). AI-based digital therapeutics platform for obesity management. International journal on advances in life sciences, 16(1). https://personales.upv.es/thinkmind/LifSci/LifSci_v16_n12_2024/lifsci_v16_n12_2024_7.html
- [10] Choi, I., Kim, J., & Kim, W. C. (2024). An explainable prediction for dietary-related diseases via language models. Nutrients, 16(5), 1–20. https://doi.org/10.3390/nu16050686
- [11] Bellantuono, L., Monaco, A., Amoroso, N., Lacalamita, A., Pantaleo, E., Tangaro, S., & Bellotti, R. (2022). Worldwide impact of lifestyle predictors of dementia prevalence: An eXplainable Artificial Intelligence analysis. Frontiers in big data, 5. https://doi.org/10.3389/fdata.2022.1027783
- [12] Kim, J., Lee, J., & Park, M. (2022). Identification of smartwatch-collected lifelog variables affecting body mass index in middle-aged people using regression machine learning algorithms and SHapley Additive Explanations. Applied Sciences, 12(8), 1–16. https://doi.org/10.3390/app12083819
- [13] Seok, M., & Kim, W. (2023). Sarcopenia prediction for elderly people using machine learning: A case study on physical activity. Healthcare, 11(9), 1–24. https://doi.org/10.3390/healthcare11091334
- [14] Koto, F. (2014). SMOTE-out, smote-cosine, and selected-smote: An enhancement strategy to handle imbalance in data level. 2014 International Conference on Advanced Computer Science and Information System (pp. 280–284). IEEE. https://doi.org/10.1109/ICACSIS.2014.7065849
- [15] Tanha, J., Abdi, Y., Samadi, N., Razzaghi, N., & Asadpour, M. (2020). Boosting methods for multi-class imbalanced data classification: An experimental review. Journal of Big Data, 7(1), 70. https://doi.org/10.1186/s40537-020-00349-y
- [16] Dharmarathne, G., Bogahawaththa, M., Rathnayake, U., & Meddage, D. P. P. (2024). Integrating explainable machine learning and user-centric model for diagnosing cardiovascular disease: A novel approach. Intelligent Systems with Applications, 23, 200428. https://doi.org/10.1016/j.iswa.2024.200428
- [17] Bagheri Tofighi, A., Ahmadi, A., & Mosadegh, H. (2025). A novel case-based reasoning system for explainable lung cancer diagnosis. Computers in Biology and Medicine, 185, 109547. https://doi.org/10.1016/j.compbiomed.2024.109547
- [18] Talukder, M. A., Islam, M. M., Uddin, M. A., Hasan, K. F., Sharmin, S., Alyami, S. A., & Moni, M. A. (2024). Machine learning-based network intrusion detection for big and imbalanced data using oversampling, stacking feature embedding and feature extraction. Journal of Big Data, 11(1), 33. https://doi.org/10.1186/s40537-024-00886-w

