Enhancing Household Energy Consumption Forecasting Using the XGBoost Algorithm with Cross-Validation and Residual-Based Evaluation
DOI:
https://doi.org/10.47738/ijiis.v8i2.253Keywords:
XGBoost, Energy Forecasting, Cross-Validation, Residual Analysis, Machine Learning, SustainabilityAbstract
Accurate forecasting of household energy consumption plays a crucial role in optimizing energy efficiency, supporting sustainable policy decisions, and improving operational management in smart grid systems. This study enhances conventional XGBoost-based forecasting by integrating cross-validation and residual-based evaluation to ensure model robustness and interpretability. Using a dataset of over 90,000 daily household energy records that include temperature, humidity, and appliance-level usage, a systematic preprocessing pipeline was applied—comprising data cleaning, normalization, temporal feature transformation, and partitioning into training and testing subsets. The proposed model was trained using 10-fold cross-validation to minimize overfitting and validated through residual error analysis to assess stability and bias. Evaluation metrics, including Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and the coefficient of determination (R²), demonstrate superior predictive accuracy, achieving MAE = 0.48, RMSE = 0.64, and R² = 0.9864. Visualization of actual versus predicted consumption and symmetric residual distribution further confirm the model’s reliability. The findings highlight that the enhanced XGBoost model not only achieves high precision but also provides a robust foundation for real-time energy monitoring, anomaly detection, and sustainable household energy management. Future work will integrate SHAP-based interpretability and comparative benchmarking with deep learning approaches.References
Lucia Cascone, Saima Sadiq, Saleem Ullah, Seyedali Mirjalili, Hafeez Ur Rehman Siddiqui, and Muhammad Umer, “Memprediksi Konsumsi Daya Listrik Rumah Tangga Menggunakan Rangkaian Waktu Multi-langkah dengan LSTM Konvolusional,” Penelitian Data Besar, vol. 31, no. 100360, Feb. 2023.
N. Shaukat et al., “Decentralized, Democratized, and Decarbonized Future Electric Power Distribution Grids: A Survey on the Paradigm Shift From the Conventional Power System to Micro Grid Structures,” 2023, Institute of Electrical and Electronics Engineers Inc. doi: 10.1109/ACCESS.2023.3284031.
V. Raviprabhakaran, P. Pranay, B. Nendralla, and L. S. Pranay, “Household Power Consumption Analysis using Machine Learning,” in 2024 IEEE 4th International Conference on Sustainable Energy and Future Electric Transportation, SEFET 2024, Institute of Electrical and Electronics Engineers Inc., 2024. doi: 10.1109/SEFET61574.2024.10718254.
V. Sharma, “Exploring the Predictive Power of Machine Learning for Energy Consumption in Buildings,” 2020. [Online]. Available: http://jtipublishing.com/jti
Samharison, “Konsumsi Energi Rumah Tangga,” Kaggle. Accessed: May 04, 2025. [Online]. Available: https://www.kaggle.com/datasets/samxsam/household-energy-consumption
T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” in Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, New York, NY, USA: ACM, Aug. 2016, pp. 785–794. doi: 10.1145/2939672.2939785.
Y. Himeur, K. Ghanem, A. Alsalemi, F. Bensaali, and A. Amira, “Artificial intelligence based anomaly detection of energy consumption in buildings: A review, current trends and new perspectives,” Appl Energy, vol. 287, p. 116601, Apr. 2021, doi: 10.1016/j.apenergy.2021.116601.
M. I. Jordan and T. M. Mitchell, “Machine learning: Trends, perspectives, and prospects,” Science (1979), vol. 349, no. 6245, pp. 255–260, Jul. 2015, doi: 10.1126/science.aaa8415.
Rob J Hyndman and George Athanasopoulos, Forecasting: Principles and Practice, 2nd ed. Australia: Monash University, 2018.
Shalev Shwartz and Ben David, Understanding Machine Learning: From Theory to Algorithms. New York, 2014.
J. D. Kelleher, B. Namee, and A. D’Arcy, “Fundamentals of machine learning for predictive data analytics: Algorithms, worked examples, and case studies. MIT Press.,” 2015.
P. Domingos, “A few useful things to know about machine learning,” Commun ACM, vol. 55, no. 10, pp. 78–87, Oct. 2012, doi: 10.1145/2347736.2347755.
Xuetao Li, Ziwei Wang, Chengying Yang, and Ayhan Bozkurt, “An advanced framework for net electricity consumption prediction: Incorporating novel machine learning models and optimization algorithms,” Energy, vol. 296, no. 131259, Jun. 2024.
I. V. Hume, D. M. Summers, and T. R. Cavagnaro, “Self-sufficiency through urban agriculture: Nice idea or plausible reality?,” Sustain Cities Soc, vol. 68, p. 102770, May 2021, doi: 10.1016/j.scs.2021.102770.
T. Ahmad, H. Chen, and Y. Huang, “Short-Term Energy Prediction for District-Level Load Management Using Machine Learning Based Approaches,” Energy Procedia, vol. 158, pp. 3331–3338, Feb. 2019, doi: 10.1016/j.egypro.2019.01.967.
D. Tsimpoukis et al., “Energy and environmental investigation of R744 all-in-one configurations for refrigeration and heating/air conditioning needs of a supermarket,” J Clean Prod, vol. 279, p. 123234, Jan. 2021, doi: 10.1016/j.jclepro.2020.123234.
M. W. Ahmad, M. Mourshed, and Y. Rezgui, “Trees vs Neurons: Comparison between random forest and ANN for high-resolution prediction of building energy consumption,” Energy Build, vol. 147, pp. 77–89, Jul. 2017, doi: 10.1016/j.enbuild.2017.04.038.
A. K. Sleiti and W. A. Al-Ammari, “Novel integration between propane pre-cooled mixed refrigerant LNG process and concentrated solar power system based on supercritical CO2 power cycle,” Energy Reports, vol. 9, pp. 4872–4892, Dec. 2023, doi: 10.1016/j.egyr.2023.04.012.
S. Vögele, M. Grajewski, K. Govorukha, and D. Rübbelke, “Challenges for the European steel industry: Analysis, possible consequences and impacts on sustainable development,” Appl Energy, vol. 264, p. 114633, Apr. 2020, doi: 10.1016/j.apenergy.2020.114633.
L. Yang et al., “A comprehensive review on sub-zero temperature cold thermal energy storage materials, technologies, and applications: State of the art and recent developments,” Appl Energy, vol. 288, p. 116555, Apr. 2021, doi: 10.1016/j.apenergy.2021.116555.
Ga Young Lee, Bakhtiyar Doskenov, and Lubna Alzamil, “A Survey on Data Cleaning Methods for Improved Machine Learning Model Performance,” Sep. 2021.
Downloads
Published
Issue
Section
License
Authors who publish with IJIIS : International Journal on Informatics and Information Systems agree to the following terms: Authors retain copyright and grant the IJIIS : International Journal on Informatics and Information Systems right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (CC BY-SA 4.0) that allows others to share (copy and redistribute the material in any medium or format) and adapt (remix, transform, and build upon the material) the work for any purpose, even commercially with an acknowledgement of the work's authorship and initial publication in IJIIS : International Journal on Informatics and Information Systems. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in IJIIS : International Journal on Informatics and Information Systems. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).

