# Adaptive Solar Power Forecasting based on Machine Learning Methods
## 1 Introduction  
In recent years, as the growing electrical power load demand and the claim on reducing greenhouse gases generated by the exhaustion of fossil fuels, Smart Grid (SG) and Microgrid (MG) featuring renewable energy (RE) have developed quickly, to satisfy consumption and mitigate pollution [1; 2]. However, renewable energy is typically intermittent and weather-dependent, such as in the case of wind and solar power, which is a big challenge to the planning, operation, unit commitment and energy scheduling of MG or SG [3; 4; 5]. If the RE power generation can be predicted accurately, the efficiency of energy management can be greatly improved [6]. Thus, many researchers focus on predicting the RE power generation [7; 8]. For solar power prediction, statistical methods and machine learning methods are two commonly used approaches [3; 8; 9; 10; 11]. Statistical methods are basically applied through regression function or probability distribution function (PDF), which estimates the relationship between weather variables and solar intensity [9; 12; 13]. Machine learning techniques learn the characteristics of the sample data, and then achieves the prediction by training models, such as Neural Networks (NN) and Support Vector Machines (SVM) [10; 11]. For statistical methods, the authors of [12] generate a set of solar scenarios by assuming the forecasting errors follow a normal distribution. In [13], the forecasting error of the renewable energy is simulated via multiple scenarios from the Monte Carlo method under a Beta PDF. This method has an obvious dependence on the predictive error distribution function which is normally difficult to obtain. On the other hand, for machine learning, auto-regressor is adopted to predict the two-ahead solar power generation in [14]. Three layers NN is applied to build the forecasting model, the data of the previous day, highest temperature and weather type of the forecasting day are taken as input variables in [15], which forecasts very well for sunny days. Besides the highest temperature, the lowesttemperature and average temperature are chosen as the input data to predict photovoltaic (PV) output power in [16]. However, the generalization ability of NN is limited, and thus the overall prediction effect by using only NN is not precise enough in many cases. Although the forecasting results by any one of the above methods are not satisfactory overall, the forecasting accuracy can be further improved by merging them together. Some existing works focus on the combination of artificial neural network and data mining for more accurate solar power [17]. K-means clustering with nonlinear auto-regressive neural networks are adopted to forecast solar irradiance in [18], and _k-means_ with artificial neural networks are used to predict solar irradiance in [19]. However, the traditional _k-means_ is sensitive to the initial center, in practice, if the cluster center is given randomly, the _k-means_ often converges to one or more clusters which contains very few or even no data point. Therefore, many researchers focus on the cluster centers initialization to improve the performance of the _k-means_[20; 21]. The weather data is of high-dimension, which makes the improved _k-means_ clustering in [21] a good fit to our method. Because it is proposed to tackle the high-dimension data initial cluster centers. Appropriate classification can improve the prediction accuracy, however, key factors that affect the prediction accuracy can be very different in different clusters. It is thus very necessary to analyze the most important factors in each cluster. The widely used variable selection methods are the forward selection regression, forward stage-wise regression and LASSO [22; 23]. In practice, after clustering, there may be very little data in some groups, so the above mentioned methods tend to be too aggressive to eliminate too many correlated and useful predictors.