Full text
Feature Selection on Spatio-Temporal Data for Solar Irradiance Forecasting Manuel Carranza-Garc´ıa(B), Pedro Lara-Ben´ıtez, Jos´eMar´ıa Luna-Romera, and Jos´e C. Riquelme Division of Computer Science, University of Seville, 41012 Seville, Spain [email protected] Abstract. Solar energy is currently among the most important and convenient renewable sources, with a great potential to reduce the use of fossil fuels. However, power generation from solar panels is very irregular and highly dependent on weather conditions. Therefore, solar irradiance forecasting is a fundamental task to ensure an efficient power management. In power plants, besides the temporal observations, it is essential to consider the spatial relationship between close photovoltaic panels. In this work, we study the importance of feature selection for forecasting solar irradiance time series using spatio-temporal data. The experimental study considers nine feature selection techniques and compares the predictive performance of four regression algorithms using the different subsets of features. The data used comes from two different locations in Canada with multiple solar panels. The results demonstrate that including the proper spatial information using feature selection, particularly the methods based on evolutionary computation, enhances significantly the forecasting accuracy. Keywords: Feature selection ·Forecasting ·Machine learning ·Time series ·Solar irradiance 1 Introduction Renewable energy resources are increasingly gaining importance in power supply systems due to their potential to lower costs and reduce harmful emissions. Solar energy is among the most convenient alternatives that are being used in many countries to reduce our dependence on fossil fuels. However, the energy obtained from photovoltaic (PV) panels depends highly on environmental conditions, and its fluctuations present challenges and problems in power systems. Therefore, estimating the energy that can be generated from PV plants in the near future is essential to ensure a proper supply. Accurate short-term forecasting can help companies to improve the efficiency of power management and provide a more reliable service that can always meet the required energy demands. With the emergence of smart grids and the increase of available energyrelated data, machine learning (ML) models have become an effective and efficient approach for time series forecasting problems. ML methods such as decision c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022 H. Sanjurjo Gonz´alez et al. (Eds.): SOCO 2021, AISC 1401, pp. 654–664, 2022. https://doi.org/10.1007/978-3-030-87869-6_62
Feature Selection for Solar Irradiance Forecasting 655 trees or neural networks have shown a great capability to extract patterns from time series to predict future values. With sensors producing huge amounts of data per second, selecting the appropriate features to feed the models is key to achieve better performance. In time series, feature selection (FS) involves deciding how much historical data (lagged variables) should be used to make the next prediction. In solar power plants, besides the temporal component, there is a spatial relationship between PV panels that are located close to each other. Including this spatial information in the ML models could enhance the predictive capabilities. However, it is a topic that has not been sufficiently explored in the literature. This work presents a study on the importance of feature selection for multivariate time series forecasting using spatio-temporal solar energy data. The addressed problem is to predict the solar irradiance in photovoltaic power plants with multiple sensors. For that purpose, we apply 9 different feature selection methods and study their effect on the forecasting accuracy of traditional ML models such as linear regression, random forests, or k-nearest neighbors. In summary, the main contributions of the study are the following: – An experimental study on the suitability of different feature selection methods for multi-variate time series forecasting with spatio-temporal data. – A comparative analysis of traditional ML models for solar irradiance forecasting after the feature selection process. The rest of the paper is organized as follows. Section 2presents related work. Section 3describes the methodology and the materials used. Section 4reports the experimental results. Section 5presents the conclusions and future work. 2 Related Work Energy-related time series forecasting has attracted increasing attention over the last decade. In [4], a spatial-temporal forecasting methodology based on vector auto-regression is presented for solar power forecasting for smart grids in Portugal. This work already proved the importance of including the spatial information of the smart grid infrastructure to enhance predictive accuracy. In [12], a numerical weather prediction model with different horizontal resolutions is presented to predict irradiance data in Japan. More recent works have mainly proposed machine learning-based techniques, which have shown to outperform traditional statistical approaches. Deep neural networks are proposed in [2] to predict the irradiance using the same Canadian data used in this study. [3] conducted a survey on deep learning methods for renewable energy forecasting (solar and wind) in microgrids. In [8], a deep learning model based on temporal convolution to predict the energy demand in Spain is presented. In [9], the authors reviewed the trade-offs between efficiency and effectiveness of several deep learning models for time series forecasting. Concerning research focused on feature selection in time series data, there have been many recent approaches that have demonstrated the importance of
656 M. Carranza-Garc´ıa et al. finding the proper variables for the forecasting task. [10] presented a two-stage feature selection framework to improve the performance of DL models for multivariate financial time series forecasting. The proposed feature selection stage combines a filter and a wrapper-based method. [5] presents a methodology for energy multivariate time series forecasting based on feature selection. The data used included lagged and exogenous variables, and the results indicated that feature selection is essential for both reducing complexity and improve precision. 3 Materials and Methods This section describes the solar irradiance datasets and the methodology for the feature selection study and the evaluation of the forecasting accuracy of several ML models. The Weka framework has been used to carry out the experiments. 3.1 Datasets 06:00 08:00 10:00 12:00 14:00 16:00 18:00 0 500 MW/m2 Varennes 06:00 08:00 10:00 12:00 14:00 16:00 18:00 0 500 MW/m2 Alderville Fig. 1. Solar irradiance at Varennes and Alderville power plants. Each colored line represents a different PV panel from the grid. The selected datasets contain the solar irradiance fluctuations of two power plants in Canada under different weather conditions. The datasets are publicly available at the Canadian government website [1]. We have used the days with variable weather of Varennes and Alderville locations, which correspond to the 26th of February of 2015 and the 8th of October of 2015 respectively. Both locations have a different number of solar panels, 17 units in Varennes and 24 units in Alderville. Figure 1illustrates the solar radiation of both sites. The solar radiation is measured in megawatts per square meter (MW/m2) and is performed at high frequency (30–100 Hz). The measurements are averaged over 10 milliseconds and the data is saved when it changes by more than 5 W/m2 or each minute. This data-collection process results in an unevenly spaced time series dataset, which has been sampled at regular 1-s intervals. For this study, we transform the datasets creating lagged variables from the irradiance time series. The problem is formulated as follows: for each sensor,
Feature Selection for Solar Irradiance Forecasting 657 we use seven previous values of irradiance (0, 10, 20, 30, 40, 50, 60 s before) from all sensors to predict the value 60 s ahead. This transformation constructs several spatio-temporal features for each instance to make a one-step prediction. Specifically, 168 features in the case of Alderville (7 timesteps ×24 sensors with different spatial locations), and 119 in Varennes (7 timesteps ×17 sensors). Since there are many sensors that could be predicted, we select the sensors numbered as 01 for both datasets as the target time series. Hence, the number of instances is 4188 in Alderville and 4074 in Varennes. The next section describes the different FS methods that have been applied to these variables in order to improve the forecasting accuracy. 3.2 Feature Selection Methods Table 1presents the nine feature selection methods that have been explored for this spatio-temporal time series forecasting problem. The selected techniques comprise different search methods and attribute evaluators. According to [5], FS methods can be divided into two categories: univariate or multivariate. In this study, we consider three multivariate methods (best first, greedy stepwise, and multi-objective evolutionary search) and one univariate (ranker). Table 1. Feature selection methods #FS method Search method Attribute evaluator Reg. algorithm 1B-CFS BestFirst CFSSubsetEval 2G-CFS GreedyStepWise CFSSubsetEval 3MOES-RF Random Forest 4MOES-LR Multi Objective WrapperSubsetEval Linear Regression 5MOES-IBk Evolutionary Search IBk 6MOES-CFS CFSSubsetEval 7RANK-RAE ReliefAttributeEval 8RANK-PCA Ranker PrincipalComponentAnalysis 9RANK-RF ClassifierAttributeEval Random Forest Multivariate methods allow evaluating an entire feature subset. Multiobjective evolutionary search (MOES) is a probabilistic strategy that uses evolutionary algorithms to minimize both a performance metric and the number of attributes [6]. In contrast, GreedyStepwise and BestFirst are deterministic strategies that greedily add or delete attributes until the performance decreases [13]. Finally, the univariate Ranker method evaluates the features individually and gives them a ranking order, which requires fixing an importance threshold or a maximum number of features. In this study, we select the top ten ranked attributes [11].
658 M. Carranza-Garc´ıa et al. Depending on the attribute evaluator, FS methods can be divided into wrapper or filter. Wrapper methods such as WrapperSubsetEval (multivariate) [7]or ClassifierAttributeEval (univariate) use a regression algorithm to select features according to a precision metric. Three different predictors for wrapper FS have been used (random forest, linear regression, and k-nearest neighbors), which use the root mean squared error as an evaluation metric. In contrast, filter methods such as CFSSubsetEval (multivariate), ReliefAttributeEval (univariate), or PrincipalComponentAnalysis (univariate) apply statistical measures to evaluate the quality of the attributes. Correlation-based Feature Subset Selection (CFSSubset) evaluates the quality of a subset of features by considering their predictive ability along with the degree of redundancy between them. ReliefAttributeEval evaluates each attribute comparing its value with the nearest instance. Finally, PrincipalComponentAnalysis (PCA) reduces the dimensionality of the dataset by selecting the eigenvectors that represent the desired percentage of the variance in the original data. In summary, as can be seen in Table 1, we have used four wrapper and five filter FS methods. In the experimental study, we explore the behavior of these nine FS techniques when selecting spatio-temporal features from the time series extracted from solar power grids. 3.3 Forecasting Evaluation Procedure In order to assess the suitability of the different feature selection techniques, we evaluate the forecasting performance of several ML models such as Random Forest (RF), Linear Regression (LR), Support Vector Machine (SMOR), and k- Nearest Neighbor (IBk). For both datasets, we study the results obtained when using all the lagged features and with the features obtained with each FS method. All the models are used with the default parameter configuration in Weka. The evaluation metrics used are the mean absolute error (MAE) and the root mean squared error (RMSE). The reported results are obtained by means of a 10-fold cross-validation. We shift the focus of the discussion towards the enhancement obtained with the FS process, rather than on the specific precision value obtained with each ML algorithm. 4 Results and Discussion This section presents the experimental results over the two datasets that have been studied, including the feature selection process and the evaluation of the forecasting performance. 4.1 Alderville Table 2presents the subset of features selected with each FS method for forecasting the irradiance at sensor 01 at the Alderville location. The numbering follows the same order as in Table 1. The variables are named SXX Y, where
Feature Selection for Solar Irradiance Forecasting 659 XX is the number of the sensor and Y indicates the lag of the observation in seconds. SXX 0 is the last observation, while SXX 60 is the value 60 s before. As can be seen, there is a clear difference between the features selected by wrapper MOES methods (3, 4, 5) and the rest of FS techniques. MOES methods select a wider range of features in terms of different sensors and past observations. In contrast, ranker and greedy multivariate methods only select features from the most recent observation at different panels. Among the wrapper-based methods, MOES-RF selects the largest number of features (17) which is a considerable reduction from the original 168 variables. Figure 2shows the features selected by the MOES-RF and B-CFS methods with an aerial view of the Alderville power plant. As can be seen, MOES-RF presents a wider diversity of features than the filter-based method. This figure illustrates the spatial component in this problem, and how the irradiance at some panels at different timesteps can help to improve the forecasts for one sensor. Table 2. Subset of features selected by each method to predict S01 at Alderville. 1 2 3 4 5 6 7 8 9 S01 0S01 0S01 0S01 0S01 0S01 0S22 05comp. S10 0 S02 0S07 0S02 60 S05 0S01 60 S22 0S18 0S07 0 S07 0S22 0S03 60 S06 60 S04 60 S13 0S01 0 S13 0S06 40 S13 0S05 60 S01 0S13 0 S22 0S09 0S16 40 S11 60 S23 0S19 0 S22 60 S09 60 S18 10 S15 0S20 0S04 0 S10 40 S20 50 S15 60 S07 0S08 0 S11 0S22 0S17 60 S16 0S02 0 S13 0S18 0S10 0S22 0 S13 60 S20 60 S04 0S18 0 S15 60 S24 40 S18 0 S20 10 S20 40 S21 40 S21 50 S21 60 Tables 3and 4report the MAE and RMSE metrics obtained with the different subsets of features respectively. From these results, it can be seen that B-CFS, G-CFS are inadequate FS methods since the error increases with all regression algorithms. It can also be observed that wrapper MOES methods (MOES-RF, MOES-LR, MOES-IBk) obtain the best forecasting performance, and they obtain an improvement in all cases compared to the original dataset.
660 M. Carranza-Garc´ıa et al. For instance, selecting features with random forests as a wrapper method also improves the performance when predicting with linear regression. In contrast, MOES-CFS, RANK-RAE, and RANK-RF only improve the precision of LR. Finally, among the ranker methods, RANK-PCA seems to be the most effective method, which particularly improves the performance of the IBk regressor. Current value 10 seconds ago 40 seconds ago 50 seconds ago 60 seconds ago Fig. 2. Selected features from the MOES-RF (left) and B-CSF (right) methods for Alderville. In summary, multivariate wrapper-based FS methods can be considered the best alternative, since they improve precision and also have a more interpretable feature selection result than RANK-PCA. The best results for both MAE and RMSE are obtained using MOES-RF as a feature selector and RF as the regression algorithm. This combination improves the MAE and RMSE by 1.08 and 2.23 units respectively compared to using the complete set of features (Tables 3 and 4). Table 3. MAE obtained forecasting sensor 01 at Alderville with the different subsets of features. Original 1 2 3 4 5 6 7 8 9 RF 17.06 17.76 20.31 15.98 17.04 16.26 20.98 18.12 16.71 19.01 LR 20.16 18.97 18.83 18.55 18.28 18.72 18.83 18.33 19.79 18.94 SMOR 17.35 17.88 17.93 17.41 17.21 17.54 17.96 17.46 18.48 17.59 IBk 18.01 17.40 22.57 15.56 16.07 16.11 22.59 18.93 16.50 20.18
Feature Selection for Solar Irradiance Forecasting 661 Table 4. RMSE obtained forecasting sensor 01 at Alderville with the different subsets of features. Original 1 2 3 4 5 6 7 8 9 RF 33.35 34.10 39.98 31.12 33.10 31.78 40.83 37.19 31.29 38.14 LR 39.77 37.48 37.62 37.35 36.65 37.40 37.62 37.24 38.54 37.54 SMOR 37.59 37.97 37.81 37.68 37.22 37.81 37.77 37.54 39.06 37.40 IBk 43.01 37.80 48.75 37.63 37.77 36.20 47.74 43.40 32.81 45.24 4.2 Varennes Table 5presents the subset of features selected with each FS method for forecasting the irradiance at sensor 01 at the Varennes location. At this location, the analysis of the features selected by the different methods is slightly different from Alderville. In this case, ranker and greedy FS methods include variables Table 5. Subset of features selected by each method to predict S01 at Varennes. 12345678 9 S01 0S010S010S010S010S0330 S16 07compS130 S12 0S120S0240 S01 40 S01 50 S06 0S120S120 S16 0S160S0260 S02 50 S01 60 S10 0S040S010 S16 40 S16 40 S03 30 S03 0S0220 S12 0S170S160 S05 0S0360 S04 0S130S130S1310 S05 30 S04 50 S04 60 S14 60 S06 60 S12 10 S06 30 S08 40 S05 10 S16 0S050S0110 S06 50 S10 0S0610 S16 30 S07 0S1610 S06 60 S13 30 S06 20 S03 60 S08 0 S08 40 S16 0S0630 S05 60 S14 0 S10 40 S17 60 S06 60 S11 50 S11 0 S16 0S1130 S17 0S120 S17 20 S12 60 S13 10 S14 0 S14 40 S16 0 S16 40 S17 30 S17 60
662 M. Carranza-Garc´ıa et al. from timesteps different from 0. As can be seen in Fig. 3, the RANK-RF method also includes variables from 10 s before. Nevertheless, wrapper MOES methods are still the only ones to provide a wide variability of features in terms of sensors and lags, as can be observed in the figure. With respect to the forecasting results, models using wrapper MOES methods are again the best performing in almost all cases. The dataset with features from MOES-RF obtains the lowest error in both metrics when using random forest regression. It is important to mention that, in the Varennes case, ranking FS methods (RANK-RAE, RANK-PCA, and RANK-RF) improve the precision of linear regression. Furthermore, no FS method seems to contribute to the improvement of support vector machine regression. Current value 10 seconds ago 20 seconds ago 30 seconds ago 40 seconds ago 50 seconds ago 60 seconds ago Fig. 3. Selected features from the MOES-RF (left) and RANK-RF (right) methods for Varennes. Table 6. MAE obtained forecasting sensor 01 at Varennes with the different subsets of features. Original 1 2 3 4 5 6 7 8 9 RF 13.61 15.01 15.01 13.03 13.86 13.29 14.34 13.60 13.34 14.83 LR 17.00 16.29 16.29 16.38 16.21 16.34 16.36 16.46 16.90 16.10 SMOR 15.66 15.81 15.81 15.86 15.73 15.70 15.79 15.84 16.34 15.73 IBk 13.94 16.79 16.79 13.42 14.19 12.13 14.81 13.81 13.46 16.10 Table 7. RMSE obtained forecasting sensor 01 at Varennes with the different subsets of features. Original 1 2 3 4 5 6 7 8 9 RF 25.15 26.53 26.53 24.18 25.53 24.21 26.23 25.33 24.79 26.60 LR 28.39 26.93 26.93 27.05 26.55 26.94 26.84 27.19 27.37 27.32 SMOR 27.18 27.18 27.18 27.30 26.97 27.10 27.17 27.47 27.70 27.47 IBk 28.98 30.94 30.94 27.28 29.16 25.71 29.73 28.15 27.63 27.32