## 4 Forecasters Development
### Development of the Artificial Intelligence Models
#### 4.2.2 Models Hyper-Parameters Adjustment  
Once the inputs of the models have been selected, the next step is to adjust the hyper-parameters that each model has. The hyper-parameters are variables that describe the models and determine how the training process will be. They are adjusted depending on the characteristics of the problem to be solved to avoid creating an oversized model. A good adjustment of these hyper-parameters prevents problems such as overfitting and helps to achieve better behavior. Finally, although some of the hyper-parameters are common, each model has different hyper-parameters since each one has its own design and functionality. Finally, the same training conditions have been taken into account in all three AI models. Furthermore, as concluded in previous work [34], the use of a Time Window (TW) of 10 days is appropriate. It should also be noted that all three AI models train (using the previous 10 days) a new model to predict the PV production of each day during the month of July. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Input Combinations** & **FFNN Model R\({}^{2}\)** & **NARX Model R\({}^{2}\)** & **SVR Model R\({}^{2}\)** \\ \hline Solar Irradiance & 0.893 & 0.828 & 0.913 \\ Solar Irradiance + Temperature & 0.881 & 0.789 & 0.904 \\ Solar Irradiance + Wind speed & 0.879 & 0.794 & 0.906 \\ Solar Irradiance + Wind speed\_dq 1 & 0.870 & 0.776 & 0.905 \\ \hline \hline \end{tabular} \({}^{\dagger}\)Wind speed\_dq refers to direction-weighted wind speed.  
\end{table} 
Table 1: R\({}^{2}\) results of the input combinations tested. Figure 10: Methodology for developing AI-based models. Hyper-Parameters Adjustment of FFNN  
For the case of the FFNN model, being one of the simplest ANNs, the hyper-parameter to be adjusted is the number of neurons in the hidden layer. In order to determine which number best fits our problem, tests have been carried out with values from 2 neurons to 20 neurons, increasing the number gradually. When observing the results shown in Table 2, it can be seen that the highest R\({}^{2}\) is obtained with a value of 5 neurons. As for the rest of the metrics, the lower MAE is also achieved with five neurons. In addition to looking for the highest R\({}^{2}\) metric, the performance has also been analyzed throughout the training process, ensuring that the network has no overfitting and verifying that the validation errors are slightly higher than the training errors. Hyper-Parameters Adjustment of NARX  
The hyper-parameters that have been adjusted in order to improve as much as possible the accuracy of the forecasting performed by the NARX model are: (i) the number of neurons in the single hidden layer and (ii) the input and feedback delays. Regarding the number of neurons selected in the hidden layer, it has been observed that increasing the number of neurons not only did not improve the accuracy with which the NARX model made the prediction but also the phenomenon of overfitting appeared. In order to select the optimum number of neurons, the daily prediction for the month of July has carried out with 1, 2, 3, 4, 5, and 10 neurons. It was found that the best results were obtained with 1 and 3 neurons, obtaining a significant improvement in the R\({}^{2}\) metric. In addition, in the adjustment of both delays, as can be seen in Table 3, the predictions have been carried out with different combinations of the delays in the input and feedback. The delay numbers in the input have been limited in order to avoid representing the dynamics between irradiance (input) and PV production (output), considering the physical relationship between these two variables. So, delays of 2 and above are not taken into account. Obviously, many more simulations have been performed than those shown in the table above. However, it is the results gathered in Table 3 that allow us to draw useful conclusions regarding the optimal value that the hyper-parameters of the NARX model should have.