Previous Article in Journal
Impact of Log-Normal Particle Size Distribution in Holby–Morgan Degradation Model on Aging of Pt/C Catalystin PEMFC
Previous Article in Special Issue
AiWatch: A Distributed Video Surveillance System Using Artificial Intelligence and Digital Twins Technologies
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimizing Solar Radiation Prediction with ANN and Explainable AI-Based Feature Selection

by
Ibrahim Al-Shourbaji
1 and
Abdalla Alameen
2,*
1
Department of Electrical and Electronics Engineering, Jazan University, Jazan 45142, Saudi Arabia
2
Department of Computer Engineering and Information, Prince Sattam bin Abdulazizd University, Wadi Alddawasir 11991, Saudi Arabia
*
Author to whom correspondence should be addressed.
Technologies 2025, 13(7), 263; https://doi.org/10.3390/technologies13070263
Submission received: 16 May 2025 / Revised: 9 June 2025 / Accepted: 16 June 2025 / Published: 20 June 2025

Abstract

:
Reliable and accurate solar radiation (SR) prediction is crucial for renewable energy development amid a growing energy crisis. Machine learning (ML) models are increasingly recognized for their ability to provide accurate and efficient solutions to SR prediction challenges. This paper presents an Artificial Neural Network (ANN) model optimized using feature selection techniques based on Explainable AI (XAI) methods to enhance SR prediction performance. The developed ANN model is evaluated using a publicly available SR dataset, and its prediction performance is compared with five other ML models. The results indicate that the ANN model surpasses the other models, confirming its effectiveness for SR prediction. Two XAI techniques, LIME and SHAP, are then used to explain the best-performing ANN model and reduce its complexity by selecting the most significant features. The findings show that prediction performance is improved after applying the XAI methods, achieving a lower MAE of 0.0024, an RMSE of 0.0111, a MAPE of 0.4016, an RMSER of 0.0393, a higher R 2 score of 0.9980, and a PC of 0.9966. This study demonstrates the significant potential of XAI-driven feature selection to create more efficient and accurate ANN models for SR prediction.

1. Introduction

Industrial modernization has increased energy demand over the past decade. However, while supply is still limited, demand must rise faster than supply. The decreasing availability of resources such as, coal, petroleum, and natural gas has contributed to a growing imbalance between energy demand and supply, leading to an energy crisis. To mitigate pollution and alleviate pressure on conventional energy sources, researchers are exploring renewable energy resources such as wind, solar, geothermal, water, and biomass [1,2]. Solar radiation (SR) is a widely available renewable energy source in many regions around the world. In recent years, the focus on accurate and reliable SR prediction has intensified, driven by the need to optimize solar energy systems and enhance their efficiency. Accurate SR prediction improves the design and operation of solar power plants, leading to better energy management, reduced costs, and enhanced grid integration [3,4]. In this study, we focus on SR prediction, which plays a vital role in optimizing solar energy systems and improving the efficiency of renewable energy generation.
The literature has reported the prediction of SR using several ML models. Fan et al. compared SR prediction using Extreme Gradient Boosting (XGBoost) and SVM for SR prediction. They used the Turkish State Meteorological dataset. XGBoost performed the best regarding computational time and prediction accuracy [5]. Edna et al. used the Brazilian National Institute of Meteorology dataset for SR prediction. They compare several ML algorithms, including Support Vector Regression (SVR), XGBoost, Categorical Boosting (CatBoost), and a Voting-Average (VOA) ensemble method. The authors reported that selecting ensemble features enhances forecasting performance, with the VOA method outperforming the other algorithms across various predictions [6]. Wu et al. compared the Gradient Boosting (GB) and kernel-based nonlinear extension of Arps Decline (AD) models with categorical features to support daily global SR prediction using South China meteorological regional data. The AD model provided the best prediction accuracy, while the GB model provided the smallest computational time reported for SR [7]. Basaran et al. developed bagging and boosting ensemble models of SVM, decision tree (DT), and ANN models for SR prediction using five years of meteorological and air pollution data from Beijing, China. The results demonstrated that ensemble models achieved higher performance than individual base models [8].
Ibrahim and Khatib developed a firefly algorithm to select the optimal number of leaves per tree in the RF for the hourly global SR, utilizing meteorological data from Malaysia. The results indicated that the RF-FFA-optimized model surpassed the conventional RF, ANN, and ANN-FFA models in terms of accuracy and computational time [9]. Gupta et al. developed an SR prediction system using Particle Swarm Optimization (PSO) to optimize RF parameters. The results showed that the optimized RF improved the individual DT, RF, and ANN for the prediction of SR [10]. Srivastava et al. compared RF, classification and regression tree (CART), multivariate adaptive regression splines (MARS), and M5 tree-based ML models for SR prediction. RF outperformed the other models [11]. Benali et al. compared intelligent persistence, RF, and ANN to predict SR using components of solar irradiation, which are diffuse horizontal, beam normal, and horizontal components in France. They reported that RF predicted all components more effectively than other methods [12]. Belmahdi et al. compared seven ML models for SR prediction and reported that RF models had a more reliable SR forecast prediction [13]. Guermoui et al. reported that they developed a hybrid ML model that utilizes a convolutional neural network, an extreme learning machine, a least squares SVM, and a nonparametric Gaussian process regression for multihour global SR prediction. The experimental results showed that the hybrid deep learning (DL) model approach achieved better accuracy than other popular ML models [14]. Faisal et al. used a Recurrent Neural Network, Gated Recurrent Unit (GRU), and Long Short-Term Memory for a predicted SR [15]. The GRU outperformed all other models. Geshnigani et al. used conventional Multiple Linear Regression, an Adaptive Neuro-Fuzzy Inference System, and a Multilayer Perceptron Neural Network using several optimization algorithms [16]. The ANFIS with the genetic algorithm model effectively enhanced the prediction of the SR. Wu et al. used the Cuckoo Search, Gray Wolf Optimization (GWO), and Ant Colony Optimization algorithms to improve the SVM model capabilities for SR prediction. The findings showed that GWO-SVM gained the best results [17]. These studies indicate that optimization-based feature selection can improve model performance compared to using all available features.
Goliatt and Yaseen used a computationally intelligent model that hybridized Covariance Matrix Adaptive Evolution Strategies (CMAES) with XGBoost and MARS models. CMAES managed the internal parameters of the XGBoost and MARS models and produced a hybrid approach for daily SR prediction. The results demonstrated that the hybrid approach enhanced prediction accuracy [18]. The variance inflation factor and mutual information were used by Gupta et al. to choose the most important features to feed into a stack ensemble extra trees model for SR prediction. Results showed that the ensemble model with selected features effectively reduced prediction errors [19].
The literature highlighted that ML and DL models are highly effective tools for SR estimation. Researchers have used diverse datasets from various geographical locations, including India, France, Brazil, China, and Bangladesh, to enhance SR prediction accuracy. However, several challenges arise from the inherent variability of SR across different regions and seasons. Numerous factors influence SR prediction, varying widely across geographical locations and seasons. Training a model on data from one geographical region may not translate well to another, resulting in inaccuracies. The literature also indicates that applying feature selection techniques based on optimization and hybrid models can enhance the performance of individual models.
Despite their success, many of these models operate as opaque systems, hindering the interpretation of results and decision-making processes. This complexity can hinder trust and acceptance in critical energy applications that require reliable decision-making. XAI techniques help make these models more transparent and interpretable. Song et al. applied the SHAP-based XAI method to tree-based ensemble models, facilitating a clear understanding of feature importance and interaction effects in SR prediction [20]. In the same way, Nallakaruppan et al. employed LIME to elucidate the impact of critical parameters such as solar irradiance and temperature on energy yield, thereby improving model transparency [21]. In this study, we compare the performance of a set of ML models for SR prediction using a publicly available dataset collected from different site locations in Saudi Arabia, facilitating broader model generalization. The best-performing model is further analyzed using two XAI techniques, LIME and SHAP, to provide global and local explanations. Building on this, we employ LIME and SHAP not only for global and local explanations of the best-performing model but, distinctively, to guide feature selection for retraining and optimizing this model’s explanations. Unlike previous works, we leverage XAI methods not only to better understand the feature space but also to identify the most impactful features for SR prediction, which are subsequently used to retrain the best model. This approach enhances the SR prediction system’s performance, interpretability, and trustworthiness. The paper offers the following key contributions:
  • Improve SR prediction by using the XAI-based feature selection method for SR prediction.
  • Evaluate and compare six ML models using a publicly available dataset and a set of quantitative measures.
  • Analyze the top-performing model among the evaluated techniques using SHAP and LIME XAI methods to quantify feature contributions and select the most influential features.
  • Use selected features as inputs to the best model to optimize its efficiency and performance.
The organization of this paper is as follows: A detailed analysis of the SR dataset, ML models, and XAI techniques is provided in Section 2. Section 3 presents the statistical metrics to evaluate the ML models; Section 4 compares the models and discusses XAI-selected features. Finally, concludes the paper.

2. Materials and Methods

SR provides a clean and sustainable solution, helping to reduce greenhouse gas emissions and combat climate change. The quantity of SR obtained depends on several factors, including geographic location and meteorological conditions. As shown in Figure 1, the system outlines the workflow for feature selection influenced by XAI methods in conjunction with ML models and the evaluation parameters used for performance assessment. This approach promotes the identification of the most relevant features for model prediction while enhancing transparency and interpretability in SR prediction.
The Atomic and Renewable Energy Department at King Abdullah City in Saudi Arabia collects and maintains a publicly available SR prediction dataset. The dataset is available on the OpenData platform, a Saudi Arabian government repository for all experimental evaluations. It consists of 1265 records, each defined by 26 unique features. These features represent different parameters related to solar power generation and meteorological conditions. The data was gathered from 41 solar power plants across Saudi Arabia between 2017 and 2021. Table 1 provides an organized list of solar power facilities and corresponding records in the dataset. The minimum number of records was obtained from Princess Norah University, with six records, while the maximum was collected from K.A. CARE Olaya and K.A. CARE City, with 42 records each. This dataset reflects the variability of SR across diverse locations in Saudi Arabia. It is crucial for developing accurate predictive models. The mean and standard deviation of GHI are 30.853 and 8.777 across all records before normalization. These statistics are essential for understanding the dataset’s distribution and enhancing the reliability of the predictive models.
We performed several preprocessing steps to enhance the predictive efficacy of the dataset. The preliminary analysis of the data revealed the absence of the attribute “Wind Speed at 3 m (SD) Uncertainty (m/s)” for all site locations, leading to its exclusion from the dataset. The dataset excludes four records that lack sun radiation values. Table 2 summarizes the count of missing values for each feature in the dataset. Wind-related variables (e.g., wind speed, wind direction, peak wind speed, and their uncertainties) each have around 60–62 missing values, accounting for approximately 4.7% to 4.9% of the data. Both DHI and DNI have minimal missing values. Standard deviation components (e.g., for DHI, DNI, and GHI) exhibit significantly higher missingness, with around 260–264 missing entries, or roughly 20.6% of the dataset. Additionally, non-predictive metadata fields (e.g., date, latitude, and longitude) were excluded after feature engineering. The mean values of the respective features were used to substitute the missing values in all other imputed data. Subsequent to processing, each feature was subjected to independent normalization, resulting in a mean of zero and a standard deviation of one. All features were normalized using StandardScaler scaling. Similarly, we set the SR values, which are shown by the Global Horizontal Irradiance (GHI) scale, using the Min-Max Scaler to account for differences in how much power different solar stations produce. Table 3 presents detailed statistics for all the features in the dataset. The final dataset consists of 1261 records and 21 attributes.

2.1. ML Models

ML models offer diverse approaches to regression tasks, each with unique strengths and motivations. When evaluating ML model performance, factors such as interpretability, model complexity, computational efficiency, and the nature of the data, such as linear and non-linear, play a crucial role in determining the most proper model.
Linear Regression (LR) establishes a linear relationship between input features and the output variable, and it is one of the simplest ML models. Its strength lies in its ease of implementation and interpretability, particularly when the data displays linear trends. SVR extends the principles of SVM to regression, employing kernel functions to handle non-linear patterns effectively, making it a versatile option for diverse datasets. RF offers further improvements by combining multiple decision trees to create a robust, stable model. RF is known for reducing overfitting and handling noisy data, making it well-suited for complex, non-linear datasets with large feature spaces. BR integrates prior beliefs into the regression model by treating model parameters as probability distributions; it is functional when uncertainty quantification is crucial. The GBR builds models sequentially by minimizing errors from previous models, resulting in a robust prediction model that boosts weak learners. An ANN functions similarly to a human neuron system, consisting of interconnected layers of neurons capable of capturing complex patterns in data. The ANN features multiple fully connected hidden layers between the input and output layers with ReLU activation. It is connected to every neuron in the preceding and following layers, enabling the network to capture intricate data patterns [22]. An output layer with a linear activation function suitable for regression tasks. Its ability to model non-linear interactions makes it powerful for large datasets where traditional models may struggle to capture underlying data dynamics.

2.2. Explainable AI

XAI refers to techniques designed to enhance transparency and interpretability by making the decisions and predictions of AI models understandable to humans. As ML models become more complex, their “black box” nature poses challenges for users attempting to comprehend their decisions. XAI techniques offer insights into the influence of input features on model predictions, either locally or globally. This work explores two techniques: Local Interpretable Model-agnostic Explanations (LIME) and Shapley Additive Explanations (SHAP). LIME focuses on local interpretations, while SHAP provides a global perspective, making the two techniques complementary within the field of XAI [23].

2.2.1. LIME

Ribeiro et al. introduced LIME to bridge the gap between human and AI systems by providing precise and local explanations of model predictions [24]. LIME operates independently of the internal workings of the ML model and focuses on explaining predictions at the data level.
l ( x ) = arg min c r G L ( f , c r , π x ) + Ω ( c r ) ,
For input feature x, LIME identifies the interpretable model l ( x ) by minimizing the loss L ( f , g , π x ) and the complexity regularization as Ω ( c r ) , where c r represents the complexity of the explanation model and the minimizing Ω ( c r ) promotes the selection of simpler and more interpretable models, while a small L ( f , c r , π x ) ensures that the chosen model accurately reflects the predictions of the underlying model. The proximity function π x captures how similar perturbed instances are to the instance being explained. LIME provides a reliable local explanation for a model with complex global interpretation, where “locality” is defined by π x . LIME perturbs the input features based on the statistical characteristics of the training data to generate explanations for specific predictions.

2.2.2. SHAP

This technique is rooted in cooperative game theory that allocates significance to each feature based on its contribution to the model’s decision-making process [25]. The value for a feature i is calculated as
ϕ i = S N { j } S ! · ( N S N 1 ) ! N ! f ( S { j } ) f ( S )
where N is the total number of features and N { j } is a set of all possible combinations of features. S is a subset of features in N, f ( S ) is the model’s prediction when using only the features in subset S, and ϕ i is the SHAP value indicating the contribution of feature i to the prediction. f ( S { j } ) f ( S ) is the cumulative contribution value of feature j. The Shapley value ensures that each feature’s contribution is fairly evaluated by considering all possible combinations of features. In addition to computing individual feature contributions, the SHAP maintains the property of additivity, which can be expressed in the equation
f ( x ) = ϕ 0 + i ϕ i
Here, f ( x ) represents the model’s prediction for input x, and ϕ 0 is the average prediction across the dataset. This equation confirms that the total contribution to model prediction is averaged over all different combinations of features. The Shapley value has various valuable properties such as additivity, symmetry, dummy, and efficiency [26,27]. The additivity property requires that the aggregate sum of individual models’ predictions matches the combined model’s prediction. Symmetry means features with equal contributions to the model receive the same Shapley values. The dummy property states that if a feature’s marginal contribution is zero across all possible models, its Shapley value will also be zero. The efficiency means that the sum of all feature contributions equals the difference between the model’s prediction and the average [27]. The SHAP values are consistent and interpretable to obtain global insights into feature importance and influence on complex ML model predictions.

3. Experiments and Results

SR prediction models were implemented using the Python-based Scikit-Learn library. All the experiments were conducted on a Windows 10 operating system with an Intel i7 3.13 GHz processor and 64 GB of RAM. The optimum hyperparameter for these models based on cross-validation is listed in Table 4.

3.1. Evaluation Metrics

The ML models are assessed using five measurements: MAE, RMSE, RMSRE, R 2 , PC, and MAPE. The metrics are selected based on SR prediction literature and are defined as follows:
M A E = 1 N i = 1 N | O i P i | ( Wh / m 2 ) ,
R M S E = 1 N i = 1 N ( O i P i ) 2 ( Wh / m 2 ) ,
R M S R E = 1 n i = 1 n O i P i O i 2
R 2 = 1 i ( O i P i ) 2 i ( O i O ¯ ) 2 ,
P C = n ( u v ) u v [ n u 2 ( u ) 2 ] [ n v 2 ( v ) 2 ] ,
M A P E = 1 n i = 1 n O i P i O i × 100
where N is the number of SR values recorded, O i is the ith measured SR value, P i is the ith predicted SR value, and O ¯ is the mean of the measured SR values.
MAE and MSE range from 0 to ∞, and both are better when lower, indicating smaller prediction errors. R2 ranges from to 1, with higher values closer to 1 being better, signifying a better model fit. The PC quantifies a linear relationship between two variables, ranging from −1 to +1, where negative and positive values represent a perfect negative and positive correlation, respectively. A zero PC signifies no linear correlation. This helps analysts understand how closely related the predictor and response variables are. MAPE measures the average percentage difference between the P i and O i . The RMSER calculates the square root of the mean of squared relative errors, normalized by the O i . It provides a scale-independent measure of error.

3.2. Predictive Performance

In Table 5, each station was iteratively used as the test set, while the remaining stations served as the training data, a strategy known as leave-one-station-out cross-validation. Table 5 represents the performance averaged across all such station-wise evaluations.
The observed results indicated that the RF model performed the best in terms of accuracy and generalizability across different sites. The MLP reported overfitting or poor generalization, indicating a need for tuning, more data, or regularization. The RF and GBR demonstrate excellent generalization, making them suitable for real-world deployment.
A comparative analysis of six ML models using three measures is presented in Table 6. Each model is trained using a complete feature set and is 10-fold cross-validated, and the mean and standard deviation (SD) of each measure across all folds are used for comparison. The LR, the simplest ML model, performs the worst in all measures due to its limited linear nature. The SR prediction using SVM improved significantly compared to LR. The GB performs well but is slightly less accurate than RF, BR, and ANN. RF and BR perform similarly, outperforming LR, SVR, and GB. The ANN model performs best among all ML models. ANN achieved the best performance with the lowest MAE of 0.0093, RMSE of 0.0127, and the highest R 2 of 0.9913. The MAPE and RMSRE values are also the lowest compared to other models. It is observed that percentage-based metrics such as MAPE and RMSRE exhibit high standard deviations relative to their mean values (e.g., MAPE: 1.4728 ± 2.3999). This high variability is attributed to the sensitivity of these metrics to small true target values in the solar radiation dataset. When true values approach zero, even small absolute errors can result in disproportionately large percentage errors, leading to outliers and skewed distributions. The ANN model’s ability to capture complex, non-linear patterns and interactions between features makes it the most accurate and reliable choice for SR prediction. The Adam optimizer (Adaptive Moment Estimation) gives computational efficiency and a minimal memory requirement, making it well-suited for ANN models with large datasets and complex architectures [28]. The learning rate was set to 0.01 to ensure stable and efficient convergence of the ANN model.
Table 7 presents the architecture of the proposed ANN model and the configuration details of its layers, output shapes, and parameters. The model contains three dense layers with 64, 32, and 1 neurons, respectively. The model uses 3521 parameters, demonstrating its complexity and learning capacity. The model provides a detailed equation for calculating the parameters [29]. The ANN model is fitted with a training set of a batch size of 32 and runs for 200 epochs. With this configuration, we can train the model iteratively, updating the weights after each batch of 32 samples. We compile the models using the MSE as the loss function, a standard regression task metric. We design the ANN architecture to balance complexity and performance, enabling the model to effectively learn from the training data while maintaining its generalization capabilities.
Figure 2 compares the performance of different ML models using various evaluation metrics. When comparing models across the metrics such as MAE, RMSE, and MAPE, a lower median and a smaller spread within the box plot indicate better and more stable performance. A low median suggests that the model consistently achieves minimal errors. This figure highlights the importance of evaluating central tendencies and data distribution to ensure robust and reliable model performance. The ANN model archives the minimum values of MAE, RMSE, and MAPE. The ANN model exhibits the highest R 2 score among all the ML models, signifying its strong ability to explain the variance in the dataset. Hence, the trained ANN model is investigated using XAI techniques.

3.3. XAI-Based ANN Optimization

SHAP and LIME are effective tools for interpreting ML models, transforming black-box models into white-box models and enabling better local and global analysis. See Figure 3. For global interpretation, the output using SHAP for the ANN model revealed that the first features in red are the most contributory ones for SR prediction. Additionally, the local interpretation by the LIME, shown in Figure 4, indicated that the green features (DNI, DHI, GHIU, ATU, and AT) had a positive effect on the output. These figures demonstrate how SHAP and LIME techniques provided a clearer understanding of the most informative features influencing SR prediction. In this case, selecting only the most informative features simplifies the model structure and could improve generalization and accuracy and reduce both training times and the risk of overfitting [30,31]. XAI eliminates features that add little value to reduce the complexity of the ANN. This results in faster training times and less risk of overfitting, where the model learns noise instead of meaningful patterns. In this case, selecting only the top five features simplifies the model structure and may improve generalization and accuracy.
The ANN model is retrained using features selected through XAI-based methods. This improved version of the model is called the optimized ANN. The details of the optimized ANN parameters are shown in Table 8. The optimized ANN model achieved an MAE of 0.0024, RMSE of 0.0111, R 2 of 0.9980, and PC of 0.9966, comparatively more increased than the base model. This approach shows that using XAI to select key features can lead to better results while minimizing model complexity. The relative change (RC) in terms of a performance metric is calculated as
RC ( % ) = | O p t i m i z e d _ A N N _ v a l u e A N N _ v a l u e | A N N _ v a l u e × 100
Table 9 presents the comparative performance of the best ANN model using all features and the optimized ANN model using the top five features. The optimized model performs better, with a decrease in MAE and RMSE and an increase in R 2 and PC. The optimized ANN model requires less computation and memory, making it more efficient. The optimized ANN’s average inference time is 0.000358 s with 4.879 Floating Point Operations (FLOPs) in K. Similarly, for ANN, it is 0.000506 s with 6.945 . XAI contributes to this by streamlining the input data, which reduces the ANN’s overall training time and inference cost. This is particularly important in practical applications requiring large-scale data and real-time predictions.
The comparison of Kernel Density Estimation (KDE)-based probability density for SR observed data, standard ANN, and optimized ANN is shown in Figure 5. The figure indicates the effectiveness of model optimization in replicating the observed SR data’s distribution. The initial ANN model’s KDE shows some discrepancies due to its inability to make perfect predictions. The optimized ANN’s KDE closely matches the SR observed data, indicating that the optimization process successfully tunes the model to predict the data’s characteristics better. This similarity between the observed and optimized ANN KDEs signifies that the model has improved in capturing central tendencies, variability, and other statistical properties, offering more accurate and reliable predictions.
DHI, DNI, AT, GHIU, and RH are the most important features selected through XAI techniques for SR prediction. DHI represents the amount of solar radiation received per unit area by a horizontal surface that comes indirectly from the sky. Similarly, DNI quantifies the SR received in a direct beam on a surface perpendicular to the sun’s rays. AT is particularly influential in SR measurements, as it can affect the atmospheric conditions that scatter SR, impacting both GHI and DNI values. The uncertainty is the error, or variability, in the recorded values. These uncertainties can arise from various factors, including instrument calibration, atmospheric variability, and data processing methodologies. The RHU indicates the uncertainty or measurement error/margin associated with the relative humidity. According to the XAI analysis, these features are important for accurate SR prediction. Understanding their relationships and influences enhances the robustness of predictive models, ultimately improving the efficiency and reliability of solar energy systems. These features were selected based on their global importance ranking from the SHAP analysis. XAI contributes to this by streamlining the feature selection process, which has the potential to reduce the complexity and training time. A detailed ablation study to empirically validate this effect is planned as part of future work.

4. Conclusions and Future Works

The broad utilization of ML techniques is due to their ability to provide reliable and robust predictions for SR. This paper investigated six ML methods, and the comparison results based on a set of statistical metrics indicated that ANN is the best-performing model for the prediction of SR. We then employed XAI methods, SHAP and LIME, to interpret the results of the ANN model and select the most informative features. The results indicated that XAI positively impacts the ANN model’s results by improving feature selection, reducing model complexity, increasing interpretability, and leading to better model performance. This study assessed the performance of six individual ML models, which can be considered a limitation of this work. Therefore, implementing hybrid models is suggested for the future prediction of SR. Another limitation of this work is the restricted availability of additional parameters as input to the models. To address this, future work could involve the deployment of an IoT monitoring system to collect richer real-time data for SR. This integration may improve the prediction of SR and improve energy management in solar power systems.

Author Contributions

Conceptualization, I.A.-S. and A.A.; methodology, I.A.-S. and A.A.; software, I.A.-S.; validation, I.A.-S. and A.A.; formal analysis, I.A.-S.; investigation, I.A.-S. and A.A.; resources, I.A.-S.; data curation, I.A.-S. and A.A.; writing—original draft preparation, I.A.-S.; writing—review and editing, I.A.-S. and A.A.; visualization, I.A.-S.; supervision, I.A.-S. and A.A.; project administration, I.A.-S. All authors have read and agreed to the published version of the manuscript.

Funding

The authors extend their appreciation to Prince Sattam bin Abdulaziz University for funding this research work through the project number PSAU/2024/01/31235.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The dataset used in the present study is publicly available at: https://open.data.gov.sa/en/datasets/view/583039ed-eaed-4d2c-980e-93c67c444636/resources (accessed on 5 March 2025).

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ANNArtificial Neural Network
BRBayesian Regression
DTdecision tree
GBRGradient Boosting Regression
LIMELocal Interpretable Model-agnostic Explanations
LRLinear Regression
MAEMean Absolute Error
MAPEMean Absolute Percentage Error
MLmachine learning
MLPMulti-layer Perceptron
MSEMean Squared Error
PCPearson Correlation
RFRandom Forest
RMSERoot Mean Square Error
RMSRERoot Mean Squared Relative Error
R2Coefficient of Determination
SHAPShapley Additive Explanations
SRsolar radiation
SVRSupport Vector Regression
XAIExplainable Artificial Intelligence

References

  1. Bamisile, O.; Oluwasanmi, A.; Ejiyi, C.; Yimen, N.; Obiora, S.; Huang, Q. Comparison of machine learning and deep learning algorithms for hourly global/diffuse solar radiation predictions. Int. J. Energy Res. 2022, 46, 10052–10073. [Google Scholar] [CrossRef]
  2. Farzin, S.; Valikhan Anaraki, M. Modeling and predicting suspended sediment load under climate change conditions: A new hybridization strategy. J. Water Clim. Change 2021, 12, 2422–2443. [Google Scholar] [CrossRef]
  3. Yang, X.; Jiang, F.; Liu, H. Short-term solar radiation prediction based on SVM with similar data. In Proceedings of the 2nd IET Renewable Power Generation Conference (RPG 2013), IET, Beijing, China, 9–11 September 2013; pp. 1–4. [Google Scholar]
  4. Fan, J.; Wang, X.; Wu, L.; Zhou, H.; Zhang, F.; Yu, X.; Lu, X.; Xiang, Y. Comparison of Support Vector Machine and Extreme Gradient Boosting for predicting daily global solar radiation using temperature and precipitation in humid subtropical climates: A case study in China. Energy Convers. Manag. 2018, 164, 102–111. [Google Scholar] [CrossRef]
  5. Fan, J.; Wu, L.; Zhang, F.; Cai, H.; Wang, X.; Lu, X.; Xiang, Y. Evaluating the effect of air pollution on global and diffuse solar radiation prediction using support vector machine modeling based on sunshine duration and air temperature. Renew. Sustain. Energy Rev. 2018, 94, 732–747. [Google Scholar] [CrossRef]
  6. Solano, E.S.; Dehghanian, P.; Affonso, C.M. Solar Radiation Forecasting Using Machine Learning and Ensemble Feature Selection. Energies 2022, 15, 7049. [Google Scholar] [CrossRef]
  7. Wu, L.; Huang, G.; Fan, J.; Zhang, F.; Wang, X.; Zeng, W. Potential of kernel-based nonlinear extension of Arps decline model and gradient boosting with categorical features support for predicting daily global solar radiation in humid regions. Energy Convers. Manag. 2019, 183, 280–295. [Google Scholar] [CrossRef]
  8. Basaran, K.; Özçift, A.; Kılınç, D. A new approach for prediction of solar radiation with using ensemble learning algorithm. Arab. J. Sci. Eng. 2019, 44, 7159–7171. [Google Scholar] [CrossRef]
  9. Ibrahim, I.A.; Khatib, T. A novel hybrid model for hourly global solar radiation prediction using random forests technique and firefly algorithm. Energy Convers. Manag. 2017, 138, 413–425. [Google Scholar] [CrossRef]
  10. Gupta, S.; Katta, A.R.; Baldaniya, Y.; Kumar, R. Hybrid random forest and particle swarm optimization algorithm for solar radiation prediction. In Proceedings of the 2020 IEEE 5th International Conference on Computing Communication and Automation (ICCCA), Greater Noida, India, 30–31 October 2020; pp. 302–307. [Google Scholar]
  11. Srivastava, R.; Tiwari, A.; Giri, V. Solar radiation forecasting using MARS, CART, M5, and random forest model: A case study for India. Heliyon 2019, 5, e02692. [Google Scholar] [CrossRef]
  12. Benali, L.; Notton, G.; Fouilloy, A.; Voyant, C.; Dizene, R. Solar radiation forecasting using artificial neural network and random forest methods: Application to normal beam, horizontal diffuse and global components. Renew. Energy 2019, 132, 871–884. [Google Scholar] [CrossRef]
  13. Belmahdi, B.; Bouardi, A.E. Short-term solar radiation forecasting using machine learning models under different sky conditions: Evaluations and comparisons. Environ. Sci. Pollut. Res. 2024, 31, 966–981. [Google Scholar] [CrossRef] [PubMed]
  14. Guermoui, M.; Benkaciali, S.; Gairaa, K.; Bouchouicha, K.; Boulmaiz, T.; Boland, J.W. A novel ensemble learning approach for hourly global solar radiation forecasting. Neural Comput. Appl. 2022, 34, 2983–3005. [Google Scholar] [CrossRef]
  15. Faisal, A.F.; Rahman, A.; Habib, M.T.M.; Siddique, A.H.; Hasan, M.; Khan, M.M. Neural networks based multivariate time series forecasting of solar radiation using meteorological data of different cities of Bangladesh. Results Eng. 2022, 13, 100365. [Google Scholar] [CrossRef]
  16. Geshnigani, F.S.; Golabi, M.R.; Mirabbasi, R.; Tahroudi, M.N. Daily solar radiation estimation in Belleville station, Illinois, using ensemble artificial intelligence approaches. Eng. Appl. Artif. Intell. 2023, 120, 105839. [Google Scholar] [CrossRef]
  17. Wu, Z.; Cui, N.; Gong, D.; Zhu, F.; Li, Y.; Xing, L.; Wang, Z.; Zhu, B.; Chen, X.; Wen, S.; et al. Predicting daily global solar radiation in various climatic regions of China based on hybrid support vector machines with meta-heuristic algorithms. J. Clean. Prod. 2023, 385, 135589. [Google Scholar] [CrossRef]
  18. Goliatt, L.; Yaseen, Z.M. Development of a hybrid computational intelligent model for daily global solar radiation prediction. Expert Syst. Appl. 2023, 212, 118295. [Google Scholar] [CrossRef]
  19. Gupta, R.; Yadav, A.K.; Jha, S.; Pathak, P.K. A robust regressor model for estimating solar radiation using an ensemble stacking approach based on machine learning. Int. J. Green Energy 2024, 21, 1853–1873. [Google Scholar] [CrossRef]
  20. Song, Z.; Cao, S.; Yang, H. An interpretable framework for modeling global solar radiation using tree-based ensemble machine learning and Shapley additive explanations methods. Appl. Energy 2024, 364, 123238. [Google Scholar] [CrossRef]
  21. Nallakaruppan, M.; Shankar, N.S.; Bhuvanagiri, P.B.; Padmanaban, S.; Khan, S.B. Advancing solar energy integration: Unveiling XAI insights for enhanced power system management and sustainable future. Ain Shams Eng. J. 2024, 15, 102740. [Google Scholar] [CrossRef]
  22. Sangle, S.; Kachare, P. Comparative analysis of PCA and LDA early fusion for ANN-based diabetes diagnostic system. In Applied Computer Vision and Image Processing: Proceedings of ICCET 2020; Springer: Singapore, 2020; Volume 1, pp. 69–75. [Google Scholar]
  23. Sangle, S.B.; Kachare, P.H.; Puri, D.V.; Al-Shoubarji, I.; Jabbari, A.; Kirner, R. Explaining electroencephalogram channel and subband sensitivity for alcoholism detection. Comput. Biol. Med. 2025, 188, 109826. [Google Scholar] [CrossRef]
  24. Ribeiro, M.T.; Singh, S.; Guestrin, C. “Why should I trust you?” Explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Francisco, CA, USA, 13–17 August 2016; pp. 1135–1144. [Google Scholar]
  25. Lundberg, S.M.; Lee, S.I. A unified approach to interpreting model predictions. In Proceedings of the 31st International Conference on Neural Information Processing Systems (NIPS), Red Hook, NY, USA, 4–9 December 2017; pp. 4765–4774. [Google Scholar]
  26. Datta, A.; Sen, S.; Zick, Y. Algorithmic transparency via quantitative input influence: Theory and experiments with learning systems. In Proceedings of the 2016 IEEE Symposium on Security and Privacy (SP), San Jose, CA, USA, 22–26 May 2016; pp. 598–617. [Google Scholar]
  27. Shapley, L.S. A value for n-person games. Contrib. Theory Games 1953, 28, 307–317. [Google Scholar]
  28. Puri, D.V.; Kachare, P.H.; Sangle, S.B.; Kirner, R.; Jabbari, A.; Al-Shourbaji, I.; Abdalraheem, M.; Alameen, A. LEADNet: Detection of Alzheimer’s Disease using Spatiotemporal EEG Analysis and Low-Complexity CNN. IEEE Access 2024, 12, 113888–113897. [Google Scholar] [CrossRef]
  29. Kachare, P.H.; Sangle, S.B.; Puri, D.V.; Khubrani, M.M.; Al-Shourbaji, I. STEADYNet: Spatiotemporal EEG analysis for dementia detection using convolutional neural network. Cogn. Neurodyn. 2024, 18, 3195–3208. [Google Scholar] [CrossRef] [PubMed]
  30. AlShourbaji, I.; Kachare, P.; Zogaan, W.; Muhammad, L.; Abualigah, L. Learning features using an optimized artificial neural network for breast cancer diagnosis. SN Comput. Sci. 2022, 3, 229. [Google Scholar] [CrossRef]
  31. Sangle, S.B.; Gaikwad, C.J. Accumulated bispectral image-based respiratory sound signal classification using deep learning. Signal Image Video Process. 2023, 17, 3629–3636. [Google Scholar] [CrossRef]
Figure 1. SR prediction system using XAI-based feature selection to optimize ML model.
Figure 1. SR prediction system using XAI-based feature selection to optimize ML model.
Technologies 13 00263 g001
Figure 2. Comparative performance of ML models: (a) MAE, (b) RMSE, (c) R 2 , (d) PC, (e) MAPE (%), (f) RMSRE (%). Each color represents a specific ML model.
Figure 2. Comparative performance of ML models: (a) MAE, (b) RMSE, (c) R 2 , (d) PC, (e) MAPE (%), (f) RMSRE (%). Each color represents a specific ML model.
Technologies 13 00263 g002
Figure 3. SHAP explanations of the best ANN model using the complete feature set.
Figure 3. SHAP explanations of the best ANN model using the complete feature set.
Technologies 13 00263 g003
Figure 4. LIME explanations of the best ANN model using the complete feature set.
Figure 4. LIME explanations of the best ANN model using the complete feature set.
Technologies 13 00263 g004
Figure 5. Probability density of SR observed, ANN, and optimized ANN predicted values.
Figure 5. Probability density of SR observed, ANN, and optimized ANN predicted values.
Technologies 13 00263 g005
Table 1. Distribution of records from solar power stations in Saudi Arabia.
Table 1. Distribution of records from solar power stations in Saudi Arabia.
Solar Power StationRecordsSolar Power StationRecords
Princess Norah University6Taibah University17
Umm Al-Qura University17Hail College of Technology19
Al-Baha University20Al-Jouf College of Technology20
Rania Technical Institute20Royal-Commission of Jubail and Yanbu20
Saline Water Conversion Corp., Al-Khafji20Arar Technical Institute20
Jazan University21King Saud University21
Saline Water Conversion Corp., Farasan23Najran University31
Al-Wajh Technical Institute34King Abdulaziz University (KAU), Osfan34
Tabuk University34Hafar Al-Batin Technical College34
Al-Hanakiyah Technical Institute35Saline Water Conversion Corp., Umluj35
Saline Water Conversion Corp., Hagl36Al-Dawadmi College of Technology36
Shaqra University36Prince Sattam Bin Abdulaziz University36
Duba Technical Institute36Wadi Addawasir College of Technology36
Majmaah University36Al-Aflaaj Technical Institute37
Qassim University38Taif University38
King Faisal University38King Fahd University of Petroleum Minerals38
KAU of Science and Technology38University of Dammam38
Al-Uyaynah Research Station42K.A. CARE, Olaya42
Sharurah Technical Institute35Al-Qunfudhah Technical Institute35
Saline Water Conversion Corp. jubail36timaa Technical Institute36
K.A.CARE, City Site42Total1265
Table 2. Missing values summary of Saudi Arabia SR dataset.
Table 2. Missing values summary of Saudi Arabia SR dataset.
FeatureNumber of Missing Values
Wind Direction at 3 m (°N)62
Wind Direction at 3 m Uncertainty (°N)62
Wind Speed at 3 m (m/s)60
Wind Speed at 3 m Uncertainty (m/s)60
Wind Speed at 3 m (std dev) (m/s)60
DHI (Wh/m2)4
DHI Uncertainty (Wh/m2)4
Standard Deviation DHI (Wh/m2)264
DNI (Wh/m2)4
DNI Uncertainty (Wh/m2)4
Standard Deviation DNI (Wh/m2)264
Standard Deviation GHI (Wh/m2)260
Peak Wind Speed at 3 m (m/s)60
Peak Wind Speed at 3 m Uncertainty (m/s)60
Table 3. Statistical summary of Saudi Arabia SR dataset.
Table 3. Statistical summary of Saudi Arabia SR dataset.
FeatureAcronymUnitMin25%75%Max
Air TemperatureATCelsius−2.546−0.7980.8381.810
Air Temperature UncertaintyATUCelsius−0.040−0.040−0.04025.100
Barometric PressureBPhPa−2.657−0.6751.0431.431
Barometric Pressure UncertaintyBPUhPa−2.459−0.7830.8924.662
Diffuse Horizontal IrradianceDHIWh/m2−1.864−0.8670.7352.692
Diffuse Horizontal Irradiance UncertaintyDHIUWh/m2−1.629−0.8040.6888.167
Diffuse Horizontal Irradiance Standard DeviationDHISDWh/m2−2.396−0.6260.5074.263
Direct Normal IrradiationDNIWh/m2−2.900−0.7150.5883.089
Direct Normal Irradiation UncertaintyDNIUWh/m2−1.767−0.8710.5256.931
Direct Normal Irradiation Standard DeviationDNISDWh/m2−2.659−0.6130.5663.003
Global Horizontal Irradiance UncertaintyGHIUWh/m2−0.729−0.3680.18619.933
Global Horizontal Irradiance Standard DeviationGHISDWh/m2−1.790−0.7250.4324.114
Peak Wind Speed at 3 mPWSm/s−3.978−0.7310.4864.746
Peak Wind Speed at 3 m UncertaintyPWSUm/s−5.2740.1170.1175.507
Relative HumidityRH%−1.494−0.9640.7732.269
Relative Humidity UncertaintyRHU%−8.375−0.049−0.04920.765
Wind Direction at 3 mWDDegree−1.542−0.9481.0231.447
Wind Direction at 3 m UncertaintyWDUDegree−13.4970.1640.1642.896
Wind Speed at 3 mWSm/s−3.271−0.6760.4055.054
Wind Speed at 3 m UncertaintyWSUm/s−1.549−1.5490.6780.678
Wind Speed at 3 m Standard DeviationsWSUSDm/s−3.761−0.7315.3244.954
Global Horizontal IrradianceGHIWh/m20.000−0.2720.5401.000
Table 4. Optimum parameters for different ML models.
Table 4. Optimum parameters for different ML models.
AlgorithmParameters
LRRegression type = Lasso (L1); alpha = 1
SVRkernel = radial basis function; Regularization = 10; gamma = 0.01.
RFimpurity = squared_error min_samples_split = 5 No. of trees = 200; max_features = 14.
BRIterations = 300; l a m b d a _ 1 and l a m b d a _ 2 : m a x _ d e p t h : 3; alpha_1 = 10 6 and alpha_2 = 10 6 .
GBR l e a r n i n g _ r a t e : 0.001, n _ e s t i m a t o r s : 100
ANNactivation = ReLU; epochs = 200; b a t c h _ s i z e = 32; l e a r n i n g _ r a t e : 0.01.
Table 5. Station-wise leave-one-out cross-validation results for SR prediction.
Table 5. Station-wise leave-one-out cross-validation results for SR prediction.
ModelMSEMAERMSER2MAPERMSRE
Linear Regression0.003670.044360.060630.984922.6902582.211
Ridge Regression0.003670.044420.060650.984912.6841181.990
Bayesian Ridge0.003670.044370.060640.984922.6888682.161
Random Forest0.000880.020720.029810.996350.7506221.036
Gradient Boosting0.002550.038560.050540.989522.1767262.712
Support Vector Regression0.004290.053750.065530.9823912.2073462.192
Multi-layer Perceptron0.202350.305130.371190.170245.21523129.658
Table 6. A comparison of ML models for SR prediction using the complete feature set.
Table 6. A comparison of ML models for SR prediction using the complete feature set.
ModelMAERMSE R 2 PCMAPE (%)RMSRE (%)
LR0.0276 ± 0.00180.0504 ± 0.03740.8936 ± 0.01650.9621 ± 0.00232.5178 ± 4.26170.3617 ± 0.6791
SVR0.0190 ± 0.00170.0545 ± 0.03350.9510 ± 0.01630.9756 ± 0.00582.3900 ± 3.61980.3212 ± 0.5736
RF0.0117 ± 0.00070.0282 ± 0.010.9868 ± 0.00180.9861 ± 0.00311.8125 ± 2.73150.2344 ± 0.4331
BR0.0113 ± 0.00050.0308 ± 0.02230.9842 ± 0.00750.9850 ± 0.00292.5150 ± 4.25610.3612 ± 0.6782
GBR0.0147 ± 0.00130.0412 ± 0.02440.9718 ± 0.00900.9801 ± 0.00242.7649 ± 4.42100.3764 ± 0.6936
ANN0.0093 ± 0.00100.0254 ± 0.00930.9913 ± 0.00620.9946 ± 0.00311.4728 ± 2.39990.2098 ± 0.3828
Table 7. Architecture of best performing ANN model using complete feature set.
Table 7. Architecture of best performing ANN model using complete feature set.
ANN LayersOutput ShapeParameters
Dense641408
Dense322080
Dense133
Trainable params: 3521 (13.75 KB)
Table 8. Architecture of optimized ANN using top 5 XAI-based features.
Table 8. Architecture of optimized ANN using top 5 XAI-based features.
ANN LayerOutput ShapeParameters
Dense64384
Dense322080
Dense133
Trainable params: 2497 (9.75 KB)
Table 9. A comparison of the ANN using the complete feature set and XAI based on the top 5 features.
Table 9. A comparison of the ANN using the complete feature set and XAI based on the top 5 features.
MetricOptimized ANNANNRC (%)
MAE0.0024 ± 0.00300.0093 ± 0.001073.66
RMSE0.0111 ± 0.0150.0254 ± 0.019356.30
R20.9980 ± 0.00380.9913 ± 0.00620.68
PC0.9966 ± 0.00240.9946 ± 0.00310.20
MAPE (%)0.4016 ± 0.3147181.4728 ± 2.399972.73
RMSRE (%)0.0393 ± 0.047960.2098 ± 0.382881.27
Avg Inference Time (s)0.0003580.00050629.25
FLOPs (K)4.8976.94529.48
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.

Share and Cite

MDPI and ACS Style

Al-Shourbaji, I.; Alameen, A. Optimizing Solar Radiation Prediction with ANN and Explainable AI-Based Feature Selection. Technologies 2025, 13, 263. https://doi.org/10.3390/technologies13070263

AMA Style

Al-Shourbaji I, Alameen A. Optimizing Solar Radiation Prediction with ANN and Explainable AI-Based Feature Selection. Technologies. 2025; 13(7):263. https://doi.org/10.3390/technologies13070263

Chicago/Turabian Style

Al-Shourbaji, Ibrahim, and Abdalla Alameen. 2025. "Optimizing Solar Radiation Prediction with ANN and Explainable AI-Based Feature Selection" Technologies 13, no. 7: 263. https://doi.org/10.3390/technologies13070263

APA Style

Al-Shourbaji, I., & Alameen, A. (2025). Optimizing Solar Radiation Prediction with ANN and Explainable AI-Based Feature Selection. Technologies, 13(7), 263. https://doi.org/10.3390/technologies13070263

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop