# Improved Probability Prediction Method Research for Photovoltaic Power Output
## 4 Experiment  
### Data Preprocessing  
The dataset used in this paper is acquired from solar power station, from 2012 to 2014, of the Energy Forecasting Working Group of the Institute of Electrical and Electronics Engineers, including the 24-hour PV output value of photovoltaic panels and corresponding meteorological parameters such as surface solar irradiance, atmosphere, irradiance, surface pressure, total cloud amount, and so on [39]. Since the output of the photovoltaic panel was 0 at night, the data from 6:00 to 18:00 every day is selected as the raw data.  
\[\overline{x}_{ij}=\frac{x_{ij}-x_{\min,j}}{x_{\max,j}-x_{\min,j}} \tag{17}\]  
where \(x_{ij}\) is the \(i\)-th data of the \(j\)-th variable in the original dataset; \(x_{\min,j}\) and \(x_{\max,j}\) are the minimum and maximum values of the \(j\)-th variable in the original dataset, respectively; and \(\overline{x}_{ij}\) is the \(i\)-th new data of the \(j\)-th variable after the normalization. The target variable values were normalized by the Energy Forecasting Working Group, so its rang is [0,1]. The other 12 variables provided were not normalized, and had different dimensions. After the normalization, the range of 12 variables are all [0,1].  
Figure 2: The flow chart of combination algorithm.  
If all variables are considered, it will inevitably increase the model complexity and training time. The random forest algorithm can solve the high-dimensional data classification and regression problem [40; 41]. This paper uses the algorithm to select the variables affecting the PV output value. The variable description and processing results are shown in Table 1.  
The 12 variables obtained from the European Centre for Medium-Range Weather Forecasts (ECMWF) NWP output are independent. Total column liquid water (TCLW) represents the vertical integration of cloudy liquid water content. Relative humidity at 1000 mbar (RH) is defined with respect to the saturation of the mixed phase (i.e., with respect to saturation over ice below \(-23\)\({}^{\circ}\)C, and with respect to saturation over water above 0 \({}^{\circ}\)C). Total cloud cover (TCC) is derived from model levels using the model's overlap assumption. Top net solar rad (TSR) is the net solar radiation at the top of the atmosphere. Surface solar rad down (SSRD), surface thermal rad down (STRD), top net solar rad (TSR), and total precipitation (TP) are all accumulated data.  
The importance scores of 12 meteorological parameters can be obtained by the random forest algorithm. The importance scores of the meteorological factors are shown from Table 1, and the importance ranking is performed according to the scores of the respective variables. A variable is more important when its score is higher. If there are too few variable factors left in the feature selection process, important information may be lost and the prediction accuracy may be affected. Therefore, the first six feature variables are selected as the input variables set through many tests. The six variables are SSRD, TSR, RH, STRD, 2T, 10U.  
The photovoltaic power generation will show different trends under different weather conditions, and the prediction accuracy will be improved by classifying the original data and selecting similar sample. A fuzzy clustering algorithm can deal with similarity and fuzzy relations, so the algorithm is used to further process the data. On the one hand, too many classification types will make the number of samples for each type too small. On the other hand, PV output usually shows instability in the case of bad weather such as rainy days. The data are divided into sunny and rainy days by a fuzzy C-means clustering algorithm. The algorithm theory and calculation process are described in [20].