Comparative Analysis of Machine Learning Models for Day-Ahead Electricity Consumption Forecasting in Multi-Unit Residential Buildings in Indonesia's New Capital City
Abstract
Accurate short-term electricity consumption forecasting is important for demand management, energy scheduling, and renewable-energy integration in smart urban environments. This study compares four machine-learning models for dayahead electricity consumption forecasting in multi-unit residential buildings in Nusantara, Indonesia's new capital city. The dataset contains daily metering records from 360 residential units distributed across six towers over 273 calendar days. Historical consumption, building characteristics, calendar variables, temperature, and humidity were transformed into 41 predictors. Ridge Regression, Random Forest, Gradient Boosting, and Light Gradient Boosting Machine (LightGBM) were evaluated against persistence and weekly seasonal-naive baselines. Temporal validity was maintained using chronological training, validation, and testing partitions and a five-fold expanding-window rolling-origin evaluation. A feature-ablation experiment quantified the contributions of calendar and weather information. On the validation period, LightGBM using all feature groups achieved the lowest mean absolute error (MAE) of 3.086 kWh, root mean squared error (RMSE) of 4.628 kWh, symmetric mean absolute percentage error (sMAPE) of $\mathbf{2 1. 4 1 9 \%}$, and $R^{2}$ of $\mathbf{0. 6 3 1}$. On the held-out May-June 2026 test period, it obtained an MAE of 3.606 kWh, RMSE of 5.438 kWh, and $R^{2}$ of 0.621. Across five rolling-origin folds, LightGBM achieved a mean MAE of 3.339 kWh and reduced MAE by 9.16% and 38.97% relative to persistence and seasonal naive, respectively. However, persistence retained a lower mean sMAPE, indicating that model ranking depends on whether absolute or relative error is prioritized. The results support the use of nonlinear global forecasting models as an analytical component for residential energy management in Nusantara.