*5.3. The Quantitative Comparison of Results*

To evaluate the performances of above-mentioned PGPMs more precisely, Mean Absolute Error, Root of Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE) of each PGPM were evaluated and compared. Moreover, a R-square coefficient [26] is also introduced into the paper to calculate the fitting accuracy, which can be expressed by

$$MAE = \frac{1}{n} \sum\_{i=1}^{n} |\mathcal{Y}\_i - \mathcal{Y}\_i| \tag{13}$$

$$RMSE = \sqrt{\frac{1}{n} \sum\_{i=1}^{n} (\mathcal{Y}\_i - y\_i)^2} \tag{14}$$

$$MAPE = \frac{1}{n} \sum\_{i=1}^{n} \left| \frac{\mathcal{Y}\_i - \mathcal{Y}\_i}{\mathcal{Y}\_i} \right| \times 100\% \tag{15}$$

$$R-square = \frac{\sum\_{i=1}^{n} \left(\mathcal{Y}\_{i} - \overline{\mathcal{Y}}\_{i}\right)^{2}}{\sum\_{i=1}^{n} \left(y\_{i} - \overline{y}\_{i}\right)^{2}}\tag{16}$$

where *yi* is the generating energy (true data) of the *i*-th sample; *y*ˆ*<sup>i</sup>* is the prediction of the *i*-th sample; *R* − *square* is a coefficient with a range of [0 1], and the closer this value is to 1, the higher the fitting accuracy.

According to Equations (13) to (16), the prediction errors and fitting accuracy of above-mentioned PGPMs are shown in Table 7.


**Table 7.** Comparison of different PGPMs.

As Table 7 shows, the prediction errors of the proposed PGPM were 10.2 kWh, 8.6 kWh, and 2.8%, which were the smallest among these six algorithms. Moreover, from Table 6, taking RMSE as an example, it can be found that the prediction errors of the PGPMs based on SVR, Decision Tree, and Random Forest were 238.9 kWh, 236.0 kWh, and 231.8 kWh, respectively, which are generally more than 200 kWh, as well as that of the PGPMs based on LSTM and Bi-LSTM being less than 30 kWh. Hence, the performances of LSTM- and Bi-LSTM-based PGPM are better than that of SVR-, Decision Tree-, and Random Forest-based PGPMs. Simultaneously, with the introduction of the attention mechanism, the proposed PGPM also achieved better prediction accuracy than that of LSTM- and Bi-LSTM-based PGPMs. The metrics of MAE and MAPE showed similar results.

Additionally, the fitting accuracy was also evaluated in this paper. Fitting accuracy is another indicator for evaluating prediction efficiency, which represents the relative prediction error and can be used as a sign of the similarity between the predicted value and the true value. From Table 6, it can be found that the fitting accuracy of the proposed PGPM was 0.9997, slightly more than that based on LSTM and Bi-LSTM, but obviously more than that of SVR-, Decision Tree-, and Random Forest-based PGPMs. Therefore, in the metric of fitting accuracy, the proposed Attention-Bi-LSTM PGPM achieves the best performance, and is consequently very suitable for application in power generation forecasting scenarios.
