Application of Long Short-Term Memory Networks and SHAP Evaluation in the Solar Radiation Forecast
Abstract
1. Introduction
2. Data Selection
2.1. Meteorological Data Sources
- Atmospheric pressure (atm)
- Sea level pressure (atm)
- Air temperature (°C)
- Dew point temperature (°C)
- Relative humidity (%)
- Wind speed (m/s)
- Wind direction (degrees)
- Maximum gust speed (m/s)
- Precipitation (mm)
- Precipitation duration (hour)
- Sunshine duration (hour)
- Global solar irradiance (j/m2)
- Visibility (km)
- Day of year (DOY) (cyclic encoding)
- Hour of day (time index) (cyclic encoding)
2.2. Feature Engineering Process
3. Solution Methodology
3.1. LSTM
- A.
- Forget Gate
- B. Input Gate
- C. Output Gate
- Diurnal cycles (daily patterns of sunlight).
- Seasonal variations (summer peaks, winter troughs).
- Irregular fluctuations due to clouds, rainfall, or typhoons.
3.2. Shapley Additive Explanations (SHAPs)
- Rank feature importance across the dataset.
- Identify redundant or less influential variables.
- Guide feature selection for retraining the LSTM under reduced input dimensions.
3.3. Solution Procedure
- Acquire six years (2018–2023) of hourly meteorological data from CODiS.
- Apply preprocessing: missing value handling, normalization, and sinusoidal encoding for temporal features.
- Construct an LSTM network with a 24 h sliding input window.
- Configure hyperparameters: batch size, epochs, and the number of layers are 128, 100, and 2, respectively. Simulator is Adam optimizer [40].
- Use MSE and MAE for evaluation.
- Train the model using the full set of 15 meteorological features.
- Evaluate performance across training and validation sets.
- Identify risks of overfitting and analyze seasonal variations.
- Apply SHAP to compute feature contributions.
- Generate global feature importance rankings and local explanations.
- Identify key predictors (temperature, humidity, time encodings).
- Retrain the model using only the top 10 features (scenario 2) and top 5 features (scenario 3) ranked by SHAP.
- Compare predictive accuracy, convergence time, and generalization performance.
- Evaluate models using MAE and MSE.
- Visualize training curves, predicted vs. actual irradiance, and SHAP importance plots.
- Conduct seasonal analysis (spring, summer, autumn, winter) to assess robustness.
- Compare results across test scenarios to assess trade-offs.
- Highlight how SHAP-guided feature reduction improves efficiency.
- Discuss physical plausibility of feature rankings.
4. Results
4.1. Dataset Information
- (i)
- Scenario 1: full feature set. This is a baseline.
- (ii)
- Scenario 2: SHAP-ranked top 10 features
- (iii)
- Scenario 3: SHAP-ranked top 5 features.
4.2. SHAP Feature Analysis
4.3. Scenario 1: Full Feature Set (15 Features)
4.4. Scenario 2: SHAP-Selected Top 10 Features
4.5. Scenario 3: SHAP-Selected Top Five Features
- Air temperature
- Relative humidity
- Dew point
- Hour encoding (sin/cos)
- Day-of-year encoding (sin/cos)
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| ANNs | Artificial Neural Networks |
| ARIMA | Autoregressive Integrated Moving Average |
| ARMA | Autoregressive Moving Average |
| ANFIS | Adaptive Network-based Fuzzy Inference System |
| CWA | Central Weather Administration |
| DOY | Day of year |
| LSTM | Long Short-Term Memory |
| MAE | Mean Absolute Error |
| MSE | Mean Square Error |
| ODIS | Observation Data Inquire System |
| PV | Photovoltaic |
| RE | Renewable Energy |
| SHAP | Shapley Additive Explanations |
References
- Martiny, A.; Taglialatela, J.; Testa, F.; Iraldo, F. Determinants of environmental social and governance (ESG) performance: A systematic literature review. J. Clean. Prod. 2024, 456, 142213. [Google Scholar] [CrossRef]
- Arnulf, J.W. Photovoltaics and renewable energies in Europe. Renew. Sustain. Energy Rev. 2007, 11, 1414–1437. [Google Scholar] [CrossRef]
- Prichard, M.T.; Subramanian, V. Current trends in silicon-based photovoltaic recycling: A technology, assessment, and policy review. Sol. Energy 2023, 7, 137–150. [Google Scholar] [CrossRef]
- Taiwan Power Company. The Sustainable Operation of White Paper for Taiwan Power Company; Taiwan Power Company: Taipei, Taiwan, 2021. [Google Scholar]
- Lave, M.; Kleissl, J.; Arias-Castro, E. High-frequency irradiance fluctuations and geographic smoothing. Sol. Energy 2012, 86, 2190–2199. [Google Scholar] [CrossRef]
- Antonanzas-Torres, F.; Urraca, R.; Polo, J.; Perpiñán-Lamigueiro, O.; Escobar, R. Clear sky solar irradiance models: A review of seventy models. Renew. Sustain. Energy Rev. 2019, 107, 374–387. [Google Scholar] [CrossRef]
- Shyu, C.W.; Yang, Z.I. Socio-technical tensions from community acceptance, energy transition, and energy justice: Lessons from solar photovoltaic projects in Taiwan. Appl. Energy 2025, 384, 125415. [Google Scholar] [CrossRef]
- Kung, S.S.; Li, H.; Kung, C.C. Prospects of Taiwan’s solar energy development and policy formulation. Heliyon 2024, 10, e23811. [Google Scholar] [CrossRef]
- Wang, G.; Zhang, Z.; Lin, J. Multi-energy complementary power systems based on solar energy: A review. Renew. Sustain. Energy Rev. 2024, 199, 114464. [Google Scholar] [CrossRef]
- Wang, Y.; Luo, S.; Yao, L.; Du, Z.; Guan, Z.; Xiao, X. Modeling concentrating solar power plants in power system optimal planning and operation: A comprehensive review. Sustain. Energy Technol. Assess. 2024, 71, 103992. [Google Scholar] [CrossRef]
- Elsheikh, A.; Faqeha, H.; Hammoodi, K.; Bawahab, M.; Fujii, M.; Shanmugan, S.; Abd-Elaziem, W.; Ramesh, B.; Sathyamurthy, R.; Egiza, M. Integrating predictive and hybrid Machine Learning approaches for optimizing solar still performance: A comprehensive review. Sol. Energy 2025, 295, 113536. [Google Scholar] [CrossRef]
- Zaidi, A. A bibliometric analysis of machine learning techniques in photovoltaic cells and solar energy (2014–2022). Energy Rep. 2024, 11, 2768–2779. [Google Scholar] [CrossRef]
- Zhou, Y.; Liu, Y.; Wang, D.; Liu, X.; Wang, Y. A review on global solar radiation prediction with machine learning models in a comprehensive perspective. Energy Convers. Manag. 2021, 235, 113960. [Google Scholar] [CrossRef]
- Kumari, P.; Toshniwal, D. Deep learning models for solar irradiance forecasting: A comprehensive review. J. Clean. Prod. 2021, 318, 128566. [Google Scholar] [CrossRef]
- Mwigereri, D.G.; Ochieng, F.X.; Ouma, J.; Mwai, Z.; Mwalili, T. Evaluation of weather research forecasting-solar radiation schemes for solar power forecasting in equatorial Africa. Energy Rep. 2025, 13, 4318–4330. [Google Scholar] [CrossRef]
- Ghimire, S.; Deo, R.; Raj, N.; Mi, J. Deep solar radiation forecasting with convolutional neural network and long short-term memory network algorithms. Appl. Energy 2019, 253, 113541. [Google Scholar] [CrossRef]
- Paoli, C.; Voyant, C.; Muselli, M.; Nivet, M.L. Forecasting of preprocessed daily solar radiation time series using neural networks. Sol. Energy 2010, 84, 2146–2160. [Google Scholar] [CrossRef]
- Escalona-Llaguno, M.; Solís-Sánchez, L.; Castañeda-Miranda, C.; Olvera-Olvera, C.; Martinez-Blanco, M.; Guerrero-Osuna, H.; Castañeda-Miranda, R.; Díaz-Flórez, G.; Ornelas-Vargas, G. Comparative Analysis of Solar Radiation Forecasting Techniques in Zacatecas, Mexico. Appl. Sci. 2024, 14, 7449. [Google Scholar] [CrossRef]
- Sun, M.; Feng, C.; Zhang, J. Probabilistic solar power forecasting based on weather scenario generation. Appl. Energy 2020, 266, 114823. [Google Scholar] [CrossRef]
- Ali, M.; Elsayed, A.; Elkabani, I.; Akrami, M.; Youssef, M.; Hassan, G. Artificial Intelligence-Based Improvement of Empirical Methods for Accurate Global Solar Radiation Forecast: Development and Comparative Analysis. Energies 2024, 17, 4302. [Google Scholar] [CrossRef]
- Belmahdi, B.; Louzazni, M.; Marzband, M.; El Bouardi, A. Global Solar Radiation Forecasting Based on Hybrid Model with Combinations of Meteorological Parameters: Morocco Case Study. Forecasting 2023, 5, 172–195. [Google Scholar] [CrossRef]
- Bracale, A.; Guido, C.; Falco, P. A Probabilistic Competitive Ensemble Method for Short-Term Photovoltaic Power Forecasting. IEEE Trans. Sustain. Energy 2017, 8, 551–560. [Google Scholar] [CrossRef]
- Xwégnon, G.; Robin, G.; George, K. Short-Term Spatio-Temporal Forecasting of Photovoltaic Power Production. IEEE Trans. Sustain. Energy 2018, 9, 538–546. [Google Scholar] [CrossRef]
- Gider, V.; Budak, C.; Izci, D.; Ekinci, S. Daily Solar Radiation Prediction Using LSTM Neural Networks. In Proceedings of the IEEE 2022 Global Energy Conference (GEC), Batman, Turkey, 26–29 October 2022. [Google Scholar] [CrossRef]
- Alguhi, A.A.; Al-Shaalan, A.M. LSTM-Based Prediction of Solar Irradiance and Wind Speed for Renewable Energy Systems. Energies 2025, 18, 4594. [Google Scholar] [CrossRef]
- Fraihat, H.; Almbaideen, A.A.; Al-Odienat, A.; Al-Naami, B.; De Fazio, R.; Visconti, P. Solar Radiation Forecasting by Pearson Correlation Using LSTM Neural Network and ANFIS Method: Application in the West-Central Jordan. Future Internet 2022, 14, 79. [Google Scholar] [CrossRef]
- Kapanski, A.A.; Hruntovich, N.V.; Klyuev, R.V.; Boltrushevich, A.E.; Sorokova, S.N.; Efremenkov, E.A.; Demin, A.Y.; Martyushev, N.V. Intelligent Methods of Operational Response to Accidents in Urban Water Supply Systems Based on LSTM Neural Network Models. Smart Cities 2025, 8, 59. [Google Scholar] [CrossRef]
- Mvita, M.J.; Zulu, N.G.; Thethwayo, B. Artificial neural network integrated SHapley Additive exPlanations modeling for sodium dichromate formation. Eng. Appl. Artif. Intell. 2025, 158, 111457. [Google Scholar] [CrossRef]
- Wang, J.; Yu, B.; Chen, X.; Dai, G.; Dai, G.; Liu, W.; He, N.; Zhu, P.; Yin, Z.; Pan, Z. An interpretable short-term electrical load forecasting model based on SHapley Additive exPlanations-A case study in Haidian, Beijing. Electr. Power Syst. Res. 2025, 247, 111769. [Google Scholar] [CrossRef]
- Thu, N.; Van, P.N.; Bao, P.Q.; Nam, N.V.; Minh, P.H.; Quang, T.N. Short-term Forecasting of Solar Radiation Using a Hybrid Model of CNN-LSTM Integrated with EEMD. In Proceedings of the IEEE 2022 6th International Conference on Green Technology and Sustainable Development (GTSD), Nha Trang City, Vietnam, 29–30 July 2022. [Google Scholar] [CrossRef]
- Şener, I.F.; Tuğal, I. Optimized CNN-LSTM with hybrid metaheuristic approaches for solar radiation forecasting. Case Stud. Therm. Eng. 2025, 72, 106356. [Google Scholar] [CrossRef]
- Fu, J.; Sun, Y.; Li, Y.; Wang, W.; Wei, W.; Ren, J.; Han, S.; Di, H. An investigation of photovoltaic power forecasting in buildings considering shadow effects: Modeling approach and SHAP analysis. Renew. Energy 2025, 245, 122821. [Google Scholar] [CrossRef]
- Zhou, H.; Zheng, P.; Dong, J.; Liu, J.; Nakanishi, Y. Interpretable feature selection and deep learning for short-term probabilistic PV power forecasting in buildings using local monitoring data. Appl. Energy 2024, 375, 124274. [Google Scholar] [CrossRef]
- Batiyah, S.; Al-Subhi, A.; Elsherbiny, O.; Aldosari, O.; Aldawsari, M. Deep neural networks model for accurate photovoltaic parameter estimation under variable weather conditions. Sol. Energy 2025, 299, 113734. [Google Scholar] [CrossRef]
- Zhu, H.; Wang, Y.; Sun, S.; Zhang, D.; Hu, S.; Chen, W. Meteorological information calculation and power forecasting for regional distributed photovoltaic power based on information fusion and deep learning. Int. J. Electr. Power Energy Syst. 2025, 172, 111189. [Google Scholar] [CrossRef]
- Wang, J.; Li, X.; Yang, H.; Kong, S. Design and Realization of Microgrid Composing of Photovoltaic and Energy Storage System. Energy Procedia 2011, 12, 1008–1014. [Google Scholar] [CrossRef]
- Center Weather Administration. Meteorological Observation Database. Available online: https://opendata.cwa.gov.tw/index (accessed on 25 October 2024).
- Sun, J.; Xia, Y. Pretreating and normalizing metabolomics data for statistical analysis. Genes Dis. 2024, 11, 100979. [Google Scholar] [CrossRef]
- Hyndman, R.J.; Athanasopoulos, G. Forecasting: Principles and Practice, 2nd ed.; OTexts: Melbourne, Australia, 2018; Available online: https://otexts.com/fpp2 (accessed on 25 July 2024).
- Kanaparthi, T.; Ramesh, S.; Yarrabothu, R.S. K-Means Cluster-Based Interference Alignment with Adam Optimizer in Convolutional Neural Networks. Int. J. Inf. Secur. Priv. 2022, 16, 2. [Google Scholar] [CrossRef]


















| Attribute | Value |
|---|---|
| Total duration | 2018–2023 (6 years) |
| Time resolution | 1 h |
| Total samples | 52,512 h |
| Training period | 2018–2022 (42,096 h) |
| Testing period | 2023 (10,416 h) |
| Number of features | 15 |
| Primary target | Global solar irradiance (MJ/m2 per hr) |
| LSTM | RNN | |||||
|---|---|---|---|---|---|---|
| MSE | MAE | Execution Time | MSE | MAE | Execution Time | |
| Spring | 0.07 | 0.13 | 6 ms | 0.05 | 0.12 | 10 ms |
| Summer | 0.05 | 0.11 | 6 ms | 0.05 | 0.12 | 10 ms |
| Autumn | 0.12 | 0.18 | 6 ms | 0.15 | 0.21 | 10 ms |
| Winter | 0.11 | 0.17 | 6 ms | 0.10 | 0.18 | 10 ms |
| LSTM | RNN | |||||
|---|---|---|---|---|---|---|
| MSE | MAE | Execution Time | MSE | MAE | Execution Time | |
| Spring | 0.07 | 0.13 | 5 ms | 0.05 | 0.12 | 9 ms |
| Summer | 0.06 | 0.12 | 5 ms | 0.06 | 0.13 | 9 ms |
| Autumn | 0.11 | 0.18 | 5 ms | 0.13 | 0.20 | 9 ms |
| Winter | 0.10 | 0.17 | 5 ms | 0.10 | 0.18 | 9 ms |
| LSTM | RNN | |||||
|---|---|---|---|---|---|---|
| MSE | MAE | Execution Time | MSE | MAE | Execution Time | |
| Spring | 0.07 | 0.13 | 4 ms | 0.08 | 0.15 | 8 ms |
| Summer | 0.05 | 0.11 | 4 ms | 0.07 | 0.15 | 8 ms |
| Autumn | 0.11 | 0.18 | 4 ms | 0.11 | 0.19 | 8 ms |
| Winter | 0.09 | 0.16 | 4 ms | 0.11 | 0.19 | 8 ms |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Tsai, M.-T.; Lo, I.-C. Application of Long Short-Term Memory Networks and SHAP Evaluation in the Solar Radiation Forecast. Energies 2025, 18, 6099. https://doi.org/10.3390/en18236099
Tsai M-T, Lo I-C. Application of Long Short-Term Memory Networks and SHAP Evaluation in the Solar Radiation Forecast. Energies. 2025; 18(23):6099. https://doi.org/10.3390/en18236099
Chicago/Turabian StyleTsai, Ming-Tang, and I-Cheng Lo. 2025. "Application of Long Short-Term Memory Networks and SHAP Evaluation in the Solar Radiation Forecast" Energies 18, no. 23: 6099. https://doi.org/10.3390/en18236099
APA StyleTsai, M.-T., & Lo, I.-C. (2025). Application of Long Short-Term Memory Networks and SHAP Evaluation in the Solar Radiation Forecast. Energies, 18(23), 6099. https://doi.org/10.3390/en18236099
