# Prediction of Wind Power with Machine Learning Models
## 2 Materials and Methods
### Error Metrics  
This paper employed various statistical methods to evaluate the accuracy of the ANN-RNN-CNN-LSTM model's predictions. These criteria encompassed commonly utilised error metrics, including RMSE, MAE, and MSE. These were employed to assess the disparity between the predicted and actual values, disregarding the direction of errors or their compensatory effects. Error metrics quantitatively measure how close predictions are to actual data. This helps us evaluate how accurate predictions are. Accurate predictions are crucial for reliable applications like energy resources.  
MAE represents the measurement of the absolute difference between the predicted and actual variables. RMSE represents the standard deviation in prediction errors, with a lower value indicative of a superior model. If the RMSE values of training and testing samples fall within a limited range, the model is considered satisfactory without overfitting. MSE represents the average of the square of errors. The aim was to achieve low MAE, MAPE, and RMSE values indicative of enhanced predictive accuracy. Statistical indicators like MSE, RMSE, and MAE have their advantages and disadvantages. MSE assigns greater weight to larger errors, which makes it more sensitive to outliers or significant errors. This property can be advantageous when dealing with large errors that are particularly costly or need to be minimised. MSE has excellent mathematical properties. It is differentiable, making it suitable for optimisation algorithms and the basis for many statistical methods. While its sensitivity to errors can be advantageous, it can also be a disadvantage. Outliers can disproportionately impact MSE, potentially leading to an inaccurate assessment of model performance. MAE is less sensitive to outliers compared to MSE. It gives equal weight to all errors, which can provide a more robust performance measure in the presence of outliers. MAE gives equal weight to all errors; it may not penalise large errors as heavily as MSE. This can be a disadvantage when large errors need to be minimised or when they are particularly costly [41; 42; 43].  
R\({}^{2}\) functions as a statistical metric that denotes the degree to which the alteration in the independent variable accounts for the variance observed in the dependent variable. It is noteworthy that the R\({}^{2}\) value lay between 1 and 0. A higher R\({}^{2}\) value signifies a better fit of the regression line, indicating that changes in the dependent variable are primarily attributed to changes in the independent variable. Equations (2)-(5) provide the formulas for R\({}^{2}\), RMSE, MSE, and MAE [44; 45].  
\[\text{R}^{2}=\frac{\left(\sum_{\text{i=1}}^{\text{N}}\left(\text{x}_{\text{i} }^{*}-\overline{\text{x}_{\text{i}}^{*}}\right)\left(\text{x}_{\text{i}}- \overline{\text{x}_{\text{i}}}\right)\right)^{2}}{\sum_{\text{i=1}}^{\text{N }}\left(\text{x}_{\text{i}}^{*}-\overline{\text{x}_{\text{i}}^{*}}\right)^ {2}\sum_{\text{i=1}}^{\text{N}}\left(\text{x}_{\text{i}}-\overline{\text{x} _{\text{i}}}\right)^{2}} \tag{2}\]  
\[\text{RMSE}=\sqrt{\frac{1}{\text{N}}\sum_{\text{i=1}}^{\text{N}}\left( \text{x}_{\text{i}}^{*}-\text{x}_{\text{i}}\right)^{2}} \tag{3}\]  
\[\text{MSE}=\frac{1}{\text{N}}\sum_{\text{i=1}}^{\text{N}}\left(\text{x}_{ \text{i}}-\text{x}_{\text{i}}^{*}\right)^{2} \tag{4}\]  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Layer** & **Output Shape** & **Parameter** \\ \hline Conv1D & ( 8, 32) & 128 \\ LSTM & ( 64) & 24,832 \\ Dense & ( 64) & 4160 \\ Dense & ( 32) & 2080 \\ Dense & ( 1) & 33 \\ Total Parameter & & 31,233 \\ \hline \hline \end{tabular}
\end{table}
Table 4: LSTM structure parameters.  
\[\text{MAE}=\frac{1}{\text{N}}\sum_{i=1}^{N}\left|\text{x}_{i}-\text{x}_{i}^{\star}\right| \tag{5}\]  
Here \(\text{x}_{i},\text{x}_{i}^{\star},\text{N},\overline{\text{x}_{i}}\), and\(\overline{\text{x}_{i}^{\star}}\) represent the predicted value, actual value, sample size, mean predicted value, and mean actual value, respectively.