International audience
Day-ahead load forecasting is essential for improving residential energy management strategies. This study presents a self-learning system using the Light Gradient Boosting Machine (LightGBM) model within an online learning approach to predict residential electricity consumption. The proposed method addresses concept drift through real-time error tracking and adaptive learning, ensuring sustained predictive accuracy in dynamic environments. By leveraging its efficiency, the system achieves high performance while avoiding the complexity and resource demands typically associated with deep learning models.The forecasting system was deployed in a living lab located in Morocco, integrating both offline and online learning. Throughout a 16-month period, high-resolution, real-time power consumption data was collected. The offline phase involved benchmarking several machine learning models, testing different time resolutions and feature combinations, and identifying the optimal configuration. Hyperparameter tuning was conducted using both Bayesian Optimization (BO) and Particle Swarm Optimization (PSO), with the most effective setup applied in the online phase. The online model operates in real time, automating data collection, prediction, and integration with Home Energy Management Systems, thereby enabling continuous monitoring and adaptation. The LightGBM model consistently achieved R2 scores ranging from 80% to 90%, with PSO providing dynamic fine-tuning of hyperparameters to adapt to changing consumption patterns. To assess generalizability, the model was tested on two external datasets: a public residential dataset and an office building dataset from the ASHRAE Global Occupant Behavior Database. Despite the domain shift, the model maintained strong performance.These findings highlight the system’s robustness and its appropriateness for informed smart energy decision-making.