The increase in demand for electrical energy is in line with increasing population, urbanization, industrial deployment, and technology. Accurate prediction of electrical energy consumption plays an important role in planning, analyzing, and managing electricity systems to ensure sustainable, safe, and economical electricity supply. K-Nearest Neighbors (KNN) is a simple and fast prediction algorithm based on the quality and relevance of the features used. This research proposes to improve the accuracy of energy consumption prediction through feature selection based on metaheuristic algorithms, namely Genetic Algorithm (GA), Ant Lion Optimization (ALO), Teaching Learning Based Optimization (TLBO), and Jaya Algorithm (JA). The dataset used is Tetouan City Power Consumption, with a preprocessing process of time feature extraction, min-max scaling normalization, and feature selection. The ALO+KNN and JA+KNN combinations delivered the best and most stable prediction performance, while TLBO+KNN performed poorly. GA+KNN showed the worst overall results among all combinations. The evaluation of model performance was based on RMSE, MAPE, and R² metrics. These findings highlight the importance of selecting a feature selection algorithm that aligns well with the characteristics of the model and dataset to enhance prediction accuracy.
Copyrights © 2025