## 3 Results and Discussion
### Experimental Results  
In this section, the model prediction results were compared and analyzed. The three evaluation index values of the proposed model and the comparative model are listed in Table 3, including the RMSE, MAE, and \(R^{2}\). To display the error metrics more visually, line charts are used to illustrate the RMSE, MAE, and \(R^{2}\) values of the model. The RMSE, MAE, and \(R^{2}\) values of the model used for prediction are shown in Figure 9.  
In order to more accurately demonstrate the effectiveness of the proposed HPO-KNN-SRU model, the improvement percentage \(P_{RMSE}\), \(P_{MAE}\) and \(P_{R2}\) of the HPO-KNN-SRU and other models are calculated as shown in Table 4.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **RMSE** & **MAE** & \(R^{2}\) & **Prediction Time (s)** \\ \hline SVR [25] & 0.368872 & 0.245083 & 0.942776 & 12.89 \\ LSTM [28] & 0.3391 & 0.168834 & 0.951644 & 2.17 \\ TCN [29] & 0.348872 & 0.159059 & 0.948817 & 130.70 \\ SRU & 0.338814 & 0.175804 & 0.951726 & 1.99 \\ KNN-SVR & 0.322538 & 0.225872 & 0.956677 & 7.81 \\ KNN-SRU & 0.28257 & 0.137469 & 0.966773 & 1.48 \\ HPO-KNN-SRU (Only optimize knn) & 0.280128 & 0.135529 & 0.967399 & 1.48 \\ HPO-KNN-SRU & 0.280064 & 0.131874 & 0.967414 & 1.45 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Performance metrics for experimental models.  
Figure 9: Performance metrics line charts for experimental models.  
Several conclusions can be drawn from the detailed analysis in Table 3, Figure 9, and Table 4:  
1. It is obvious that the proposed HPO-KNN-SRU model has the lowest RMSE and MAE and the largest \(R^{2}\). The RMSE, MAE and \(R^{2}\) of HPO-KNN-SRU are 0.280064 KW, 0.131874 KW, 0.967414. Compared with other comparison models, the RMSE of the HPO-KNN-SRU is reduced by 19.63% on average, the MAE is reduced by 27.54% on average, and the \(R^{2}\) is increased by 1.96% on average.
2. From the analysis of the experimental results of the SRU, SVR, LSTM and TCN, the SRU takes the least time to verify when the accuracy is not much different.
3. Comparison of the experimental results of the KNN-SRU, KNN-SVR with SRU, and SVR shows that the KNN can handle outliers in photovoltaic power data well so as to improve prediction accuracy.
4. From the comparison between the HPO-KNN-SRU and HPO-KNN-SRU (only optimizing the KNN), HPO-KNN-SRU (only optimizing the KNN), and KNN-SRU, it is proved that the HPO algorithm can be used as an effective method for SRU and KNN model parameter optimization.  
In order to display the prediction results more intuitively and further verify the effectiveness of the model, the prediction results for the HPO-KNN-SRU model and SVR, LSTM, and the TCN are compared with the observation results. The prediction results and observation results are shown in Figure 10, and the prediction errors are shown in Figure 11. The 95% prediction band plot of predicted values and observed values is shown in Figure 12.  
As can be seen from the figure, the prediction value deviation obtained by the HPO-KNN-SRU model is the smallest overall and the 95% prediction band is the smallest. More importantly, the correlation between HPO-KNN-SRU predictions and observations is stronger than other models, which is consistent with the highest \(R^{2}\) of the HPO-KNN-SRU model, as shown in Table 3 and Figure 9. In summary, the HPO-KNN-SRU model proposed in this paper can better capture the nonlinear characteristics of photovoltaic power time series, thereby obtaining better prediction ability.  
Figure 11: Prediction errors.  
Figure 12: The 95% prediction band: (**a**) The 95% prediction band for SVR. (**b**) The 95% prediction band for LSTM. (**c**) The 95% prediction band for TCN. (**d**) The 95% prediction band for HPO-KNN-SRU.