Penerapan Algoritma Random Forest Classifier dan Regressor untuk Analisis Prediksi Efisiensi Energi Listrik
Abstract
Efficiency of electricity consumption in the domestic sector is one of the main challenges in smart energy management. This study applies a machine learning algorithm based on Random Forest to analyze and predict energy consumption patterns using the UCI Household Power Consumption dataset. The research methodology involves intensive feature engineering stages, including cleaning missing values, numeric data type conversion, and extracting a new feature named energy_usage. The testing was conducted through two main scenarios: a classification scenario using the Random Forest Classifier with a waste threshold of 3.0 kW, and a regression scenario using the Random Forest Regressor to predict the real value of active power based on the physical parameters of Voltage and Global_intensity. The experimental results demonstrate a highly precise model performance, where the classification model successfully achieved an accuracy rate of 100.00%. Meanwhile, the regression model yielded highly accurate predictions with an R-Squared (R2 Score) value of 99.73% and a Mean Absolute Error (MAE) of 0.0367 kW. Feature importance analysis confirms that the Global_active_power and energy_usage features are the most dominant contributors to determining load status. These results prove that the Random Forest algorithm approach is highly effective and reliable for integration into data-driven smart energy monitoring.
References
al., J. K. e. (2023). Data-driven analytics for residential electricity consumption profiling. IEEE Transactions on Smart Grid, 14, 1245–1256.
Azzahrah, A. S., & Pratama, M. R. (2026). Analisis Komparatif Klasifikasi Beban Listrik Rumah Tangga Menggunakan Algoritma Ensemble Learning Berbasis IoT. JURTIE (Jurnal Teknologi Informasi dan Telekomunikasi), 8, 45–56.
Chicco, G., Guerrero, J. I., & Quijano, A. (2022). Benchmarking of Load Forecasting Methods Using Residential Smart Meter Data. Applied Sciences, 12(19). doi:https://doi.org/10.1999-4893/19/2/114
de la Torre, M. J., Palomares, J. M., & Gomez, J. M. (2026). Classifying and Predicting Household Energy Consumption Using Data Analytics and Machine Learning. Algorithms, 19(2).
Demirkadir, K. (2024). Energy Consumption Feature Engineering Dataset and Analytics. Kaggle Dataset Repository. Retrieved from https://www.kaggle.com/code/demirkadir04/energy-consumption-feature-engineering
Demirkadir, K. C. (2024). Feature engineering and selection methods on UCI household power consumption dataset using tree-based algorithms. Applied Soft Computing, 152.
El-Amin, A. Y. A.-Q. a. I. M. (2022). Smart energy management systems for residential buildings: A review of machine learning applications. IEEE Access, 10, 54321–54338.
F. Martinez-Plumed, L. C.-O., C. Ferri, J. H. Orallo, M. Kull, N. C. Quintana, and P. Flach. (2022). CRISP-DM twenty years later: From data mining processes to data science practices. IEEE Transactions on Knowledge and Data Engineering, 34, 3054–3067.
Gholamy, A., Kreinovich, V., & Olaya, C. (2023). Why 80:20 is a good choice for data splitting in machine learning: A theoretical justification. Journal of Computer and System Sciences, 112, 45-53.
Heriberto J. Jara Ochoa, e. a. (2023). Comparative Analysis of Power Consumption between MQTT and HTTP Protocols in an IoT Platform Designed and Implemented for Remote Real-Time Monitoring of Long-Term Cold Chain Transport Operations. MDPI, 23(10). doi:10.3390/s23104896
Hidayat, I. S. a. T. (2025). Implementasi Algoritma Random Forest Regressor untuk Prediksi Konsumsi Energi Real-Time Berbasis Protokol Komunikasi Pintar. JURTIE (Jurnal Teknologi Informasi dan Telekomunikasi), 7, 112-123.
Lestari, D., & Hidayat, T. (2025). Klasifikasi Status Penggunaan Daya Listrik Rumah Tangga Menggunakan Algoritma Ensemble Learning. Jurnal Teknologi Dan Sistem Komputer,, 13, 32–41.
Li, Y. Z. a. X. (2025). Evaluating evaluation metrics: A comprehensive review of classification and regression validation in energy informatics. Energy and AI, 19.
M. Massaoudi, H. A.-R., S. S. Refaat, I. Chihi, and F. S. Oueslati. (2023). Deep learning-based forecasting model for household power consumption grid. IEEE Access, 11, 23412–23427.
Ramadhan, A. R. P. a. F. (2024). Penerapan Metode Random Forest Regressor untuk Estimasi Konsumsi Energi Listrik Berbasis IoT. Jurnal Rekayasa Elektrika, 20, 75-84.
Rochayati, R., Rahman Abdillah, R., Mauludia, I., & Saputri, E. (2025). Klasifikasi Pola Konsumsi Energi Rumah Tangga Menggunakan Algoritma Machine Learning untuk Mendukung Implementasi Smart City. METHOMIKA: Jurnal Manajemen Informatika & Komputerisasi Akuntansi, 9(2), 145-152.
Samsinar, R., & Samudra, R. B. (2026). Rancang Bangun Supply Air PDAM Dihunian Indekos Berbasis Internet of Things (IoT). RESISTOR (Elektronika Kendali Telekomunikasi Tenaga Listrik Komputer), 9, 1-8.
Sharma, S., Kumar, A., & Singh, V. (2025). PowerPredict: Smarter Household Energy Forecasting. International Journal of Innovative Science and Research Technology, 10(11), 892-899. doi:https://doi.org/10.38124/ijisrt/IJISRT25OCT1553
Shinde, P. P. (2024). Comparative analysis of ensemble learning models for short-term household load forecasting. Energy and Buildings, 305.
Shinde, S. S., Patil, S. D., & Deshmukh, V. M. (2024). Household power consumption forecasting using advanced ensemble learning approach. nternational Journal of Intelligent Systems and Applications in Engineering, 12, 410-419.
Syafwan, M. F. N., Rizran, M. R. M., & Harun, A. N. (2023). Smart home energy management system using machine learning algorithms: A review. Journal of Advanced Research in Applied Sciences and Engineering Technology, 31, 112-125.
Tan, J., & Zhang, L. (2025). Residential load profiling and forecasting using ensemble tree-based classifiers on smart meter data. Energy Reports, 13, 892-905.
Wang, X. Z. a. Y. (2024). Advanced data preprocessing techniques for smart grid anomaly detection and classification. International Journal of Electrical Power & Energy Systems, 161.


