Improving Postprandial Glucose Forecasting Using Diagnosis-Aware Stacked Learning - Fatma Indriani; Mohammad Reza Faisal; Naufal Said (Kinetik: Game Technology, Information System, Computer Network, Computing, Electronics, and Control, 2026)
Predicting glucose levels after a meal (postprandial glucose) can help anticipate abnormal responses and improve diabetes management. Yet such prediction remains difficult because post-meal glucose depends on multiple interacting factors, including prior glucose trends, meal composition, and recent activity. This study develops machine learning models to forecast short-term post-meal glucose levels using the CGMacros dataset, which combines continuous glucose monitoring (CGM) data from Dexcom and Libre sensors with meal macronutrient annotations and activity measurements. Several feature combinations and regression models were evaluated to identify an optimal representation. Results show that combining baseline glucose statistics with meal composition yields the lowest error across all regressors. Building on this feature configuration, a stacked learning framework was implemented in which a global model provides initial predictions refined by diagnosis-specific CatBoost regressors for Healthy, Pre-diabetes, and Type 2 Diabetes groups. Across 18 configurations spanning two sensors and three horizons (30, 60, 120 minutes), stacking reduced normalized RMSE by 3.5 ± 3.7% on average, with the strongest improvements at 120-minute horizons (mean 5.5%) and for linear global models (up to 13.6% reduction). Gains varied by diagnosis group and sensor type, highlighting the importance of device-aware validation. These results demonstrate that diagnosis-aware stacking enhances both accuracy and robustness, offering a practical foundation for personalized glucose forecasting in digital health systems.