Optimized Machine Learning for Solar Energy Generation Forecasting: A Feature Selection and Hyperparameter Optimization Approach
DOI:
https://doi.org/10.59461/ijdiic.v5i3.305Keywords:
Solar Energy Forecasting, Support Vector Regression, Renewable Energy, Machine Learning, Feature Selection, Smart GridAbstract
Solar energy is among the most promising renewable resources for developing sustainable energy systems; however, the stochastic and weather-sensitive nature of Solar Energy Generation (SEG) poses challenges for forecasting. The current study designs a machine learning framework for SEG forecasting by using feature selection methods in three stages. In the first stage, three feature selection methods, namely Pearson Correlation (PC), Recursive Feature Elimination (RFE), and Random Forest Feature Importance (RFFI), are compared systematically, each method selecting four predictors among ten weather and system variables, while avoiding the use of electrical telemetry variables to prevent data leakage. In the second stage, four regression methods, including Linear Regression, Random Forest (RF), Multilayer Perceptron (MLP), and Optimized Radial Basis Function Support Vector Regression (RBF-SVR), are tested using each feature set, and the results are verified in five independently repeated experiments. The feature selection method has a much bigger impact on accuracy than the regression method: RFFI-selected features allowed attaining a mean R² greater than 0.85 for three regression methods, whereas PC and RFE constrained all models to achieve R² less than 0.60. Among all models for RFFI features, Random Forest proved to have the best accuracy (mean R² = 0.8960 ± 0.0008), with MLP being second (R² = 0.8893 ± 0.0022), followed by the Optimized RBF-SVR model (R² = 0.8568 ± 0.0072); the Optimized RBF-SVR model took an average training time of 21.25 ± 1.12 seconds compared to RF's 35.78 ± 2.42 seconds. This shows the importance of selecting leakage-controlled features systematically in the process of forecasting SEG, and how a small number of 4 features is sufficient for achieving statistical stability.
References
[1] D. Gielen, R. Gorini, N. Wagner, R. Leme, L. Gutierrez, G. Prakash, E. Asmelash, L. Janeiro, G. Gallina, and G. Vale, "Global energy transformation: A roadmap to 2050," IRENA, 2019 , ISBN: 978-92-9260-121-8
[2] U. O. Matthew, O. Asuni, and L. O. Fatai, "Green software engineering development paradigm: an approach to a sustainable renewable energy future," in Advancing software engineering through AI, federated learning, and large language models: IGI Global, 2024, pp. 281-294 , doi: 10.4018/979-8-3693-3502-4.ch018.
[3] A. Q. Al-Shetwi, I. Z. Abidin, K. A. Mahafzah, and M. A. Hannan, “Feasibility of future transition to 100% renewable energy: Recent progress, policies, challenges, and perspectives,” Journal of Cleaner Production, vol. 478, Art. no. 143942, 2024, doi: 10.1016/j.jclepro.2024.143942
[4] J. Gaboitaolelwe, A. M. Zungeru, A. Yahya, C. K. Lebekwe, D. N. Vinod, and A. O. J. I. A. Salau, "Machine learning based solar photovoltaic power forecasting: A review and comparison," vol. 11, pp. 40820-40845, 2023, doi: 10.1109/ACCESS.2023.3270041.
[5] A. Muhammadi, M. Wasib, S. Muhammadi, S. Riaz Ahmed, A. H. Lahori, S. Vambol, and O. Trush, “Solar energy potential in Pakistan: A review,” Proceedings of the Pakistan Academy of Sciences: B. Life and Environmental Sciences, vol. 61, no. 1, pp. 1–10, 2024, doi: 10.53560/PPASB(61-1)931.
[6] A. Bhimaraju and A. Mahesh, “Recent developments in PV/wind hybrid renewable energy systems: A review,” Energy Systems, vol. 17, pp. 1303–1345, 2026, doi: 10.1007/s12667-024-00679-3.
[7] A. Q. Al-Shetwi, I. Z. Abidin, K. A. Mahafzah, and M. A. Hannan, “Feasibility of future transition to 100% renewable energy: Recent progress, policies, challenges, and perspectives,” Journal of Cleaner Production, vol. 478, Art. no. 143942, 2024, doi: 10.1016/j.jclepro.2024.143942.
[8] H. Wang, Z. Lei, X. Zhang, B. Zhou, J. J. E. C. Peng, and Management, "A review of deep learning for renewable energy forecasting," vol. 198, p. 111799, 2019, doi: 10.1016/j.enconman.2019.111799.
[9] Z. Chen, B. Gu, D. Yu, and C. Wang, “Quantifying the accelerated diffusion and cost savings of global solar photovoltaic supply chains,” iScience, vol. 28, no. 1, Art. no. 111610, 2025, doi: 10.1016/j.isci.2024.111610.
[10] F. J. R. Dincer and s. e. reviews, "The analysis on photovoltaic electricity generation status, potential and policies of the leading countries in solar energy," vol. 15, no. 1, pp. 713-720, 2011, doi: 10.1016/j.rser.2010.09.026.
[11] T. Shojaei and A. Mokhtar, “Forecasting energy consumption with a novel ensemble deep learning framework,” Journal of Building Engineering, vol. 96, Art. no. 110452, 2024, doi: 10.1016/j.jobe.2024.110452.
[12] H.-x. Zhao, F. J. R. Magoulès, and S. E. Reviews, "A review on the prediction of building energy consumption," vol. 16, no. 6, pp. 3586-3592, 2012, doi: 10.1016/j.rser.2012.02.049.
[13] T. Vaisakh and R. J. E. I. Jayabarathi, "Analysis on intelligent machine learning enabled with meta-heuristic algorithms for solar irradiance prediction," vol. 15, no. 1, pp. 235-254, 2022, doi: 10.1007/s12065-020-00505-6.
[14] N. Nikmehr and S. J. I. r. p. g. Najafi‐Ravadanegh, "Optimal operation of distributed generations in micro‐grids under uncertainties in load and renewable power generation using heuristic algorithm," vol. 9, no. 8, pp. 982-990, 2015, doi: 10.1049/iet-rpg.2014.0357.
[15] R. Chang, L. Bai, and C. H. Hsu, "Solar power generation prediction based on deep learning," Sustain. Energy Technol. Assess., vol. 47, p. 101354, 2021, doi: 10.1016/j.seta.2021.101354.
[16] S. Park, Y. Kim, N. J. Ferrier, S. M. Collis, R. Sankaran, and P. H. Beckman, "Prediction of solar irradiance and photovoltaic solar energy product based on cloud coverage estimation using machine learning methods," Atmosphere, vol. 12, p. 395, 2021, doi: 10.3390/atmos12030395.
[17] I. Jebli, F. Z. Belouadha, M. I. Kabbaj, and A. Tilioua, "Prediction of solar energy guided by Pearson correlation using machine learning," Energy, vol. 224, p. 120109, 2021, doi: 10.1016/j.energy.2021.120109.
[18] I. M. Müller, "Feature selection for energy system modeling: Identification of relevant time series information," Energy AI, vol. 4, p. 100057, 2021, doi: 10.1016/j.egyai.2021.100057.
[19] H. Eom, Y. Son, and S. Choi, "Feature-selective ensemble learning-based long-term regional PV generation forecasting," IEEE Access, vol. 8, pp. 54620–54630, 2020, doi: 10.1109/ACCESS.2020.2981819.
[20] H. Eskandari, H. Saadatmand, M. Ramzan, and M. Mousapour, "Innovative framework for accurate and transparent forecasting of energy consumption: A fusion of feature selection and interpretable machine learning," Appl. Energy, vol. 366, p. 123314, 2024, doi: 10.1016/j.apenergy.2024.123314.
[21] S. Soleymani and A. J. A. J. o. S. S. Talebi, "Forecasting solar irradiance with geographical considerations: integrating feature selection and learning algorithms," vol. 8, no. 5, 2024.
[22] L. L. Li, S. Y. Wen, M. L. Tseng, and C. S. Wang, "Renewable energy prediction: A novel short-term prediction model of photovoltaic output power," J. Clean. Prod., vol. 228, pp. 359–375, 2019, doi: 10.1016/j.jclepro.2019.04.331.
[23] W. VanDeventer, E. Jamei, G. S. Thirunavukkarasu, M. Seyedmahmoudian, T. K. Soon, B. Horan, S. Mekhilef, and A. Stojcevski, "Short-term PV power forecasting using hybrid GASVM technique," Renew. Energy, vol. 140, pp. 367–379, 2019, doi: 10.1016/j.renene.2019.02.087.
[24] M. Pan, C. Li, R. Gao, Y. Huang, H. You, T. Gu, and F. Qin, "Photovoltaic power forecasting based on a support vector machine with improved ant colony optimization," J. Clean. Prod., vol. 277, p. 123948, 2020, doi: 10.1016/j.jclepro.2020.123948.
[25] Q. Zhang, N. Tang, J. Lu, W. Wang, L. Wu, and W. Kuang, "A hybrid RBF neural network based model for day-ahead prediction of photovoltaic plant power output," Front. Energy Res., vol. 11, p. 1338195, 2024, doi: 10.3389/fenrg.2023.1338195.
[26] P. Li, K. Zhou, X. Lu, and S. Yang, “A hybrid deep learning model for short-term PV power forecasting,” Applied Energy, vol. 259, Art. no. 114216, 2020, doi: 10.1016/j.apenergy.2019.114216.
[27] X. Xiang, X. Li, Y. Zhang, and J. Hu, “A short-term forecasting method for photovoltaic power generation based on the TCN-ECANet-GRU hybrid model,” Scientific Reports, vol. 14, no. 1, Art. no. 6744, 2024, doi: 10.1038/s41598-024-56751-6.
[28] X. Ren, F. Zhang, J. Yan, and Y. Liu, “A novel convolutional neural net architecture based on incorporating meteorological variable inputs into ultra-short-term photovoltaic power forecasting,” Sustainability, vol. 16, no. 7, Art. no. 2786, 2024, doi: 10.3390/su16072786.
[29] A. Alorf and M. U. G. Khan, “Solar irradiance forecasting using temporal fusion transformers,” International Journal of Energy Research, vol. 2025, Art. no. 3534500, 2025, doi: 10.1155/er/3534500.
[30] G. Memarzadeh and F. Keynia, "Solar power generation forecasting by a new hybrid cascaded extreme learning method with maximum relevance interaction gain feature selection," Energy Convers. Manage., vol. 298, p. 117763, 2023. doi: 10.1016/j.enconman.2023.117763.
[31] Z. Qadir, S. I. Khan, E. Khalaji, H. S. Munawar, F. Al-Turjman, M. P. Mahmud, A. Z. Kouzani, and K. Le, "Predicting the energy output of hybrid PV–wind renewable energy system using feature selection technique for smart grids," Energy Rep., vol. 7, pp. 8465–8475, 2021 doi: 10.1016/j.egyr.2021.01.018.
[32] U. Ahmed, A. Mahmood, A. R. Khan, L. Kuhlmann, K. S. Alimgeer, S. Razzaq, I. Aziz, and A. Hammad, "Parallel boosting neural network with mutual information for day-ahead solar irradiance forecasting," Sci. Rep., vol. 15, no. 1, p. 11642, 2025. doi: 10.1038/s41598-025-95891-1.
[33] D. S. de O. Santos, Jr., P. S. G. de Mattos Neto, J. F. L. de Oliveira, H. V. Siqueira, T. M. Barchi, A. R. Lima, F. Madeiro, D. A. P. Dantas, A. Converti, A. C. Pereira, J. B. de Melo Filho, and M. H. N. Marinho, “Solar irradiance forecasting using dynamic ensemble selection,” Applied Sciences, vol. 12, no. 7, Art. no. 3510, 2022, doi: 10.3390/app12073510.
[34] R. Martin, R. Aler, J. M. Valls, and I. M. Galván, “Machine learning techniques for daily solar energy prediction and interpolation using numerical weather models,” Concurrency and Computation: Practice and Experience, vol. 28, no. 4, pp. 1261–1274, 2016, doi: 10.1002/cpe.3631.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Farwa Nawaz, Faria Karamat

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.