# Improved Probability Prediction Method Research for Photovoltaic Power Output
## 2 Single Improved Prediction Model
### Improved Least Squares Support Vector Machine Error Prediction Model
#### 2.2.2 Error Probability Distribution of Power Prediction  
If the potential law of the prediction error can be properly expressed, then the prediction value can be corrected to improve the prediction performance. In this paper, the prediction values are obtained via LSSVM, and the corresponding prediction error values are be obtained by calculation. The methods for estimating the distribution of error can be divided into parameter estimation and non-parametric estimation. The parameter estimation assumes that the data sample obeys a known distribution function, and that the samples are used to estimate the parameter values of the distribution function. Normal distribution, T-location-scale distribution, and logistic distribution are the distribution functions commonly used. Non-parametric estimation is based on the characteristics of the sample data, not a priori estimation of data samples. The entire estimation process is completely driven by the data samples, and has a strong utility to the problem which is impossible to estimate the characteristics of its sample data in advance. Kernel density estimation (KDE) [35] is chosen as the nonparametric estimation method in this paper. \(X_{1},X_{2},\cdots,X_{n}\) is the overall sample, and \(x_{1},x_{2},\cdots,x_{n}\) represents the observed values of samples. The kernel density estimate of the probability density function at any point \(x\) is defined as  
\[f_{h}(x)=\frac{1}{nh}\sum_{l=1}^{n}K(\frac{x-X_{i}}{h}) \tag{12}\]  
where \(f_{h}(x)\) is the estimated probability density function, \(h\) is the window width, and \(K(\cdot)\) is the kernel function.  
Through statistical analysis of the error between the actual and predicted values of photovoltaic power generation, we find that the prediction errors in different power intervals have different distributions, which is quite different from the distribution of the overall prediction error. Therefore, this paper divides the data into multiple intervals, and performs statistical analysis on the error of each interval to calculate the probability density function. When the sample data is relatively sufficient, the empirical distribution is similar to the overall distribution, and it can be treated as the total distribution.  
For the division of intervals, there are no fixed rules to follow. If the number of the intervals is too large, the amount of sample data in each interval will be small. The empirical distribution will be different from the overall distribution, which cannot reflect the real information of sample data. On the contrary, the intrinsic information and the meaning of segmentation statistics will be lost. Assuming that the length of the interval is \(\Delta P\) and the power interval range is \([P_{1},P]\), the power is divided at equal intervals.  
\[D_{i}=[P_{1}+(i-1)\Delta P,P_{1}+i\Delta P] \tag{13}\]  
where \(i=1,\cdots,N\), and \(N\) is the number of intervals.  
By dividing the range of each interval by Equation (13), there may be cases where the number of samples in some intervals is too small. In order to better reflect the distribution of data, it is necessary to adjust the range of the interval to a certain extent, according to the actual situation.