Development of a Machine Learning-Based Interface for Insulin Dependency Prediction Using Clinical Data | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Article Development of a Machine Learning-Based Interface for Insulin Dependency Prediction Using Clinical Data Om Pritam Das, B. V. S. Lakshmi, M. Vaishnavi, Mohd Arif Uddin, and 3 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-6831904/v1 This work is licensed under a CC BY 4.0 License Status: Published Journal Publication published 05 Nov, 2025 Read the published version in Scientific Reports → Version 1 posted 12 You are reading this latest preprint version Abstract This study presents the development and evaluation of machine learning models to predict insulin dependency in diabetic patients using clinical and demographic data. Utilizing a dataset comprising variables such as age, gender, BMI, HbA1c, fasting and postprandial blood sugar levels, smoking and alcohol status, and diabetes duration, we trained six models: Random Forest, Logistic Regression, XGBoost, LightGBM, a Voting Ensemble, and an Averaged Model (Random Forest + LightGBM). The models were assessed using accuracy, AUC, precision, recall, and F1-score. The LightGBM model and ensemble methods achieved the highest performance, each with an accuracy of 90% and an AUC of 0.9341, demonstrating strong predictive ability for both insulin-dependent and non-insulin-dependent groups. Feature importance analysis revealed HbA1c, duration of diabetes, and glucose levels as critical predictors. The most effective model was deployed as an interactive web interface using Gradio on Hugging Face Spaces. Our findings suggest that machine learning, particularly ensemble approaches, can provide valuable tools for early prediction of insulin needs in diabetic patients, supporting clinical decision-making and personalized care strategies. Biological sciences/Biotechnology Health sciences/Diseases Health sciences/Health care Diabetes Insulin Dependency Machine Learning LightGBM Ensemble Learning Predictive Modeling Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Highlights Clinical and demographic data from diabetic patients were collected and processed. Several machine learning models were trained and tested. LightGBM was chosen for its accuracy, interpretability, and speed. The final model was deployed as a web app for real-time clinical use. 1. Introduction Diabetes mellitus is a heterogeneous group of metabolic disorders characterized by chronic hyperglycemia due to defects in insulin secretion, insulin action, or both 1 . It is one of the most widespread non-communicable diseases globally, currently affecting over 500 million people, with incidence expected to rise due to urbanization, sedentary lifestyles, and aging populations 2 . The condition manifests mainly as type 1 diabetes—caused by autoimmune destruction of pancreatic β-cells—or type 2 diabetes, which arises from insulin resistance and β-cell dysfunction 3 . Determining when diabetic patients require exogenous insulin therapy is a critical clinical decision. Insulin dependency often indicates progressive β-cell failure or suboptimal glycemic control despite oral antihyperglycemic agents 4 . Timely initiation of insulin can significantly reduce the risk of diabetes-related complications, including retinopathy, nephropathy, and cardiovascular diseases, ultimately leading to better quality of life and lower healthcare costs 5 . Traditionally, decisions regarding insulin initiation are based on physician judgment supported by clinical and biochemical parameters, such as glycated hemoglobin (HbA1c), fasting plasma glucose, and patient symptoms 6 . However, these methods often fail to fully account for the multifactorial and nonlinear relationships among demographic, behavioral, biochemical, and physiological variables involved in diabetes progression 7 . Additionally, the high variability across patient profiles complicates standardized treatment protocols 8 . Recent developments in artificial intelligence and machine learning (ML) offer promising solutions for analyzing complex healthcare data and supporting evidence-based clinical decisions 9 . ML models can identify hidden patterns in structured and unstructured datasets and have shown considerable success in diabetes care, including risk stratification, treatment optimization, and complication prediction 10 , 11 . Notably, supervised learning algorithms such as logistic regression, decision trees, random forests, XGBoost, and LightGBM are widely used in clinical prediction tasks 12 – 14 . Among these, XGBoost and LightGBM have demonstrated exceptional performance and computational efficiency in large-scale healthcare applications 15 , 16 . Ensemble methods—such as bagging, boosting, and stacking—combine the predictions of multiple base learners to reduce overfitting, improve model generalization, and enhance robustness. These techniques have proven effective in medical contexts, especially in improving diagnostic accuracy and stability in heterogeneous patient populations 17 , 18 . Although several ML approaches have been applied to diabetes-related tasks, limited work has focused specifically on predicting insulin dependency using real-world clinical data in a comprehensive and interpretable manner. Addressing this gap can contribute significantly to personalized diabetes care by guiding clinicians in identifying patients who may require insulin therapy early in the disease course 19 , 20 . In this study, we develop and evaluate multiple machine learning models—including Random Forest, Logistic Regression, XGBoost, LightGBM, and ensemble combinations—to predict insulin dependency in diabetic patients. Using a real-world dataset, we preprocess patient data, train and validate predictive models, assess performance using standard classification metrics (accuracy, AUC, precision, recall, and F1-score), and analyze feature importance to extract clinical insights. The best-performing model is deployed as a web-based clinical decision support tool for healthcare practitioners. 2. Methods 2.1 Data Collection and Pre-processing This study was conducted using a real-world clinical dataset obtained from diabetic patients, comprising individuals both dependent and non-dependent on insulin therapy. The data collection was approved by the Institutional Ethics Committee for Biomedical and Health Research, Malla Reddy Institute of Medical Sciences, Hyderabad, India, under certificate number MRIMS/DHR-Msc-CREM-4024/176. Patient consent was obtained and handled with appropriate ethical consideration, in accordance with established ethical frameworks for biomedical research involving human subjects. The dataset included 11 core features such as age, gender, height, weight, BMI, smoking status, alcohol consumption, duration of diabetes, HbA1c, fasting blood sugar (FBS), and postprandial blood sugar (PPBS), with insulin dependency as the binary target variable. Details of each feature are summarized in Table 1 . Data cleaning involved removing entries with over 30% missing values, and the remaining missing values were imputed using the mean for numerical features and the mode for categorical features. The dataset was split into training and testing subsets (80:20 ratio) using stratified sampling to preserve class distribution, ensuring balanced representation of insulin-dependent and non-dependent cases. Table 1 Description of features used in the predictive modeling of insulin dependency in diabetic patients. Feature Name Type Description Age Numerical Age of the patient in years Gender Categorical (Male/Female) Biological sex of the patient (encoded as binary: Male = 1, Female = 0) Height Numerical Height of the patient in centimeters Weight Numerical Weight of the patient in kilograms BMI Numerical Body Mass Index calculated from height and weight Smoking Categorical (Yes/No) Whether the patient is a smoker (Yes = 1, No = 0) Alcoholic Categorical (Yes/No) Whether the patient consumes alcohol (Yes = 1, No = 0) Diabetes Duration Numerical Number of years the patient has had diabetes (dm_years) HbA1c Numerical Glycated hemoglobin (%) as an indicator of long-term glucose control FBS Numerical Fasting Blood Sugar level in mg/dL PPBS Numerical Postprandial Blood Sugar level in mg/dL (after meals) Insulin Dependency Target (Binary) Whether the patient is dependent on insulin therapy (1 = Yes, 0 = No) 2.2 Exploratory Data Analysis (EDA) Exploratory Data Analysis (EDA) was conducted to understand the dataset’s structure and identify trends to inform model development. Summary statistics, including means and standard deviations, were computed for numerical variables across insulin-dependent and non-dependent groups, revealing higher glycemic indicators (HbA1c, FBS, and PPBS) among insulin-dependent individuals. Categorical features such as gender, smoking, and alcohol use were examined through frequency analysis, showing a higher prevalence of male and smoking patients in the insulin-dependent group. Pearson correlation coefficients were calculated to assess inter-feature relationships, and a correlation heatmap revealed strong positive associations among glycemic and anthropometric variables, including BMI, FBS, PPBS, and HbA1c. A pair plot further illustrated distinct clustering patterns associated with insulin dependency. These visualizations aided in identifying multivariate relationships and informed feature selection and subsequent modeling steps. 2.3 Model Development, Training, and Evaluation This study aimed to develop accurate machine learning models to predict insulin dependency in diabetic patients using clinical and demographic features. Six models were implemented in Python, utilizing libraries such as scikit-learn, XGBoost, and LightGBM 21 – 23 . These included Random Forest, Logistic Regression, XGBoost, LightGBM, a Voting Ensemble combining predictions from all four models via majority voting, and an Averaged Model that computed the mean probability predictions from Random Forest and LightGBM. All models were trained on an 80/20 stratified train-test split to maintain class balance, with hyperparameter tuning conducted via 5-fold cross-validation. The Random Forest model used majority voting across decision trees, while Logistic Regression applied a sigmoid function within a binary classification framework. Both XGBoost and LightGBM employed sequential decision trees to minimize residual errors. The Voting Ensemble aggregated class predictions through majority voting, and the Averaged Model averaged the predicted probabilities from Random Forest and LightGBM. Model performance was evaluated using accuracy, ROC-AUC, precision, recall, and F1-score, with particular focus on recall for insulin-dependent cases. ROC curves and confusion matrices were generated to assess model discrimination and misclassification. Feature importance scores were extracted from tree-based models, and learning curves were plotted to analyze training dynamics. Among all models, LightGBM and the Voting Ensemble demonstrated the highest overall performance. To demonstrate practical utility, the top-performing models—LightGBM and the Voting Ensemble—were serialized using joblib 21 and deployed through a Gradio interface hosted on Hugging Face Spaces 24 . The interactive tool allows real-time prediction of insulin dependency based on user-input clinical and demographic variables including age, BMI, glycated hemoglobin (HbA1c), fasting blood sugar (FBS), and postprandial blood sugar (PPBS). The deployment package includes all required scripts, dependencies, and metadata to ensure reproducibility and platform independence. A disclaimer is clearly provided, stating that the tool is intended solely for experimental use and should not replace professional medical advice. This cloud-based deployment ensures seamless interaction and supports clinical decision-making by healthcare professionals. 3. Results 3.1 Descriptive Statistics and Demographics comprehensive demographic and clinical characterization of the study cohort was conducted to inform model development and interpretation. Table 1 presents these features stratified by insulin dependency status. The cohort included both insulin-dependent and non-insulin-dependent diabetic patients, highlighting key differences consistent with established diabetes epidemiology 1 , 25 . Insulin-dependent patients were generally older (55.5 ± 7 vs. 54.4 ± 10 years) and predominantly male (74% vs. 47%), aligning with prior findings associating male sex with more severe diabetic phenotypes and increased insulin requirements 25 . Additionally, insulin-dependent individuals exhibited higher mean height, weight, and body mass index (BMI), factors known to influence insulin sensitivity and the progression of type 2 diabetes 26 . The prevalence of smoking was also notably higher in this group (21% vs. 8%), consistent with evidence that tobacco use exacerbates insulin resistance and impairs glycemic control 27 . A significant disparity was observed in diabetes duration; insulin-dependent patients had a longer disease history (9 ± 9 vs. 4 ± 3 years), supporting literature linking prolonged diabetes duration with β-cell dysfunction and the necessity for insulin therapy 6 . Glycemic control markers—including HbA1c, fasting blood sugar (FBS), and postprandial blood sugar (PPBS)—were significantly elevated in the insulin-dependent group, reflecting poorer metabolic regulation and heightened insulin dependency. These findings emphasize the importance of these clinical and demographic variables in predicting insulin dependency and justify their inclusion as key features in the machine learning models developed herein (Table 1 ). Table 2 Demographic and Clinical Characteristics of Diabetic Patients by Insulin Dependency Insulin dependent (n = 54) Non-insulin dependent (n = 46) 1 AGE 55.5 ± 7 54.4 ± 10 2 GENDER Male 74% 47% Female 26% 53% 3 HIEGHT 170.4 ± 5 167.2 ± 7 4 WEIGHT 76.3 ± 13 74 ± 9 5 BMI 26.8 ± 2 25.8 ± 2 6 SMOKING 21% 8% 7 ALOCHOLIC 33% 34% 8 DM YEARS 9 ± 9 4 ± 3 9 HBA1C 8 ± 1 7 ± 1 10 FBS 203 ± 65 160 ± 56 11 PPBS 252 ± 68 197 ± 57 3.2 Exploratory Data Analysis (EDA) Exploratory analyses were performed to examine feature distributions and relationships. A Pearson correlation heatmap (Fig. 1 ) highlighted strong positive correlations among glycemic variables (HbA1c, FBS, PPBS) and moderate associations between BMI and weight, with no evidence of perfect collinearity, supporting the inclusion of all features in the models. Further, a pair plot (Fig. 2 ) illustrated that insulin-dependent patients clustered at higher values of glycemic markers and had longer disease duration, while male predominance was consistent with demographic data 25 . Distribution assessments confirmed mostly normal or mildly skewed variables with clinically representative outliers. These insights guided robust feature selection for modeling. 3.3 Model Training and Performance Comparison Six machine learning models were developed and evaluated for insulin dependency prediction: Random Forest, Logistic Regression, XGBoost, LightGBM, a Voting Ensemble of all four, and an Averaged Ensemble combining Random Forest and LightGBM. Training used an 80 − 20 stratified split with hyperparameter tuning via cross-validation. Model performance on the test set is detailed in Table 3 . The Random Forest classifier achieved an accuracy of 85% with an AUC of 0.9396, showing balanced precision and recall across classes. Logistic Regression matched accuracy (85%) but had lower AUC (0.8462) and recall for insulin-dependent patients, reflecting a conservative prediction bias. XGBoost yielded accuracy of 85% and AUC of 0.8901, leveraging gradient boosting for minority class detection. LightGBM outperformed single models with 90% accuracy and AUC of 0.9341, achieving F1-scores of 0.917 and 0.875 for non-insulin and insulin classes, respectively. Both ensemble approaches (Voting and Averaged) maintained this superior performance, highlighting the benefits of combining classifiers. Confusion matrices in Fig. 3 visualize these results, confirming robust class-specific predictions. Figure 4 further illustrates LightGBM’s learning curve, ROC curve, and feature importance, emphasizing its predictive stability and interpretability. Table 3 Performance metrics of machine learning models trained to predict insulin dependency in diabetic patients. Index Accuracy AUC Precision (No Insulin) Recall (No Insulin) F1-score (No Insulin) Precision (Needs Insulin) Recall (Needs Insulin) F1-score (Needs Insulin) Random Forest 0.85 0.9396 0.9167 0.8462 0.88 0.75 0.8571 0.8 Logistic Regression 0.85 0.8462 1 0.7692 0.8696 0.7 1 0.8235 XGBoost 0.85 0.8901 0.9167 0.8462 0.88 0.75 0.8571 0.8 LightGBM 0.9 0.9341 1 0.8462 0.9167 0.7778 1 0.875 Voting Ensemble 0.9 0.9341 1 0.8462 0.9167 0.7778 1 0.875 Averaged Model (RF + LGBM) 0.9 0.9341 1 0.8462 0.9167 0.7778 1 0.875 3.4 Model Interpretation and Feature Importance Feature importance analysis derived from the LightGBM model (Fig. 4 C) identified glycated hemoglobin (HbA1c) as the most influential predictor of insulin dependency, followed by fasting blood sugar (FBS), postprandial blood sugar (PPBS), and diabetes duration. These results are consistent with clinical understanding of glycemic control and disease progression 6 . Variables such as body mass index (BMI), age, weight, and height exhibited moderate influence, whereas smoking and alcohol consumption contributed less substantially. The receiver operating characteristic (ROC) curve (Fig. 4 B) demonstrates robust discriminatory capability with an area under the curve (AUC) of 0.9341. Furthermore, the learning curve (Fig. 4 A) reflects stable model training without signs of overfitting, indicating effective generalization 23 . Collectively, these findings support the model’s clinical relevance and reliability as a decision support tool. 3.5 Model Comparison and Selection Comprehensive comparison across metrics (Table 3 ) revealed that LightGBM and ensemble methods consistently outperformed simpler models in accuracy, AUC, precision, recall, and F1-score. Given its competitive performance, interpretability, efficient training, and ease of deployment, LightGBM was selected as the final model for clinical application. Although Voting and Averaged ensembles matched LightGBM in accuracy and AUC, the single LightGBM model offered streamlined integration and maintenance advantages. 3.6 Deployment and Interface Testing The LightGBM model was deployed as an interactive web application using the Gradio framework and hosted on Hugging Face Spaces 24 . The user interface (Fig. 5 ) enables clinicians and users to input relevant clinical and demographic variables—including age, gender, anthropometric measurements, glycemic markers, lifestyle factors, and diabetes duration—to obtain real-time predictions of insulin dependency. The deployment pipeline incorporated model serialization via joblib 21 and seamless integration within a user-friendly graphical user interface (GUI) that provides contextual information and necessary disclaimers regarding the experimental nature of the tool. 4. Discussion In this study, we developed and evaluated multiple machine learning (ML) models to predict insulin dependency in diabetic patients using clinical and demographic features. Among the tested algorithms, the LightGBM model achieved the best predictive performance, with 90% accuracy and an area under the curve (AUC) of 0.9341. Ensemble methods, including a voting ensemble and the averaged model combining Random Forest and LightGBM, also produced comparable results, highlighting the benefits of model integration for enhanced robustness. Key predictors such as glycated hemoglobin (HbA1c), fasting blood sugar (FBS), postprandial blood sugar (PPBS), and diabetes duration aligned with clinical evidence supporting their relevance in insulin therapy decisions 1 , 6 , 28 . LightGBM’s performance stems from its advanced gradient boosting framework, which uses histogram-based binning and leaf-wise tree growth to capture complex, non-linear interactions more effectively than traditional models 22 , 23 . Its ability to handle mixed-type features with minimal preprocessing makes it well-suited for real-world healthcare data 15 , 29 . The consistency of top predictive features with known clinical markers enhances both interpretability and model reliability. These findings align with prior research showing strong performance of tree-based models, including Random Forest and gradient boosting, in diabetes prediction tasks 17 , 30 . Additionally, ensemble learning is known to reduce bias and variance, improving generalizability and model stability 16 . Clinically, the developed model presents a promising tool for early identification of patients likely to require insulin therapy. Accurate prediction can support timely intervention, optimize treatment strategies, and improve long-term outcomes 12 , 31 . Deployment via an interactive web interface enhances clinical accessibility and facilitates integration into workflows for rapid risk assessment 24 , 32 . The inclusion of model interpretability features, such as feature importance, contributes to transparency—crucial for building clinical trust in AI systems 14 , 33 , 34 . Nonetheless, several limitations must be acknowledged. The dataset originated from a single institution and was modest in size, potentially limiting generalizability across populations 20 , 35 . Class imbalance between insulin-dependent and non-insulin-dependent cases may have influenced training, despite the use of stratified sampling 19 . Moreover, the model has not undergone external validation or prospective testing—essential steps to confirm its effectiveness and safety in clinical practice. Future efforts should focus on expanding the dataset to include multi-center, ethnically diverse cohorts to improve robustness and generalizability. Integration with electronic health record (EHR) systems and real-time validation would offer practical insights into clinical impact 36 . Exploring advanced modeling approaches, such as deep learning or hybrid architectures, may further enhance performance. Ongoing monitoring for fairness, bias, and interpretability remains essential to ensure ethical deployment in varied clinical settings 34 , 37 . 5. Conclusion In this study, we developed and rigorously evaluated several machine learning models to predict insulin dependency in diabetic patients using clinical and demographic data. Results showed that the LightGBM model, along with ensemble methods, delivered the highest accuracy and robustness, underscoring the potential of advanced gradient boosting algorithms in healthcare prediction tasks. The identification of key clinical features—such as HbA1c, blood glucose levels, and duration of diabetes—supports the clinical validity of the models, as these are established markers in diabetes management. Deploying the best-performing model in an interactive web-based application demonstrates its practical utility, enabling clinicians to make data-driven decisions for early intervention and personalized care. Although the findings are promising, further validation using larger, more diverse populations is necessary before clinical implementation. Overall, this work highlights the potential of machine learning to augment clinical decision-making and improve diabetes care by facilitating timely identification of patients likely to require insulin therapy. Ongoing efforts to improve model generalizability, interpretability, and integration into healthcare workflows will be essential to fully realize the benefits of AI-driven predictive tools in medicine. Abbreviations HbA1c, glycated hemoglobin; ML, machine learning; FBS, fasting blood sugar; PPBS, postprandial blood sugar; EDA, Exploratory Data Analysis; BMI, body mass index; ROC, receiver operating characteristic; AUC, area under the curve; GUI, graphical user interface; HER, electronic health record Declarations I hereby declare that this submission is entirely my own work, in my own words, and that all sources used in researching it are fully acknowledged and all quotations properly identified. Statement of Informed Consent There are no human subjects in this article and informed consent is not applicable. Consent to Publication All the authors have read and agreed to the final copy of the finding as contained in the manuscript. Availability of data and materials The datasets/information used for this study is available on reasonable request to the corresponding authors. Conflicting interest All authors report that there was no conflict of interest in this work. Funding The author(s) received no specific funding for this work. Ethical approval This study was conducted in accordance with the ethical principles outlined in the Declaration of Helsinki and the Indian Council of Medical Research (ICMR) guidelines. Ethical approval was obtained from the Institutional Ethics Committee for Biomedical and Health Research, Malla Reddy Institute of Medical Sciences, Hyderabad, India (Approval No: MRIMS/DHR-Msc-CREM-4024/176). All participants provided informed consent before data collection, and all data were anonymized to ensure participant confidentiality. Author Contribution Statement OPD, SPNB and VKY contributed to the study's ideation, data analysis, and drafting of the original manuscript. MV was responsible for data collection, curation, and interpretation. BVSL and MAU provided supervision and contributed to the drafting and refinement of the manuscript. AS supported the project by providing resources, supervision, and critical review. VKY and SPNB additionally led the conceptualization and methodology design of the study. The authors read and approved the final manuscript. Acknowledgement The authors are thankful to Kampala International University and Malla Reddy group of institutions for providing the necessary facilities to conduct this research work. References ElSayed, N. A. et al. Classification and Diagnosis of Diabetes: Standards of Care in Diabetes—2023 . Diabetes Care 46 , S19–S40 (2023). Magliano, D. J., Boyko, E. J., & IDF Diabetes Atlas 10th edition scientific committee. IDF DIABETES ATLAS . (International Diabetes Federation, Brussels, 2021). DeFronzo, R. A. Pathogenesis of type 2 diabetes mellitus. Med Clin North Am 88 , 787–835, ix (2004). Nathan, D. M. et al. Medical Management of Hyperglycemia in Type 2 Diabetes: A Consensus Algorithm for the Initiation and Adjustment of Therapy. Diabetes Care 32 , 193–203 (2009). Stratton, I. M. Association of glycaemia with macrovascular and microvascular complications of type 2 diabetes (UKPDS 35): prospective observational study. BMJ 321 , 405–412 (2000). Inzucchi, S. E. et al. Management of Hyperglycemia in Type 2 Diabetes: A Patient-Centered Approach. Diabetes Care 35 , 1364–1379 (2012). Kavakiotis, I. et al. Machine Learning and Data Mining Methods in Diabetes Research. Computational and Structural Biotechnology Journal 15 , 104–116 (2017). Woldaregay, A. Z. et al. Data-driven modeling and prediction of blood glucose dynamics: Machine learning applications in type 1 diabetes. Artif Intell Med 98 , 109–134 (2019). Esteva, A. et al. A guide to deep learning in healthcare. Nat Med 25 , 24–29 (2019). Ganie, S. M., Malik, M. B. & Arif, T. Performance analysis and prediction of type 2 diabetes mellitus based on lifestyle data using machine learning approaches. J Diabetes Metab Disord 21 , 339–352 (2022). Joshi, R. D. & Dhakal, C. K. Predicting Type 2 Diabetes Using Logistic Regression and Machine Learning Approaches. IJERPH 18 , 7346 (2021). Chen, T. & Guestrin, C. XGBoost: A Scalable Tree Boosting System. in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining 785–794 (ACM, San Francisco California USA, 2016). doi:10.1145/2939672.2939785. Ke, G. et al. LightGBM: A Highly Efficient Gradient Boosting Decision Tree . (2017). Singh, A. et al. eDiaPredict: An Ensemble-based Framework for Diabetes Prediction. ACM Trans. Multimedia Comput. Commun. Appl. 17 , 1–26 (2021). Hasan, M. & Yasmin, F. Predicting Diabetes Using Machine Learning: A Comparative Study of Classifiers. Preprint at https://doi.org/10.48550/ARXIV.2505.07036 (2025). Ganie, S. M., Pramanik, P. K. D., Bashir Malik, M., Mallik, S. & Qin, H. An ensemble learning approach for diabetes prediction using boosting techniques. Front Genet 14 , 1252159 (2023). Rokach, L. Ensemble-based classifiers. Artif Intell Rev 33 , 1–39 (2010). Mahesh, T. R. et al. Blended Ensemble Learning Prediction Model for Strengthening Diagnosis and Treatment of Chronic Diabetes Disease. Computational Intelligence and Neuroscience 2022 , 1–9 (2022). Sagi, O. & Rokach, L. Ensemble learning: A survey. WIREs Data Min & Knowl 8 , e1249 (2018). Ding, T. et al. Application of machine learning algorithm incorporating dietary intake in prediction of gestational diabetes mellitus. Endocrine Connections 13 , e240169 (2024). Pedregosa, F. et al. Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research 12 , (2012). Florek, P. & Zagdański, A. Benchmarking state-of-the-art gradient boosting algorithms for classification. Preprint at https://doi.org/10.48550/ARXIV.2305.17094 (2023). Zhang, Z., Zhang, T. & Li, J. Unbiased Gradient Boosting Decision Tree with Unbiased Feature Importance. Preprint at https://doi.org/10.48550/ARXIV.2305.10696 (2023). Abid, A. et al. Gradio: Hassle-Free Sharing and Testing of ML Models in the Wild. Preprint at https://doi.org/10.48550/ARXIV.1906.02569 (2019). Kautzky-Willer, A., Harreiter, J. & Pacini, G. Sex and Gender Differences in Risk, Pathophysiology and Complications of Type 2 Diabetes Mellitus. Endocrine Reviews 37 , 278–316 (2016). Blüher, M. Obesity: global epidemiology and pathogenesis. Nat Rev Endocrinol 15 , 288–298 (2019). Pan, A., Wang, Y., Talaei, M. & Hu, F. B. Relation of Smoking With Total Mortality and Cardiovascular Events Among Patients With Diabetes Mellitus: A Meta-Analysis and Systematic Review. Circulation 132 , 1795–1804 (2015). Davies, M. J. et al. Management of Hyperglycemia in Type 2 Diabetes, 2022. A Consensus Report by the American Diabetes Association (ADA) and the European Association for the Study of Diabetes (EASD). Diabetes Care 45 , 2753–2786 (2022). Rajkomar, A., Dean, J. & Kohane, I. Machine Learning in Medicine. N Engl J Med 380 , 1347–1358 (2019). Contreras, I. & Vehi, J. Artificial Intelligence for Diabetes Management and Decision Support: Literature Review. J Med Internet Res 20 , e10775 (2018). Kawamoto, K., Houlihan, C. A., Balas, E. A. & Lobach, D. F. Improving clinical practice using clinical decision support systems: a systematic review of trials to identify features critical to success. BMJ 330 , 765 (2005). Topol, E. J. High-performance medicine: the convergence of human and artificial intelligence. Nat Med 25 , 44–56 (2019). Caruana, R. et al. Intelligible Models for HealthCare: Predicting Pneumonia Risk and Hospital 30-day Readmission. in Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining 1721–1730 (ACM, Sydney NSW Australia, 2015). doi:10.1145/2783258.2788613. Rudin, C. Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nat Mach Intell 1 , 206–215 (2019). Beam, A. L. & Kohane, I. S. Big Data and Machine Learning in Health Care. JAMA 319 , 1317 (2018). Johnson, A. E. W. et al. MIMIC-III, a freely accessible critical care database. Sci Data 3 , 160035 (2016). Rajkomar, A., Hardt, M., Howell, M. D., Corrado, G. & Chin, M. H. Ensuring Fairness in Machine Learning to Advance Health Equity. Ann Intern Med 169 , 866–872 (2018). Additional Declarations No competing interests reported. Cite Share Download PDF Status: Published Journal Publication published 05 Nov, 2025 Read the published version in Scientific Reports → Version 1 posted Editorial decision: Revision requested 13 Aug, 2025 Reviews received at journal 07 Aug, 2025 Reviews received at journal 04 Aug, 2025 Reviewers agreed at journal 28 Jul, 2025 Reviewers agreed at journal 23 Jul, 2025 Reviews received at journal 16 Jul, 2025 Reviewers agreed at journal 07 Jul, 2025 Reviewers invited by journal 26 Jun, 2025 Editor invited by journal 23 Jun, 2025 Editor assigned by journal 08 Jun, 2025 Submission checks completed at journal 06 Jun, 2025 First submitted to journal 05 Jun, 2025 You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-6831904","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":476840784,"identity":"76c98760-cab2-42f2-aa16-76f603f990f0","order_by":0,"name":"Om Pritam Das","email":"","orcid":"","institution":"Central University of Andhra Pradesh","correspondingAuthor":false,"prefix":"","firstName":"Om","middleName":"Pritam","lastName":"Das","suffix":""},{"id":476840785,"identity":"8be364b9-0e67-4dbf-9819-da767b6f1bc2","order_by":1,"name":"B. V. S. Lakshmi","email":"","orcid":"","institution":"Malla Reddy University","correspondingAuthor":false,"prefix":"","firstName":"B.","middleName":"V. S.","lastName":"Lakshmi","suffix":""},{"id":476840786,"identity":"03388990-e065-4dfa-8804-ad8425ec2a39","order_by":2,"name":"M. Vaishnavi","email":"","orcid":"","institution":"Malla Reddy University","correspondingAuthor":false,"prefix":"","firstName":"M.","middleName":"","lastName":"Vaishnavi","suffix":""},{"id":476840789,"identity":"0ad1c4b4-d9bb-4bc0-aa7d-c7c5c3dfe3a0","order_by":3,"name":"Mohd Arif Uddin","email":"","orcid":"","institution":"Malla Reddy University","correspondingAuthor":false,"prefix":"","firstName":"Mohd","middleName":"Arif","lastName":"Uddin","suffix":""},{"id":476840790,"identity":"18375fb3-2476-47ba-a1c9-2dcc73061394","order_by":4,"name":"Aparna Srikantam","email":"","orcid":"","institution":"Malla Reddy University","correspondingAuthor":false,"prefix":"","firstName":"Aparna","middleName":"","lastName":"Srikantam","suffix":""},{"id":476840791,"identity":"cf32e55f-e913-4887-adf5-15d63cb50007","order_by":5,"name":"Vinod Kumar Yata","email":"","orcid":"","institution":"Malla Reddy University","correspondingAuthor":false,"prefix":"","firstName":"Vinod","middleName":"Kumar","lastName":"Yata","suffix":""},{"id":476840792,"identity":"0a773b1a-313a-4055-ac32-3a8655db1cfc","order_by":6,"name":"Sarad Pawar Naik Bukke","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA80lEQVRIiWNgGAWjYDCCA2CSGcL5cECCRC2MM0jWwsxzgAgdfLePP/xcUWOdxz8j+dlnmzMWiQ3shx8w8/zCrUXyXI6x5Jlj6cUSN9KMZ+fckEhs4EkzYObtw63F4AwPg2QD2+HEhtsJxsw5H4BaGHIYmHl78Glhf/yz4d/hxPm30z8zW4C08L8hpIXBTLKx7XDihts5xswMIIdJAG3h+YHHL2d4zCwb+9KLDe+/KWbsOSNh3CbxzODg3AbcWviADrvZ8M06T+7M8c0MP47VyfbzJz988OYPbi0wkABnsQHxAcY2UrRAABG2jIJRMApGwYgBAI0UVhgzbaM9AAAAAElFTkSuQmCC","orcid":"","institution":"Kampala International University","correspondingAuthor":true,"prefix":"","firstName":"Sarad","middleName":"Pawar Naik","lastName":"Bukke","suffix":""}],"badges":[],"createdAt":"2025-06-05 20:38:13","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-6831904/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-6831904/v1","draftVersion":[],"editorialEvents":[{"content":"https://doi.org/10.1038/s41598-025-22381-9","type":"published","date":"2025-11-05T15:57:25+00:00"}],"editorialNote":"","failedWorkflow":false,"files":[{"id":85746898,"identity":"9b62634c-fae6-4820-af20-fae97f1994e1","added_by":"auto","created_at":"2025-07-01 09:36:19","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":51263,"visible":true,"origin":"","legend":"\u003cp\u003eCorrelation Heatmap of Clinical and Demographic Variables\u003c/p\u003e","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-6831904/v1/dba7c6c346aa4d91a7281eae.png"},{"id":85746899,"identity":"0456365f-f808-4da1-aa43-be875d65b336","added_by":"auto","created_at":"2025-07-01 09:36:20","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":85005,"visible":true,"origin":"","legend":"\u003cp\u003ePair plot showing the pairwise relationships among clinical features of diabetic patients\u003c/p\u003e","description":"","filename":"Onlinefloatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-6831904/v1/9b3012dabd19fd12b738f97b.png"},{"id":85748184,"identity":"c863e45f-6e6b-48f2-84ec-40e7d64f5b23","added_by":"auto","created_at":"2025-07-01 09:44:20","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":48091,"visible":true,"origin":"","legend":"\u003cp\u003eConfusion matrices for all trained machine learning models illustrating the classification performance in terms of true positives, true negatives, false positives, and false negatives\u003c/p\u003e","description":"","filename":"Onlinefloatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-6831904/v1/34f4c63f18c97a4bb0907985.png"},{"id":85748938,"identity":"ae46808b-a202-434a-a6d9-d531954600fb","added_by":"auto","created_at":"2025-07-01 09:52:20","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":60410,"visible":true,"origin":"","legend":"\u003cp\u003eEvaluation plots for the LightGBM model \u003cstrong\u003eA) \u003c/strong\u003eLearning curve showing model performance on training and validation sets \u003cstrong\u003eB)\u003c/strong\u003e ROC curve illustrating the trade-off between sensitivity and specificity \u003cstrong\u003eC)\u003c/strong\u003e Bar graph displaying the top 10 most important features\u003c/p\u003e","description":"","filename":"Onlinefloatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-6831904/v1/611d7a0b01c715ca8b573040.png"},{"id":85746904,"identity":"495468b2-cc32-4a28-ae7e-a76bf70a70f8","added_by":"auto","created_at":"2025-07-01 09:36:20","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":118023,"visible":true,"origin":"","legend":"\u003cp\u003eProposed functional web interface hosted on Hugging Face\u003c/p\u003e","description":"","filename":"Onlinefloatimage5.png","url":"https://assets-eu.researchsquare.com/files/rs-6831904/v1/8564bc52a24e6008507a07c2.png"},{"id":95564116,"identity":"334fa906-a8d7-4680-ae55-db07c2306dc0","added_by":"auto","created_at":"2025-11-10 16:08:05","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1367145,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-6831904/v1/f0dc2c0e-35e2-4067-bf96-34c99413beba.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Development of a Machine Learning-Based Interface for Insulin Dependency Prediction Using Clinical Data","fulltext":[{"header":"Highlights ","content":"\u003cul\u003e\n \u003cli\u003eClinical and demographic data from diabetic patients were collected and processed.\u003c/li\u003e\n \u003cli\u003eSeveral machine learning models were trained and tested.\u003c/li\u003e\n \u003cli\u003eLightGBM was chosen for its accuracy, interpretability, and speed.\u003c/li\u003e\n \u003cli\u003eThe final model was deployed as a web app for real-time clinical use.\u003c/li\u003e\n\u003c/ul\u003e"},{"header":"1. Introduction","content":"\u003cp\u003eDiabetes mellitus is a heterogeneous group of metabolic disorders characterized by chronic hyperglycemia due to defects in insulin secretion, insulin action, or both \u003csup\u003e\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e\u003c/sup\u003e. It is one of the most widespread non-communicable diseases globally, currently affecting over 500\u0026nbsp;million people, with incidence expected to rise due to urbanization, sedentary lifestyles, and aging populations \u003csup\u003e\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e\u003c/sup\u003e. The condition manifests mainly as type 1 diabetes\u0026mdash;caused by autoimmune destruction of pancreatic β-cells\u0026mdash;or type 2 diabetes, which arises from insulin resistance and β-cell dysfunction \u003csup\u003e\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e\u003c/sup\u003e. Determining when diabetic patients require exogenous insulin therapy is a critical clinical decision. Insulin dependency often indicates progressive β-cell failure or suboptimal glycemic control despite oral antihyperglycemic agents \u003csup\u003e\u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e\u003c/sup\u003e. Timely initiation of insulin can significantly reduce the risk of diabetes-related complications, including retinopathy, nephropathy, and cardiovascular diseases, ultimately leading to better quality of life and lower healthcare costs \u003csup\u003e\u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e\u003c/sup\u003e. Traditionally, decisions regarding insulin initiation are based on physician judgment supported by clinical and biochemical parameters, such as glycated hemoglobin (HbA1c), fasting plasma glucose, and patient symptoms \u003csup\u003e\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e\u003c/sup\u003e. However, these methods often fail to fully account for the multifactorial and nonlinear relationships among demographic, behavioral, biochemical, and physiological variables involved in diabetes progression \u003csup\u003e\u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e7\u003c/span\u003e\u003c/sup\u003e. Additionally, the high variability across patient profiles complicates standardized treatment protocols \u003csup\u003e\u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e8\u003c/span\u003e\u003c/sup\u003e. Recent developments in artificial intelligence and machine learning (ML) offer promising solutions for analyzing complex healthcare data and supporting evidence-based clinical decisions \u003csup\u003e\u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e9\u003c/span\u003e\u003c/sup\u003e. ML models can identify hidden patterns in structured and unstructured datasets and have shown considerable success in diabetes care, including risk stratification, treatment optimization, and complication prediction \u003csup\u003e\u003cspan citationid=\"CR10\" class=\"CitationRef\"\u003e10\u003c/span\u003e,\u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e11\u003c/span\u003e\u003c/sup\u003e. Notably, supervised learning algorithms such as logistic regression, decision trees, random forests, XGBoost, and LightGBM are widely used in clinical prediction tasks \u003csup\u003e\u003cspan additionalcitationids=\"CR13\" citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e\u0026ndash;\u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e14\u003c/span\u003e\u003c/sup\u003e. Among these, XGBoost and LightGBM have demonstrated exceptional performance and computational efficiency in large-scale healthcare applications \u003csup\u003e\u003cspan citationid=\"CR15\" class=\"CitationRef\"\u003e15\u003c/span\u003e,\u003cspan citationid=\"CR16\" class=\"CitationRef\"\u003e16\u003c/span\u003e\u003c/sup\u003e. Ensemble methods\u0026mdash;such as bagging, boosting, and stacking\u0026mdash;combine the predictions of multiple base learners to reduce overfitting, improve model generalization, and enhance robustness. These techniques have proven effective in medical contexts, especially in improving diagnostic accuracy and stability in heterogeneous patient populations \u003csup\u003e\u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e17\u003c/span\u003e,\u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e18\u003c/span\u003e\u003c/sup\u003e. Although several ML approaches have been applied to diabetes-related tasks, limited work has focused specifically on predicting insulin dependency using real-world clinical data in a comprehensive and interpretable manner. Addressing this gap can contribute significantly to personalized diabetes care by guiding clinicians in identifying patients who may require insulin therapy early in the disease course \u003csup\u003e\u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e19\u003c/span\u003e,\u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e20\u003c/span\u003e\u003c/sup\u003e.\u003c/p\u003e \u003cp\u003eIn this study, we develop and evaluate multiple machine learning models\u0026mdash;including Random Forest, Logistic Regression, XGBoost, LightGBM, and ensemble combinations\u0026mdash;to predict insulin dependency in diabetic patients. Using a real-world dataset, we preprocess patient data, train and validate predictive models, assess performance using standard classification metrics (accuracy, AUC, precision, recall, and F1-score), and analyze feature importance to extract clinical insights. The best-performing model is deployed as a web-based clinical decision support tool for healthcare practitioners.\u003c/p\u003e"},{"header":"2. Methods","content":"\u003cdiv id=\"Sec3\" class=\"Section2\"\u003e \u003ch2\u003e2.1 Data Collection and Pre-processing\u003c/h2\u003e \u003cp\u003eThis study was conducted using a real-world clinical dataset obtained from diabetic patients, comprising individuals both dependent and non-dependent on insulin therapy. The data collection was approved by the Institutional Ethics Committee for Biomedical and Health Research, Malla Reddy Institute of Medical Sciences, Hyderabad, India, under certificate number MRIMS/DHR-Msc-CREM-4024/176. Patient consent was obtained and handled with appropriate ethical consideration, in accordance with established ethical frameworks for biomedical research involving human subjects. The dataset included 11 core features such as age, gender, height, weight, BMI, smoking status, alcohol consumption, duration of diabetes, HbA1c, fasting blood sugar (FBS), and postprandial blood sugar (PPBS), with insulin dependency as the binary target variable. Details of each feature are summarized in Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e. Data cleaning involved removing entries with over 30% missing values, and the remaining missing values were imputed using the mean for numerical features and the mode for categorical features. The dataset was split into training and testing subsets (80:20 ratio) using stratified sampling to preserve class distribution, ensuring balanced representation of insulin-dependent and non-dependent cases.\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab1\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eDescription of features used in the predictive modeling of insulin dependency in diabetic patients.\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"3\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eFeature Name\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003eType\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003eDescription\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eAge\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eNumerical\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eAge of the patient in years\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eGender\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eCategorical (Male/Female)\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eBiological sex of the patient (encoded as binary: Male\u0026thinsp;=\u0026thinsp;1, Female\u0026thinsp;=\u0026thinsp;0)\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eHeight\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eNumerical\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eHeight of the patient in centimeters\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eWeight\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eNumerical\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eWeight of the patient in kilograms\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eBMI\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eNumerical\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eBody Mass Index calculated from height and weight\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eSmoking\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eCategorical (Yes/No)\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eWhether the patient is a smoker (Yes\u0026thinsp;=\u0026thinsp;1, No\u0026thinsp;=\u0026thinsp;0)\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eAlcoholic\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eCategorical (Yes/No)\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eWhether the patient consumes alcohol (Yes\u0026thinsp;=\u0026thinsp;1, No\u0026thinsp;=\u0026thinsp;0)\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eDiabetes Duration\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eNumerical\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eNumber of years the patient has had diabetes (dm_years)\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eHbA1c\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eNumerical\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eGlycated hemoglobin (%) as an indicator of long-term glucose control\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eFBS\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eNumerical\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eFasting Blood Sugar level in mg/dL\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003ePPBS\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eNumerical\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003ePostprandial Blood Sugar level in mg/dL (after meals)\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eInsulin Dependency\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eTarget (Binary)\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eWhether the patient is dependent on insulin therapy (1\u0026thinsp;=\u0026thinsp;Yes, 0\u0026thinsp;=\u0026thinsp;No)\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec4\" class=\"Section2\"\u003e \u003ch2\u003e2.2 Exploratory Data Analysis (EDA)\u003c/h2\u003e \u003cp\u003eExploratory Data Analysis (EDA) was conducted to understand the dataset\u0026rsquo;s structure and identify trends to inform model development. Summary statistics, including means and standard deviations, were computed for numerical variables across insulin-dependent and non-dependent groups, revealing higher glycemic indicators (HbA1c, FBS, and PPBS) among insulin-dependent individuals. Categorical features such as gender, smoking, and alcohol use were examined through frequency analysis, showing a higher prevalence of male and smoking patients in the insulin-dependent group. Pearson correlation coefficients were calculated to assess inter-feature relationships, and a correlation heatmap revealed strong positive associations among glycemic and anthropometric variables, including BMI, FBS, PPBS, and HbA1c. A pair plot further illustrated distinct clustering patterns associated with insulin dependency. These visualizations aided in identifying multivariate relationships and informed feature selection and subsequent modeling steps.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec5\" class=\"Section2\"\u003e \u003ch2\u003e2.3 Model Development, Training, and Evaluation\u003c/h2\u003e \u003cp\u003eThis study aimed to develop accurate machine learning models to predict insulin dependency in diabetic patients using clinical and demographic features. Six models were implemented in Python, utilizing libraries such as scikit-learn, XGBoost, and LightGBM \u003csup\u003e\u003cspan additionalcitationids=\"CR22\" citationid=\"CR21\" class=\"CitationRef\"\u003e21\u003c/span\u003e\u0026ndash;\u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e23\u003c/span\u003e\u003c/sup\u003e. These included Random Forest, Logistic Regression, XGBoost, LightGBM, a Voting Ensemble combining predictions from all four models via majority voting, and an Averaged Model that computed the mean probability predictions from Random Forest and LightGBM. All models were trained on an 80/20 stratified train-test split to maintain class balance, with hyperparameter tuning conducted via 5-fold cross-validation. The Random Forest model used majority voting across decision trees, while Logistic Regression applied a sigmoid function within a binary classification framework. Both XGBoost and LightGBM employed sequential decision trees to minimize residual errors. The Voting Ensemble aggregated class predictions through majority voting, and the Averaged Model averaged the predicted probabilities from Random Forest and LightGBM. Model performance was evaluated using accuracy, ROC-AUC, precision, recall, and F1-score, with particular focus on recall for insulin-dependent cases. ROC curves and confusion matrices were generated to assess model discrimination and misclassification. Feature importance scores were extracted from tree-based models, and learning curves were plotted to analyze training dynamics. Among all models, LightGBM and the Voting Ensemble demonstrated the highest overall performance.\u003c/p\u003e \u003cp\u003eTo demonstrate practical utility, the top-performing models\u0026mdash;LightGBM and the Voting Ensemble\u0026mdash;were serialized using joblib \u003csup\u003e\u003cspan citationid=\"CR21\" class=\"CitationRef\"\u003e21\u003c/span\u003e\u003c/sup\u003e and deployed through a Gradio interface hosted on Hugging Face Spaces \u003csup\u003e\u003cspan citationid=\"CR24\" class=\"CitationRef\"\u003e24\u003c/span\u003e\u003c/sup\u003e. The interactive tool allows real-time prediction of insulin dependency based on user-input clinical and demographic variables including age, BMI, glycated hemoglobin (HbA1c), fasting blood sugar (FBS), and postprandial blood sugar (PPBS). The deployment package includes all required scripts, dependencies, and metadata to ensure reproducibility and platform independence. A disclaimer is clearly provided, stating that the tool is intended solely for experimental use and should not replace professional medical advice. This cloud-based deployment ensures seamless interaction and supports clinical decision-making by healthcare professionals.\u003c/p\u003e \u003c/div\u003e"},{"header":"3. Results","content":"\u003cdiv id=\"Sec7\" class=\"Section2\"\u003e \u003ch2\u003e3.1 Descriptive Statistics and Demographics\u003c/h2\u003e \u003cp\u003ecomprehensive demographic and clinical characterization of the study cohort was conducted to inform model development and interpretation. Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e presents these features stratified by insulin dependency status. The cohort included both insulin-dependent and non-insulin-dependent diabetic patients, highlighting key differences consistent with established diabetes epidemiology \u003csup\u003e\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e,\u003cspan citationid=\"CR25\" class=\"CitationRef\"\u003e25\u003c/span\u003e\u003c/sup\u003e. Insulin-dependent patients were generally older (55.5\u0026thinsp;\u0026plusmn;\u0026thinsp;7 vs. 54.4\u0026thinsp;\u0026plusmn;\u0026thinsp;10 years) and predominantly male (74% vs. 47%), aligning with prior findings associating male sex with more severe diabetic phenotypes and increased insulin requirements \u003csup\u003e\u003cspan citationid=\"CR25\" class=\"CitationRef\"\u003e25\u003c/span\u003e\u003c/sup\u003e.\u003c/p\u003e \u003cp\u003eAdditionally, insulin-dependent individuals exhibited higher mean height, weight, and body mass index (BMI), factors known to influence insulin sensitivity and the progression of type 2 diabetes \u003csup\u003e\u003cspan citationid=\"CR26\" class=\"CitationRef\"\u003e26\u003c/span\u003e\u003c/sup\u003e. The prevalence of smoking was also notably higher in this group (21% vs. 8%), consistent with evidence that tobacco use exacerbates insulin resistance and impairs glycemic control \u003csup\u003e\u003cspan citationid=\"CR27\" class=\"CitationRef\"\u003e27\u003c/span\u003e\u003c/sup\u003e.\u003c/p\u003e \u003cp\u003eA significant disparity was observed in diabetes duration; insulin-dependent patients had a longer disease history (9\u0026thinsp;\u0026plusmn;\u0026thinsp;9 vs. 4\u0026thinsp;\u0026plusmn;\u0026thinsp;3 years), supporting literature linking prolonged diabetes duration with β-cell dysfunction and the necessity for insulin therapy \u003csup\u003e\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e\u003c/sup\u003e. Glycemic control markers\u0026mdash;including HbA1c, fasting blood sugar (FBS), and postprandial blood sugar (PPBS)\u0026mdash;were significantly elevated in the insulin-dependent group, reflecting poorer metabolic regulation and heightened insulin dependency. These findings emphasize the importance of these clinical and demographic variables in predicting insulin dependency and justify their inclusion as key features in the machine learning models developed herein (Table\u0026nbsp;\u003cspan refid=\"Tab1\" class=\"InternalRef\"\u003e1\u003c/span\u003e).\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab2\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 2\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eDemographic and Clinical Characteristics of Diabetic Patients by Insulin Dependency\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"4\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e\u0026nbsp;\u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003eInsulin dependent (n\u0026thinsp;=\u0026thinsp;54)\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003eNon-insulin dependent (n\u0026thinsp;=\u0026thinsp;46)\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eAGE\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e55.5\u0026thinsp;\u0026plusmn;\u0026thinsp;7\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e54.4\u0026thinsp;\u0026plusmn;\u0026thinsp;10\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e2\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eGENDER\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e\u0026nbsp;\u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e\u0026nbsp;\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eMale\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e74%\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e47%\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e\u0026nbsp;\u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eFemale\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e26%\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e53%\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e3\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eHIEGHT\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e170.4\u0026thinsp;\u0026plusmn;\u0026thinsp;5\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e167.2\u0026thinsp;\u0026plusmn;\u0026thinsp;7\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e4\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eWEIGHT\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e76.3\u0026thinsp;\u0026plusmn;\u0026thinsp;13\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e74\u0026thinsp;\u0026plusmn;\u0026thinsp;9\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e5\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eBMI\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e26.8\u0026thinsp;\u0026plusmn;\u0026thinsp;2\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e25.8\u0026thinsp;\u0026plusmn;\u0026thinsp;2\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e6\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eSMOKING\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e21%\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e8%\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e7\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eALOCHOLIC\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e33%\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e34%\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e8\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eDM YEARS\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e9\u0026thinsp;\u0026plusmn;\u0026thinsp;9\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e4\u0026thinsp;\u0026plusmn;\u0026thinsp;3\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e9\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eHBA1C\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e8\u0026thinsp;\u0026plusmn;\u0026thinsp;1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e7\u0026thinsp;\u0026plusmn;\u0026thinsp;1\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e10\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003eFBS\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e203\u0026thinsp;\u0026plusmn;\u0026thinsp;65\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e160\u0026thinsp;\u0026plusmn;\u0026thinsp;56\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003e11\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003ePPBS\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003e252\u0026thinsp;\u0026plusmn;\u0026thinsp;68\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e197\u0026thinsp;\u0026plusmn;\u0026thinsp;57\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec8\" class=\"Section2\"\u003e \u003ch2\u003e3.2 Exploratory Data Analysis (EDA)\u003c/h2\u003e \u003cp\u003eExploratory analyses were performed to examine feature distributions and relationships. A Pearson correlation heatmap (Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e) highlighted strong positive correlations among glycemic variables (HbA1c, FBS, PPBS) and moderate associations between BMI and weight, with no evidence of perfect collinearity, supporting the inclusion of all features in the models. Further, a pair plot (Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e) illustrated that insulin-dependent patients clustered at higher values of glycemic markers and had longer disease duration, while male predominance was consistent with demographic data \u003csup\u003e\u003cspan citationid=\"CR25\" class=\"CitationRef\"\u003e25\u003c/span\u003e\u003c/sup\u003e. Distribution assessments confirmed mostly normal or mildly skewed variables with clinically representative outliers. These insights guided robust feature selection for modeling.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec9\" class=\"Section2\"\u003e \u003ch2\u003e3.3 Model Training and Performance Comparison\u003c/h2\u003e \u003cp\u003eSix machine learning models were developed and evaluated for insulin dependency prediction: Random Forest, Logistic Regression, XGBoost, LightGBM, a Voting Ensemble of all four, and an Averaged Ensemble combining Random Forest and LightGBM. Training used an 80\u0026thinsp;\u0026minus;\u0026thinsp;20 stratified split with hyperparameter tuning via cross-validation. Model performance on the test set is detailed in Table\u0026nbsp;\u003cspan refid=\"Tab3\" class=\"InternalRef\"\u003e3\u003c/span\u003e.\u003c/p\u003e \u003cp\u003eThe Random Forest classifier achieved an accuracy of 85% with an AUC of 0.9396, showing balanced precision and recall across classes. Logistic Regression matched accuracy (85%) but had lower AUC (0.8462) and recall for insulin-dependent patients, reflecting a conservative prediction bias. XGBoost yielded accuracy of 85% and AUC of 0.8901, leveraging gradient boosting for minority class detection. LightGBM outperformed single models with 90% accuracy and AUC of 0.9341, achieving F1-scores of 0.917 and 0.875 for non-insulin and insulin classes, respectively. Both ensemble approaches (Voting and Averaged) maintained this superior performance, highlighting the benefits of combining classifiers. Confusion matrices in Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003e visualize these results, confirming robust class-specific predictions. Figure\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003e further illustrates LightGBM\u0026rsquo;s learning curve, ROC curve, and feature importance, emphasizing its predictive stability and interpretability.\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab3\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 3\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003ePerformance metrics of machine learning models trained to predict insulin dependency in diabetic patients.\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"9\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c6\" colnum=\"6\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c7\" colnum=\"7\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c8\" colnum=\"8\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c9\" colnum=\"9\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eIndex\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003eAccuracy\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003eAUC\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003ePrecision (No Insulin)\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c5\"\u003e \u003cp\u003eRecall (No Insulin)\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c6\"\u003e \u003cp\u003eF1-score (No Insulin)\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c7\"\u003e \u003cp\u003ePrecision (Needs Insulin)\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c8\"\u003e \u003cp\u003eRecall (Needs Insulin)\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c9\"\u003e \u003cp\u003eF1-score (Needs Insulin)\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eRandom Forest\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.85\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.9396\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e0.9167\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.8462\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.88\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e0.75\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c8\"\u003e \u003cp\u003e0.8571\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e \u003cp\u003e0.8\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eLogistic Regression\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.85\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.8462\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.7692\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.8696\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e0.7\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c8\"\u003e \u003cp\u003e1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e \u003cp\u003e0.8235\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eXGBoost\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.85\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.8901\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e0.9167\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.8462\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.88\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e0.75\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c8\"\u003e \u003cp\u003e0.8571\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e \u003cp\u003e0.8\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eLightGBM\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.9\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.9341\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.8462\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.9167\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e0.7778\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c8\"\u003e \u003cp\u003e1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e \u003cp\u003e0.875\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eVoting Ensemble\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.9\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.9341\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.8462\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.9167\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e0.7778\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c8\"\u003e \u003cp\u003e1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e \u003cp\u003e0.875\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eAveraged Model (RF\u0026thinsp;+\u0026thinsp;LGBM)\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0.9\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e0.9341\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003e1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.8462\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.9167\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e0.7778\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c8\"\u003e \u003cp\u003e1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c9\"\u003e \u003cp\u003e0.875\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec10\" class=\"Section2\"\u003e \u003ch2\u003e3.4 Model Interpretation and Feature Importance\u003c/h2\u003e \u003cp\u003eFeature importance analysis derived from the LightGBM model (Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003eC) identified glycated hemoglobin (HbA1c) as the most influential predictor of insulin dependency, followed by fasting blood sugar (FBS), postprandial blood sugar (PPBS), and diabetes duration. These results are consistent with clinical understanding of glycemic control and disease progression \u003csup\u003e\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e\u003c/sup\u003e. Variables such as body mass index (BMI), age, weight, and height exhibited moderate influence, whereas smoking and alcohol consumption contributed less substantially. The receiver operating characteristic (ROC) curve (Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003eB) demonstrates robust discriminatory capability with an area under the curve (AUC) of 0.9341. Furthermore, the learning curve (Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003eA) reflects stable model training without signs of overfitting, indicating effective generalization \u003csup\u003e\u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e23\u003c/span\u003e\u003c/sup\u003e. Collectively, these findings support the model\u0026rsquo;s clinical relevance and reliability as a decision support tool.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec11\" class=\"Section2\"\u003e \u003ch2\u003e3.5 Model Comparison and Selection\u003c/h2\u003e \u003cp\u003eComprehensive comparison across metrics (Table\u0026nbsp;\u003cspan refid=\"Tab3\" class=\"InternalRef\"\u003e3\u003c/span\u003e) revealed that LightGBM and ensemble methods consistently outperformed simpler models in accuracy, AUC, precision, recall, and F1-score. Given its competitive performance, interpretability, efficient training, and ease of deployment, LightGBM was selected as the final model for clinical application. Although Voting and Averaged ensembles matched LightGBM in accuracy and AUC, the single LightGBM model offered streamlined integration and maintenance advantages.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec12\" class=\"Section2\"\u003e \u003ch2\u003e3.6 Deployment and Interface Testing\u003c/h2\u003e \u003cp\u003eThe LightGBM model was deployed as an interactive web application using the Gradio framework and hosted on Hugging Face Spaces \u003csup\u003e\u003cspan citationid=\"CR24\" class=\"CitationRef\"\u003e24\u003c/span\u003e\u003c/sup\u003e. The user interface (Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003e) enables clinicians and users to input relevant clinical and demographic variables\u0026mdash;including age, gender, anthropometric measurements, glycemic markers, lifestyle factors, and diabetes duration\u0026mdash;to obtain real-time predictions of insulin dependency. The deployment pipeline incorporated model serialization via joblib \u003csup\u003e\u003cspan citationid=\"CR21\" class=\"CitationRef\"\u003e21\u003c/span\u003e\u003c/sup\u003e and seamless integration within a user-friendly graphical user interface (GUI) that provides contextual information and necessary disclaimers regarding the experimental nature of the tool.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e"},{"header":"4. Discussion","content":"\u003cp\u003eIn this study, we developed and evaluated multiple machine learning (ML) models to predict insulin dependency in diabetic patients using clinical and demographic features. Among the tested algorithms, the LightGBM model achieved the best predictive performance, with 90% accuracy and an area under the curve (AUC) of 0.9341. Ensemble methods, including a voting ensemble and the averaged model combining Random Forest and LightGBM, also produced comparable results, highlighting the benefits of model integration for enhanced robustness. Key predictors such as glycated hemoglobin (HbA1c), fasting blood sugar (FBS), postprandial blood sugar (PPBS), and diabetes duration aligned with clinical evidence supporting their relevance in insulin therapy decisions \u003csup\u003e\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e,\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e,\u003cspan citationid=\"CR28\" class=\"CitationRef\"\u003e28\u003c/span\u003e\u003c/sup\u003e. LightGBM\u0026rsquo;s performance stems from its advanced gradient boosting framework, which uses histogram-based binning and leaf-wise tree growth to capture complex, non-linear interactions more effectively than traditional models \u003csup\u003e\u003cspan citationid=\"CR22\" class=\"CitationRef\"\u003e22\u003c/span\u003e,\u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e23\u003c/span\u003e\u003c/sup\u003e. Its ability to handle mixed-type features with minimal preprocessing makes it well-suited for real-world healthcare data \u003csup\u003e\u003cspan citationid=\"CR15\" class=\"CitationRef\"\u003e15\u003c/span\u003e,\u003cspan citationid=\"CR29\" class=\"CitationRef\"\u003e29\u003c/span\u003e\u003c/sup\u003e. The consistency of top predictive features with known clinical markers enhances both interpretability and model reliability. These findings align with prior research showing strong performance of tree-based models, including Random Forest and gradient boosting, in diabetes prediction tasks \u003csup\u003e\u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e17\u003c/span\u003e,\u003cspan citationid=\"CR30\" class=\"CitationRef\"\u003e30\u003c/span\u003e\u003c/sup\u003e. Additionally, ensemble learning is known to reduce bias and variance, improving generalizability and model stability \u003csup\u003e\u003cspan citationid=\"CR16\" class=\"CitationRef\"\u003e16\u003c/span\u003e\u003c/sup\u003e.\u003c/p\u003e \u003cp\u003eClinically, the developed model presents a promising tool for early identification of patients likely to require insulin therapy. Accurate prediction can support timely intervention, optimize treatment strategies, and improve long-term outcomes \u003csup\u003e\u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e,\u003cspan citationid=\"CR31\" class=\"CitationRef\"\u003e31\u003c/span\u003e\u003c/sup\u003e. Deployment via an interactive web interface enhances clinical accessibility and facilitates integration into workflows for rapid risk assessment \u003csup\u003e\u003cspan citationid=\"CR24\" class=\"CitationRef\"\u003e24\u003c/span\u003e,\u003cspan citationid=\"CR32\" class=\"CitationRef\"\u003e32\u003c/span\u003e\u003c/sup\u003e. The inclusion of model interpretability features, such as feature importance, contributes to transparency\u0026mdash;crucial for building clinical trust in AI systems \u003csup\u003e\u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e14\u003c/span\u003e,\u003cspan citationid=\"CR33\" class=\"CitationRef\"\u003e33\u003c/span\u003e,\u003cspan citationid=\"CR34\" class=\"CitationRef\"\u003e34\u003c/span\u003e\u003c/sup\u003e. Nonetheless, several limitations must be acknowledged. The dataset originated from a single institution and was modest in size, potentially limiting generalizability across populations \u003csup\u003e\u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e20\u003c/span\u003e,\u003cspan citationid=\"CR35\" class=\"CitationRef\"\u003e35\u003c/span\u003e\u003c/sup\u003e. Class imbalance between insulin-dependent and non-insulin-dependent cases may have influenced training, despite the use of stratified sampling \u003csup\u003e\u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e19\u003c/span\u003e\u003c/sup\u003e. Moreover, the model has not undergone external validation or prospective testing\u0026mdash;essential steps to confirm its effectiveness and safety in clinical practice. Future efforts should focus on expanding the dataset to include multi-center, ethnically diverse cohorts to improve robustness and generalizability. Integration with electronic health record (EHR) systems and real-time validation would offer practical insights into clinical impact \u003csup\u003e\u003cspan citationid=\"CR36\" class=\"CitationRef\"\u003e36\u003c/span\u003e\u003c/sup\u003e. Exploring advanced modeling approaches, such as deep learning or hybrid architectures, may further enhance performance. Ongoing monitoring for fairness, bias, and interpretability remains essential to ensure ethical deployment in varied clinical settings \u003csup\u003e\u003cspan citationid=\"CR34\" class=\"CitationRef\"\u003e34\u003c/span\u003e,\u003cspan citationid=\"CR37\" class=\"CitationRef\"\u003e37\u003c/span\u003e\u003c/sup\u003e.\u003c/p\u003e"},{"header":"5. Conclusion","content":"\u003cp\u003eIn this study, we developed and rigorously evaluated several machine learning models to predict insulin dependency in diabetic patients using clinical and demographic data. Results showed that the LightGBM model, along with ensemble methods, delivered the highest accuracy and robustness, underscoring the potential of advanced gradient boosting algorithms in healthcare prediction tasks. The identification of key clinical features\u0026mdash;such as HbA1c, blood glucose levels, and duration of diabetes\u0026mdash;supports the clinical validity of the models, as these are established markers in diabetes management. Deploying the best-performing model in an interactive web-based application demonstrates its practical utility, enabling clinicians to make data-driven decisions for early intervention and personalized care. Although the findings are promising, further validation using larger, more diverse populations is necessary before clinical implementation. Overall, this work highlights the potential of machine learning to augment clinical decision-making and improve diabetes care by facilitating timely identification of patients likely to require insulin therapy. Ongoing efforts to improve model generalizability, interpretability, and integration into healthcare workflows will be essential to fully realize the benefits of AI-driven predictive tools in medicine.\u003c/p\u003e"},{"header":"Abbreviations","content":"\u003cp\u003eHbA1c, glycated hemoglobin; ML, machine learning; FBS, fasting blood sugar; PPBS, postprandial blood sugar; EDA, Exploratory Data Analysis; BMI, body mass index; ROC, receiver operating characteristic; AUC, area under the curve; GUI, graphical user interface; HER, electronic health record\u003c/p\u003e"},{"header":"Declarations","content":"\u003cp\u003eI hereby declare that this submission is entirely my own work, in my own words, and that all sources used in researching it are fully acknowledged and all quotations properly identified.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eStatement of Informed Consent\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThere are no human subjects in this article and informed consent is not applicable.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eConsent to Publication\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eAll the authors have read and agreed to the final copy of the finding as contained in the manuscript.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAvailability of data and materials\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe datasets/information used for this study is available on reasonable request to the corresponding authors.\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eConflicting interest\u0026nbsp;\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eAll authors report that there was no conflict of interest in this work.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eFunding\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe author(s) received no specific funding for this work.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eEthical approval\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThis study was conducted in accordance with the ethical principles outlined in the Declaration of Helsinki and the Indian Council of Medical Research (ICMR) guidelines. Ethical approval was obtained from the Institutional Ethics Committee for Biomedical and Health Research, Malla Reddy Institute of Medical Sciences, Hyderabad, India (Approval No: MRIMS/DHR-Msc-CREM-4024/176). All participants provided informed consent before data collection, and all data were anonymized to ensure participant confidentiality.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAuthor Contribution Statement\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eOPD, SPNB and VKY contributed to the study\u0026apos;s ideation, data analysis, and drafting of the original manuscript. MV was responsible for data collection, curation, and interpretation. BVSL and MAU provided supervision and contributed to the drafting and refinement of the manuscript. AS supported the project by providing resources, supervision, and critical review. VKY and SPNB additionally led the conceptualization and methodology design of the study.\u0026nbsp;The authors read and approved the final manuscript.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAcknowledgement\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe authors are thankful to Kampala International University and Malla Reddy group of institutions for providing the necessary facilities to conduct this research work.\u0026nbsp;\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n\u003cli\u003eElSayed, N. A. \u003cem\u003eet al.\u003c/em\u003e Classification and Diagnosis of Diabetes: \u003cem\u003eStandards of Care in Diabetes\u0026mdash;2023\u003c/em\u003e. \u003cem\u003eDiabetes Care\u003c/em\u003e \u003cstrong\u003e46\u003c/strong\u003e, S19\u0026ndash;S40 (2023).\u003c/li\u003e\n\u003cli\u003eMagliano, D. J., Boyko, E. J., \u0026amp; IDF Diabetes Atlas 10th edition scientific committee. \u003cem\u003eIDF DIABETES ATLAS\u003c/em\u003e. (International Diabetes Federation, Brussels, 2021).\u003c/li\u003e\n\u003cli\u003eDeFronzo, R. A. Pathogenesis of type 2 diabetes mellitus. \u003cem\u003eMed Clin North Am\u003c/em\u003e \u003cstrong\u003e88\u003c/strong\u003e, 787\u0026ndash;835, ix (2004).\u003c/li\u003e\n\u003cli\u003eNathan, D. M. \u003cem\u003eet al.\u003c/em\u003e Medical Management of Hyperglycemia in Type 2 Diabetes: A Consensus Algorithm for the Initiation and Adjustment of Therapy. \u003cem\u003eDiabetes Care\u003c/em\u003e \u003cstrong\u003e32\u003c/strong\u003e, 193\u0026ndash;203 (2009).\u003c/li\u003e\n\u003cli\u003eStratton, I. M. Association of glycaemia with macrovascular and microvascular complications of type 2 diabetes (UKPDS 35): prospective observational study. \u003cem\u003eBMJ\u003c/em\u003e \u003cstrong\u003e321\u003c/strong\u003e, 405\u0026ndash;412 (2000).\u003c/li\u003e\n\u003cli\u003eInzucchi, S. E. \u003cem\u003eet al.\u003c/em\u003e Management of Hyperglycemia in Type 2 Diabetes: A Patient-Centered Approach. \u003cem\u003eDiabetes Care\u003c/em\u003e \u003cstrong\u003e35\u003c/strong\u003e, 1364\u0026ndash;1379 (2012).\u003c/li\u003e\n\u003cli\u003eKavakiotis, I. \u003cem\u003eet al.\u003c/em\u003e Machine Learning and Data Mining Methods in Diabetes Research. \u003cem\u003eComputational and Structural Biotechnology Journal\u003c/em\u003e \u003cstrong\u003e15\u003c/strong\u003e, 104\u0026ndash;116 (2017).\u003c/li\u003e\n\u003cli\u003eWoldaregay, A. Z. \u003cem\u003eet al.\u003c/em\u003e Data-driven modeling and prediction of blood glucose dynamics: Machine learning applications in type 1 diabetes. \u003cem\u003eArtif Intell Med\u003c/em\u003e \u003cstrong\u003e98\u003c/strong\u003e, 109\u0026ndash;134 (2019).\u003c/li\u003e\n\u003cli\u003eEsteva, A. \u003cem\u003eet al.\u003c/em\u003e A guide to deep learning in healthcare. \u003cem\u003eNat Med\u003c/em\u003e \u003cstrong\u003e25\u003c/strong\u003e, 24\u0026ndash;29 (2019).\u003c/li\u003e\n\u003cli\u003eGanie, S. M., Malik, M. B. \u0026amp; Arif, T. Performance analysis and prediction of type 2 diabetes mellitus based on lifestyle data using machine learning approaches. \u003cem\u003eJ Diabetes Metab Disord\u003c/em\u003e \u003cstrong\u003e21\u003c/strong\u003e, 339\u0026ndash;352 (2022).\u003c/li\u003e\n\u003cli\u003eJoshi, R. D. \u0026amp; Dhakal, C. K. Predicting Type 2 Diabetes Using Logistic Regression and Machine Learning Approaches. \u003cem\u003eIJERPH\u003c/em\u003e \u003cstrong\u003e18\u003c/strong\u003e, 7346 (2021).\u003c/li\u003e\n\u003cli\u003eChen, T. \u0026amp; Guestrin, C. XGBoost: A Scalable Tree Boosting System. in \u003cem\u003eProceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining\u003c/em\u003e 785\u0026ndash;794 (ACM, San Francisco California USA, 2016). doi:10.1145/2939672.2939785.\u003c/li\u003e\n\u003cli\u003eKe, G. \u003cem\u003eet al.\u003c/em\u003e \u003cem\u003eLightGBM: A Highly Efficient Gradient Boosting Decision Tree\u003c/em\u003e. (2017).\u003c/li\u003e\n\u003cli\u003eSingh, A. \u003cem\u003eet al.\u003c/em\u003e eDiaPredict: An Ensemble-based Framework for Diabetes Prediction. \u003cem\u003eACM Trans. Multimedia Comput. Commun. Appl.\u003c/em\u003e \u003cstrong\u003e17\u003c/strong\u003e, 1\u0026ndash;26 (2021).\u003c/li\u003e\n\u003cli\u003eHasan, M. \u0026amp; Yasmin, F. Predicting Diabetes Using Machine Learning: A Comparative Study of Classifiers. Preprint at https://doi.org/10.48550/ARXIV.2505.07036 (2025).\u003c/li\u003e\n\u003cli\u003eGanie, S. M., Pramanik, P. K. D., Bashir Malik, M., Mallik, S. \u0026amp; Qin, H. An ensemble learning approach for diabetes prediction using boosting techniques. \u003cem\u003eFront Genet\u003c/em\u003e \u003cstrong\u003e14\u003c/strong\u003e, 1252159 (2023).\u003c/li\u003e\n\u003cli\u003eRokach, L. Ensemble-based classifiers. \u003cem\u003eArtif Intell Rev\u003c/em\u003e \u003cstrong\u003e33\u003c/strong\u003e, 1\u0026ndash;39 (2010).\u003c/li\u003e\n\u003cli\u003eMahesh, T. R. \u003cem\u003eet al.\u003c/em\u003e Blended Ensemble Learning Prediction Model for Strengthening Diagnosis and Treatment of Chronic Diabetes Disease. \u003cem\u003eComputational Intelligence and Neuroscience\u003c/em\u003e \u003cstrong\u003e2022\u003c/strong\u003e, 1\u0026ndash;9 (2022).\u003c/li\u003e\n\u003cli\u003eSagi, O. \u0026amp; Rokach, L. Ensemble learning: A survey. \u003cem\u003eWIREs Data Min \u0026amp; Knowl\u003c/em\u003e \u003cstrong\u003e8\u003c/strong\u003e, e1249 (2018).\u003c/li\u003e\n\u003cli\u003eDing, T. \u003cem\u003eet al.\u003c/em\u003e Application of machine learning algorithm incorporating dietary intake in prediction of gestational diabetes mellitus. \u003cem\u003eEndocrine Connections\u003c/em\u003e \u003cstrong\u003e13\u003c/strong\u003e, e240169 (2024).\u003c/li\u003e\n\u003cli\u003ePedregosa, F. \u003cem\u003eet al.\u003c/em\u003e Scikit-learn: Machine Learning in Python. \u003cem\u003eJournal of Machine Learning Research\u003c/em\u003e \u003cstrong\u003e12\u003c/strong\u003e, (2012).\u003c/li\u003e\n\u003cli\u003eFlorek, P. \u0026amp; Zagdański, A. Benchmarking state-of-the-art gradient boosting algorithms for classification. Preprint at https://doi.org/10.48550/ARXIV.2305.17094 (2023).\u003c/li\u003e\n\u003cli\u003eZhang, Z., Zhang, T. \u0026amp; Li, J. Unbiased Gradient Boosting Decision Tree with Unbiased Feature Importance. Preprint at https://doi.org/10.48550/ARXIV.2305.10696 (2023).\u003c/li\u003e\n\u003cli\u003eAbid, A. \u003cem\u003eet al.\u003c/em\u003e Gradio: Hassle-Free Sharing and Testing of ML Models in the Wild. Preprint at https://doi.org/10.48550/ARXIV.1906.02569 (2019).\u003c/li\u003e\n\u003cli\u003eKautzky-Willer, A., Harreiter, J. \u0026amp; Pacini, G. Sex and Gender Differences in Risk, Pathophysiology and Complications of Type 2 Diabetes Mellitus. \u003cem\u003eEndocrine Reviews\u003c/em\u003e \u003cstrong\u003e37\u003c/strong\u003e, 278\u0026ndash;316 (2016).\u003c/li\u003e\n\u003cli\u003eBl\u0026uuml;her, M. Obesity: global epidemiology and pathogenesis. \u003cem\u003eNat Rev Endocrinol\u003c/em\u003e \u003cstrong\u003e15\u003c/strong\u003e, 288\u0026ndash;298 (2019).\u003c/li\u003e\n\u003cli\u003ePan, A., Wang, Y., Talaei, M. \u0026amp; Hu, F. B. Relation of Smoking With Total Mortality and Cardiovascular Events Among Patients With Diabetes Mellitus: A Meta-Analysis and Systematic Review. \u003cem\u003eCirculation\u003c/em\u003e \u003cstrong\u003e132\u003c/strong\u003e, 1795\u0026ndash;1804 (2015).\u003c/li\u003e\n\u003cli\u003eDavies, M. J. \u003cem\u003eet al.\u003c/em\u003e Management of Hyperglycemia in Type 2 Diabetes, 2022. A Consensus Report by the American Diabetes Association (ADA) and the European Association for the Study of Diabetes (EASD). \u003cem\u003eDiabetes Care\u003c/em\u003e \u003cstrong\u003e45\u003c/strong\u003e, 2753\u0026ndash;2786 (2022).\u003c/li\u003e\n\u003cli\u003eRajkomar, A., Dean, J. \u0026amp; Kohane, I. Machine Learning in Medicine. \u003cem\u003eN Engl J Med\u003c/em\u003e \u003cstrong\u003e380\u003c/strong\u003e, 1347\u0026ndash;1358 (2019).\u003c/li\u003e\n\u003cli\u003eContreras, I. \u0026amp; Vehi, J. Artificial Intelligence for Diabetes Management and Decision Support: Literature Review. \u003cem\u003eJ Med Internet Res\u003c/em\u003e \u003cstrong\u003e20\u003c/strong\u003e, e10775 (2018).\u003c/li\u003e\n\u003cli\u003eKawamoto, K., Houlihan, C. A., Balas, E. A. \u0026amp; Lobach, D. F. Improving clinical practice using clinical decision support systems: a systematic review of trials to identify features critical to success. \u003cem\u003eBMJ\u003c/em\u003e \u003cstrong\u003e330\u003c/strong\u003e, 765 (2005).\u003c/li\u003e\n\u003cli\u003eTopol, E. J. High-performance medicine: the convergence of human and artificial intelligence. \u003cem\u003eNat Med\u003c/em\u003e \u003cstrong\u003e25\u003c/strong\u003e, 44\u0026ndash;56 (2019).\u003c/li\u003e\n\u003cli\u003eCaruana, R. \u003cem\u003eet al.\u003c/em\u003e Intelligible Models for HealthCare: Predicting Pneumonia Risk and Hospital 30-day Readmission. in \u003cem\u003eProceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining\u003c/em\u003e 1721\u0026ndash;1730 (ACM, Sydney NSW Australia, 2015). doi:10.1145/2783258.2788613.\u003c/li\u003e\n\u003cli\u003eRudin, C. Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. \u003cem\u003eNat Mach Intell\u003c/em\u003e \u003cstrong\u003e1\u003c/strong\u003e, 206\u0026ndash;215 (2019).\u003c/li\u003e\n\u003cli\u003eBeam, A. L. \u0026amp; Kohane, I. S. Big Data and Machine Learning in Health Care. \u003cem\u003eJAMA\u003c/em\u003e \u003cstrong\u003e319\u003c/strong\u003e, 1317 (2018).\u003c/li\u003e\n\u003cli\u003eJohnson, A. E. W. \u003cem\u003eet al.\u003c/em\u003e MIMIC-III, a freely accessible critical care database. \u003cem\u003eSci Data\u003c/em\u003e \u003cstrong\u003e3\u003c/strong\u003e, 160035 (2016).\u003c/li\u003e\n\u003cli\u003eRajkomar, A., Hardt, M., Howell, M. D., Corrado, G. \u0026amp; Chin, M. H. Ensuring Fairness in Machine Learning to Advance Health Equity. \u003cem\u003eAnn Intern Med\u003c/em\u003e\u003cstrong\u003e169\u003c/strong\u003e, 866\u0026ndash;872 (2018).\u003c/li\u003e\n\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"highlight":"","institution":"","isAcceptedByJournal":true,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"scientific-reports","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"scirep","sideBox":"Learn more about [Scientific Reports](http://www.nature.com/srep/)","snPcode":"","submissionUrl":"","title":"Scientific Reports","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Scientific Reports","inReviewEnabled":true,"inReviewRevisionsEnabled":true},"keywords":"Diabetes, Insulin Dependency, Machine Learning, LightGBM, Ensemble Learning, Predictive Modeling","lastPublishedDoi":"10.21203/rs.3.rs-6831904/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-6831904/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eThis study presents the development and evaluation of machine learning models to predict insulin dependency in diabetic patients using clinical and demographic data. Utilizing a dataset comprising variables such as age, gender, BMI, HbA1c, fasting and postprandial blood sugar levels, smoking and alcohol status, and diabetes duration, we trained six models: Random Forest, Logistic Regression, XGBoost, LightGBM, a Voting Ensemble, and an Averaged Model (Random Forest\u0026thinsp;+\u0026thinsp;LightGBM). The models were assessed using accuracy, AUC, precision, recall, and F1-score. The LightGBM model and ensemble methods achieved the highest performance, each with an accuracy of 90% and an AUC of 0.9341, demonstrating strong predictive ability for both insulin-dependent and non-insulin-dependent groups. Feature importance analysis revealed HbA1c, duration of diabetes, and glucose levels as critical predictors. The most effective model was deployed as an interactive web interface using Gradio on Hugging Face Spaces. Our findings suggest that machine learning, particularly ensemble approaches, can provide valuable tools for early prediction of insulin needs in diabetic patients, supporting clinical decision-making and personalized care strategies.\u003c/p\u003e","manuscriptTitle":"Development of a Machine Learning-Based Interface for Insulin Dependency Prediction Using Clinical Data","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-07-01 09:36:15","doi":"10.21203/rs.3.rs-6831904/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"decision","content":"Revision requested","date":"2025-08-13T06:08:18+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2025-08-07T12:01:39+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2025-08-04T08:15:57+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"235872923607970345301890106489305769307","date":"2025-07-28T13:20:25+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"283775333431455078419943404044416322163","date":"2025-07-23T07:36:10+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2025-07-16T15:53:29+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"140570533074075852721197995342718000475","date":"2025-07-07T11:37:30+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2025-06-26T11:24:34+00:00","index":"","fulltext":""},{"type":"editorInvited","content":"","date":"2025-06-23T09:34:15+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2025-06-08T06:40:54+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2025-06-06T13:01:28+00:00","index":"","fulltext":""},{"type":"submitted","content":"Scientific Reports","date":"2025-06-05T20:36:29+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"scientific-reports","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"scirep","sideBox":"Learn more about [Scientific Reports](http://www.nature.com/srep/)","snPcode":"","submissionUrl":"","title":"Scientific Reports","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Scientific Reports","inReviewEnabled":true,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"01b06744-1218-469e-a2b3-6f7427c8cb0b","owner":[],"postedDate":"July 1st, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"published-in-journal","subjectAreas":[{"id":50635606,"name":"Biological sciences/Biotechnology"},{"id":50635607,"name":"Health sciences/Diseases"},{"id":50635608,"name":"Health sciences/Health care"}],"tags":[],"updatedAt":"2025-11-10T16:04:03+00:00","versionOfRecord":{"articleIdentity":"rs-6831904","link":"https://doi.org/10.1038/s41598-025-22381-9","journal":{"identity":"scientific-reports","isVorOnly":false,"title":"Scientific Reports"},"publishedOn":"2025-11-05 15:57:25","publishedOnDateReadable":"November 5th, 2025"},"versionCreatedAt":"2025-07-01 09:36:15","video":"","vorDoi":"10.1038/s41598-025-22381-9","vorDoiUrl":"https://doi.org/10.1038/s41598-025-22381-9","workflowStages":[]},"version":"v1","identity":"rs-6831904","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-6831904","identity":"rs-6831904","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.