Optimization of Energy Consumption Prediction with Random Forest Regressor and XGBoost Feature Importance
Main Article Content
Abstract
Energy consumption is increasing as industry and technology advance. However, it will have a bad impact if its use is not properly controlled. Therefore, predicting energy consumption is needed to prevent energy waste and to streamline its use across several influencing factors. Predictions are made using the Random Forest Regressor method. Where regression and Random Forest techniques can produce accurate results for continuous values such as total energy consumption. The feature importance method is also used to select the most influential features. Where of the 40 features in the energy consumption dataset in Southern California, only 24 features were selected based on the average threshold of the gain value. The results showed that the use of XGBoost feature importance lowered the Mean Absolute Error (MAE) value of the Random Forest Regressor, which was 16.56 to 16.55. This value is the difference between the actual data and the predicted data. This proves that the model successfully predicts with a small error value. The application of feature importance in energy consumption prediction using Random Forest Regressor is expected to be more efficient in energy consumption, especially in the sectors that most affect the increase in energy consumption.
Article Details

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
References
S. A. Reza et al., “Predicting energy consumption patterns with advanced machine learning techniques for sustainable urban development,” Journal of Computer Science and Technology Studies, vol. 7, no. 1, pp. 265–282, 2025.
R. Chandrasekaran and S. K. Paramasivan, “Advances in deep learning techniques for short-term energy load forecasting applications: A review,” Archives of Computational Methods in Engineering, vol. 32, no. 2, pp. 663–692, 2025.
J. H. Hefni, L. R. Ozzora, F. V. Ferdinand, K. Julita, and A. Ng, “ANALISIS KORELASI ANTARA KONSUMSI ENERGI DAN URBANISASI TERHADAP PERTUMBUHAN MANUFAKTUR,” JMBI UNSRAT (Jurnal Ilmiah Manajemen Bisnis dan Inovasi Universitas Sam Ratulangi)., vol. 12, no. 1, pp. 378–390, Apr. 2025, doi: 10.35794/jmbi.v12i1.61312.
J. Yang, Y. Yu, T. Ma, C. Zhang, and Q. Wang, “Evolution of energy and metal demand driven by industrial revolutions and its trend analysis,” Chinese Journal of Population, Resources and Environment, vol. 19, no. 3, pp. 256–264, Sep. 2021, doi: 10.1016/j.cjpre.2021.12.028.
F. Tarumanegara, H. Sidik, and F. J. Sanjaya, “Performa Produksi Dan Konsumsi Sumber Energi Negara-Negara Dunia Pada Tahun 2001-2022,” Jurnal Terekam Jejak, vol. 2, no. 1, pp. 1–27, 2024.
International Energy Agency, “Global Energy Review 2025,” 2025. [Online]. Available: www.iea.org
McKinsey & Company, “Global Energy Perspective 2025,” 2025. [Online]. Available: https://www.mckinsey.com/
R. N. Sari and Y. P. Sari, “Pengaruh Urbanisasi Terhadap Konsumsi Energi di Indonesia,” Media Riset Ekonomi Pembangunan (MedREP), vol. 2, no. 1, 2025.
S. A. Reza et al., “Predicting energy consumption patterns with advanced machine learning techniques for sustainable urban development,” Journal of Computer Science and Technology Studies, vol. 7, no. 1, pp. 265–282, 2025.
SEDS, “U.S. Energy Information Administration, State energy data system (seds),” https://www.eia.gov/state/seds/sep_fuel/html/pdf/fuel_use_es.
A. Barua et al., “Optimizing energy consumption patterns in southern california: An ai-driven approach to sustainable resource management,” Journal of Ecohumanism, vol. 4, no. 1, pp. 2920–2935, 2025.
S. Hossain et al., “Forecasting Energy Consumption Trends with Machine Learning Models for Improved Accuracy and Resource Management in the USA,” Journal of Business and Management Studies, vol. 7, no. 1, pp. 200–217, 2025.
G. Tao, Q. M. Jiang, and C. Huang, “Guidelines for enhancing the energy performance regarding accessory dwelling units in Southern California,” Journal of Building Engineering, vol. 99, p. 111621, 2025.
R. Qu, R. Kou, and T. Zhang, “The Impact of Weather Variability on Renewable Energy Consumption: Insights from Explainable Machine Learning Models,” Sustainability, vol. 17, no. 1, p. 87, Dec. 2024, doi: 10.3390/su17010087.
A. C. R. Gonçalves, X. Costoya, R. Nieto, and M. L. R. Liberato, “Extreme weather events on energy systems: a comprehensive review on impacts, mitigation, and adaptation measures,” Sustainable Energy Research, vol. 11, no. 1, p. 4, Jan. 2024, doi: 10.1186/s40807-023-00097-6.
D. N. Putri, A. P. Ramadhani, C. P. Manurung, and B. Purba, “Konsep Konsumsi Energi Di Indonesia Serta Menganalisis Keterkaitannya Dengan Emisi Gas Rumah Kaca,” Jurnal Ilmiah Wahana Pendidikan, vol. 10, no. 14, pp. 338–345, 2024.
R. C. Tarumingkeng, “Pengaruh Perubahan Iklim,” 2024.
G. Camps-Valls et al., “Artificial intelligence for modeling and understanding extreme weather and climate events,” Nat. Commun., vol. 16, no. 1, p. 1919, Feb. 2025, doi: 10.1038/s41467-025-56573-8.
S. Stefanidis, K. Ioannou, N. Proutsos, I. Karmiris, and P. Stefanidis, “Comparative Analysis of Machine Learning Algorithms for Potential Evapotranspiration Estimation Using Limited Data at a High-Altitude Mediterranean Forest,” Atmosphere (Basel)., vol. 16, no. 7, p. 851, Jul. 2025, doi: 10.3390/atmos16070851.
A. Prasyas and S. M. Ibrahim, “Integrasi Teknologi AI dalam Perancangan Smart Building: Studi Implementasi dan Efisiensi Energi,” Jurnal Rekayasa Sipil dan Arsitektur, vol. 1, no. 1, pp. 61–72, 2025.
A. Barua et al., “Optimizing energy consumption patterns in southern california: An ai-driven approach to sustainable resource management,” Journal of Ecohumanism, vol. 4, no. 1, pp. 2920–2935, 2025.
N. Ulhasanah, Y. H. Chrisnanto, and J. E. Chrisnanto, “Klasifikasi Multi-Label Jenis dan Warna Buah Menggunakan Convolutional Neural Network (CNN) dengan Encoder Fitur,” TEMATIK, vol. 12, no. 1, pp. 72–80, 2025.
S. Banitaan and H. Alquran, “Improving Suicide Ideation Detection Through Feature Engineering and Machine Learning,” IEEE Access, 2025.
H. Bichri, A. Chergui, and M. Hain, “Investigating the Impact of Train/Test Split Ratio on the Performance of Pre-Trained Models with Custom Datasets.,” International Journal of Advanced Computer Science & Applications, vol. 15, no. 2, 2024.
E. Halabaku and E. Bytyçi, “Overfitting in Machine Learning: A Comparative Analysis of Decision Trees and Random Forests.,” Intelligent Automation & Soft Computing, vol. 39, no. 6, 2024.