Optimizing electric vehicle energy consumption prediction through machine learning and ensemble approaches
Abstract Accurately predicting energy consumption in electric vehicles (EVs) is essential for enhancing energy efficiency and improving infrastructure planning. However, this task remains challenging due to the complex interplay of driving conditions, vehicle specifications, and environmental factor...
Saved in:
| Main Authors: | , , , , , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
Nature Portfolio
2025-08-01
|
| Series: | Scientific Reports |
| Subjects: | |
| Online Access: | https://doi.org/10.1038/s41598-025-14129-2 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1849235198494900224 |
|---|---|
| author | Izhar Hussain Kok Boon Ching Chessda Uttraphan Kim Gaik Tay Adeeb Noor Sufyan Ali Memon |
| author_facet | Izhar Hussain Kok Boon Ching Chessda Uttraphan Kim Gaik Tay Adeeb Noor Sufyan Ali Memon |
| author_sort | Izhar Hussain |
| collection | DOAJ |
| description | Abstract Accurately predicting energy consumption in electric vehicles (EVs) is essential for enhancing energy efficiency and improving infrastructure planning. However, this task remains challenging due to the complex interplay of driving conditions, vehicle specifications, and environmental factors. This study proposes a novel data-driven approach that utilizes machine learning (ML) techniques, supported by an extensive real-world dataset derived from Colorado. The research aims to extract meaningful insights from the data using advanced analytical methodologies. This research makes three key advances: (1) systematic comparison of four hyperparameter optimization methods (GridSearchCV, RandomizedSearchCV, Optuna, PSO) for KNN regression, (2) development of a stacking hybrid ensemble combining KNN with tree-based models, and (3) comprehensive validation on real-world data with novel temporal feature engineering. The K-Nearest Neighbors (KNN) algorithm is employed as the base model, with hyperparameter optimization performed using GridSearchCV, RandomizedSearchCV, Optuna, and Particle Swarm Optimization (PSO). Additionally, a stacking hybrid ensemble model is developed to combine the strengths of multiple base models. The results show that the stacking hybrid ensemble model achieves the best performance, with the lowest prediction errors (MAE = 0.645880, RMSE = 1.788540) and the highest accuracy score R² (0.960078). Among the optimization techniques, Optuna proves to be the most effective for tuning the KNN model. This study emphasizes the capabilities of ensemble learning and advanced optimization methods in enhancing the prediction of energy consumption. These results demonstrate that temporal feature extraction and optimized ensemble modeling significantly enhance prediction accuracy, providing EV manufacturers and policymakers with deployable tools for sustainable energy management. |
| format | Article |
| id | doaj-art-0cc4c84993e6496d87fff8263be7e2d6 |
| institution | Kabale University |
| issn | 2045-2322 |
| language | English |
| publishDate | 2025-08-01 |
| publisher | Nature Portfolio |
| record_format | Article |
| series | Scientific Reports |
| spelling | doaj-art-0cc4c84993e6496d87fff8263be7e2d62025-08-20T04:02:51ZengNature PortfolioScientific Reports2045-23222025-08-0115111710.1038/s41598-025-14129-2Optimizing electric vehicle energy consumption prediction through machine learning and ensemble approachesIzhar Hussain0Kok Boon Ching1Chessda Uttraphan2Kim Gaik Tay3Adeeb Noor4Sufyan Ali Memon5Departement of Electrical Engineering, Faculty of Electrical and Electronic Engineering, Universiti Tun Hussein Onn MalaysiaDepartement of Electrical Engineering, Faculty of Electrical and Electronic Engineering, Universiti Tun Hussein Onn MalaysiaDepartment of Computer Engineering, Faculty of Electrical and Electronic Engineering, Universiti Tun Hussein Onn MalaysiaFaculty of Electrical and Electronic Engineering, Universiti Tun Hussein Onn MalaysiaDepartment of Information Technology, Faculty of Computing and Information Technology, King Abdulaziz UniversityDepartment of Defense Systems Engineering, Sejong UniversityAbstract Accurately predicting energy consumption in electric vehicles (EVs) is essential for enhancing energy efficiency and improving infrastructure planning. However, this task remains challenging due to the complex interplay of driving conditions, vehicle specifications, and environmental factors. This study proposes a novel data-driven approach that utilizes machine learning (ML) techniques, supported by an extensive real-world dataset derived from Colorado. The research aims to extract meaningful insights from the data using advanced analytical methodologies. This research makes three key advances: (1) systematic comparison of four hyperparameter optimization methods (GridSearchCV, RandomizedSearchCV, Optuna, PSO) for KNN regression, (2) development of a stacking hybrid ensemble combining KNN with tree-based models, and (3) comprehensive validation on real-world data with novel temporal feature engineering. The K-Nearest Neighbors (KNN) algorithm is employed as the base model, with hyperparameter optimization performed using GridSearchCV, RandomizedSearchCV, Optuna, and Particle Swarm Optimization (PSO). Additionally, a stacking hybrid ensemble model is developed to combine the strengths of multiple base models. The results show that the stacking hybrid ensemble model achieves the best performance, with the lowest prediction errors (MAE = 0.645880, RMSE = 1.788540) and the highest accuracy score R² (0.960078). Among the optimization techniques, Optuna proves to be the most effective for tuning the KNN model. This study emphasizes the capabilities of ensemble learning and advanced optimization methods in enhancing the prediction of energy consumption. These results demonstrate that temporal feature extraction and optimized ensemble modeling significantly enhance prediction accuracy, providing EV manufacturers and policymakers with deployable tools for sustainable energy management.https://doi.org/10.1038/s41598-025-14129-2Electric vehiclesEnergy consumption predictionKNNHyperparameter tuningEnsemble hybrid models |
| spellingShingle | Izhar Hussain Kok Boon Ching Chessda Uttraphan Kim Gaik Tay Adeeb Noor Sufyan Ali Memon Optimizing electric vehicle energy consumption prediction through machine learning and ensemble approaches Scientific Reports Electric vehicles Energy consumption prediction KNN Hyperparameter tuning Ensemble hybrid models |
| title | Optimizing electric vehicle energy consumption prediction through machine learning and ensemble approaches |
| title_full | Optimizing electric vehicle energy consumption prediction through machine learning and ensemble approaches |
| title_fullStr | Optimizing electric vehicle energy consumption prediction through machine learning and ensemble approaches |
| title_full_unstemmed | Optimizing electric vehicle energy consumption prediction through machine learning and ensemble approaches |
| title_short | Optimizing electric vehicle energy consumption prediction through machine learning and ensemble approaches |
| title_sort | optimizing electric vehicle energy consumption prediction through machine learning and ensemble approaches |
| topic | Electric vehicles Energy consumption prediction KNN Hyperparameter tuning Ensemble hybrid models |
| url | https://doi.org/10.1038/s41598-025-14129-2 |
| work_keys_str_mv | AT izharhussain optimizingelectricvehicleenergyconsumptionpredictionthroughmachinelearningandensembleapproaches AT kokboonching optimizingelectricvehicleenergyconsumptionpredictionthroughmachinelearningandensembleapproaches AT chessdauttraphan optimizingelectricvehicleenergyconsumptionpredictionthroughmachinelearningandensembleapproaches AT kimgaiktay optimizingelectricvehicleenergyconsumptionpredictionthroughmachinelearningandensembleapproaches AT adeebnoor optimizingelectricvehicleenergyconsumptionpredictionthroughmachinelearningandensembleapproaches AT sufyanalimemon optimizingelectricvehicleenergyconsumptionpredictionthroughmachinelearningandensembleapproaches |