JOMLAI: Journal of Machine Learning and Artificial Intelligence
Vol. 5 No. 2 (2026): Juni 2026

Optimization of the Random Forest Algorithm Using GridSearchCV for Household Energy Consumption Classification

Adinda Nabila (STIKOM Tunas Bangsa)
Azharda Afriaci (STIKOM Tunas Bangsa)
Haya Atika Syafi'ah (STIKOM Tunas Bangsa)



Article Info

Publish Date
15 Jun 2026

Abstract

The high fluctuation in electricity usage and the complexity of historical data distribution in Internet of Things (IoT)-based smart home environments frequently trigger significant uncertainty in household energy efficiency management. Without an intelligent predictive system, energy consumption surges become exceedingly difficult to control accurately. Therefore, this study aims to develop a high-accuracy predictive classification model architecture to map energy consumption levels into three main categories (Low, Medium, High) by leveraging the Random Forest algorithm. The experimental process was conducted systematically, beginning with the evaluation of a baseline model, followed by an optimization phase integrating the GridSearchCV method based on 5-fold cross-validation for exhaustive hyperparameter tuning on the IoT Smarthome Energy Dataset. Performance was comprehensively evaluated using a confusion matrix and gap accuracy analysis to ensure model robustness. Experimental results proved that the hyperparameter optimization process successfully boosted the global accuracy rate significantly from an initial baseline of 98.92% to 99.46%, while effectively reducing the number of misclassifications. Furthermore, the feature importance analysis provided a transparent scientific interpretation, where the future_consumption_kWh feature was identified as having the most dominant influence at 61.75% on the model's decision structure. In conclusion, this optimized Random Forest architecture is proven to be highly robust and ready to be implemented as a real-scale automatic energy-saving instrument.

Copyrights © 2026






Journal Info

Abbrev

jomlai

Publisher

Subject

Computer Science & IT Engineering

Description

Focus and Scope JOMLAI: Journal of Machine Learning and Artificial Intelligence is a scientific journal related to machine learning and artificial intelligence that contains scientific writings on pure research and applied research in the field of machine learning and artificial intelligence as well ...