## 3 Data Filtering for Short-Term Forecasting of Photovoltaic Power Plants Generation
### The K-Means Filtration Method
The clustering observations results using the k-means method are presented in Figure 9c,d, as well as in Table 4. The value of the final silhouette measure obtained from the clustering results by the k-means method, averaged between all observations, is 0.52, which confirms the good quality of the observations division into clusters. The calculation time was 1 h 56 min. Figure 9: Geometric interpretation of data initialization and clustering results using the k-means method. The k-means clustering makes it possible to divide observations into clusters that are similar in terms of cloudiness, time of day and season. Observations combined in this way should have similar transparency index values \(k_{T}\). A number of parameters are used for the numerical evaluation of transparency index observations obtained within the clusters: arithmetic mean value, median, mode, mean-square deviation. Observations that differ significantly from the rest in the cluster are recognized as outliers and are considered unreliable. The following expression is used for determining the cluster outliers:  
\[X-n\cdot\sigma_{k_{T}}\leq k_{T}\leq X+n\cdot\sigma_{k_{T}}, \tag{5}\]  
where \(k_{T}\)--the transparency index, (p.u. ); \(\alpha_{k_{T}}\)--the transparency index standard deviation, (p.u. ); \(n\)--the number of transparency index standard deviations; \(X\)--arithmetic mean, median or mode of the transparency index for a given cluster (p.u.). Table 4 shows the results of calculating the parameters for forecasting accuracy estimation for various combinations of \(X\) and \(n\). The analysis of the Table 4 shows that the observations filtering using the transparency index median of each cluster has the greatest efficiency in determining outliers within the clusters; the number of the transparency index mean-square deviations for the confidence range is 1.5. The results of calculating the parameters for estimating the PVPP generation forecasting accuracy using the k-means method for filtering data are presented in Table 5.  
Advantages of filtering the initial data using the k-means method: more accurate transparency index outliers identification compared to an empirical model, since the analysis takes into account the season and day time; the versatility of the proposed method for power plants various geographic locations; less chance of over-filtering observations compared to the empiric approach. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \(\mathbf{X}-\mathbf{n}\cdot\mathbf{\delta_{k_{T}}}\leq\mathbf{k_{T}}\leq\mathbf{X+n\cdot\omega_{k_{T}}}\) & \(\mathbf{E_{\Sigma}}\), \(\mathbf{\mathrm{kW}}\)-\(\mathbf{h}\) & \(\mathbf{\sigma_{E}}\), \(\mathbf{\mathrm{kW}}\)-\(\mathbf{h}\) & \(\mathbf{E_{avg}}\), \(\mathbf{\mathrm{kW}}\)-\(\mathbf{h}\) & \(\mathbf{E_{\Sigma}^{\%}}\), \% \\ \hline \(X\)—arithmetic mean, \(n=0.5\) & 464,104.24 & 1560.80 & 815.65 & 20.76 \\ \(X\)—arithmetic mean, \(n=1.0\) & 442,004.04 & 1486.48 & 776.81 & 19.77 \\ \(X\)—arithmetic mean, \(n=1.5\) & 437,334.47 & 1274.05 & 768.60 & 19.56 \\ \(X\)—arithmetic mean, \(n=2.0\) & 496,591.54 & 1470.06 & 872.74 & 22.21 \\ \(X\)—median, \(n=0.5\) & 449,945.86 & 1361.23 & 790.77 & 20.12 \\ \(X\)—median, \(n=1.0\) & 424,117.13 & 1271.61 & 745.37 & 18.97 \\ \(X\)—median, \(n=1.5\) & 417,287.68 & 1214.58 & 733.37 & 18.66 \\ \(X\)—median, \(n=2.0\) & 438,152.06 & 1289.76 & 770.04 & 19.60 \\ \(X\)—mode, \(n=0.5\) & 495,570.51 & 1466.62 & 870.95 & 22.16 \\ \(X\)—mode, \(n=1.0\) & 466,985.74 & 1373.99 & 820.71 & 20.89 \\ \(X\)—mode, \(n=1.5\) & 471,971.92 & 1387.26 & 829.48 & 21.11 \\ \(X\)—mode, \(n=2.0\) & 530,260.45 & 1583.29 & 931.92 & 23.72 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Results of calculating the parameters for forecast accuracy estimating for various combinations.