# Deep-Learning Model Selection and Parameter Estimation from a Wind Power Farm in Taiwan +
## 3 Determining the Hyperparameters for the Developed Model with Q-Learning Scheme
### Overall Process for Model Operations  
A detailed flowchart of the developed model for wind power forecasting is shown in Figure 6. The figure also illustrates the proposed TCN model incorporating three subphases in the model operation process: (i) data pre-processing, (ii) model training (vs. determination of proper setting for hyperparameters), and (iii) model validation.  
Step 1. Data pre-processing  
The wind turbine built in the Chang-Bin industrial zone is a Vestas V80 2 MW exemplar turbine. It has a rotor diameter of 80 m, hub height of 67 m, and rated speed of 14.5 m/s. A wind power farm in an industrial zone was built in 2006. Tai-Power Company constructed  
Figure 6: Execution process of the developed model for wind power forecasting.  
a total of 23 wind turbines with a capacity of 2 MW, of which eight were erected in the western area of the Chang-Bin industrial zone, and the remaining 15 turbines were erected in the LunWei District. The experimental data are summarised as shown in Table 3.  
Once the wind turbine location is located, the forecasting algorithm can include future weather forecasting data from the Central Weather Bureau (CWB) in Taiwan, where the forecasts on the CWB website are issued four times daily, updating future 7-day ahead weather forecasts for various areas of Taiwan. Moreover, historical data contain real weather observations and wind turbine power outputs with anomalous data, and engineers need to pre-process data for wind farm datasets before performing model pre-training.  
Step 2. Model training  
Step 2.1. Initial setting of hyperparameters from GitHub  
Then, the proposed model uses a set of pre-training parameters from keras-tcn at GitHub [29] as initial parameters for model training. keras-tcn was used as the transfer learning (TL) model to fine-tune the developed model and improve learning speed and training accuracy. In the experiment, four crucial architecture-related parameters (hyperparameters) were selected from the transferring learning cases in the TCN predictor, namely (i) number of stacks, (ii) filter size, (iii) dilatation coefficient, (iv) activation function, and (v) optimiser. The accuracy (%) associated with the distinct model parameters for wind power prediction will be examined using Q-learning algorithm.  
Step 2.2. Hyperparameter tuning of the model  
In this phase, the following sub-steps were used to determine the proper parameters for the training model for wind-power forecasting using the Q-learning algorithm (Algorithm 1), by exploring these possible solutions and deciding on the proper parameter selection for the training model.  
Step 3. Model validation  
In the following, the system provides the benefit of a quick response for wind power forecasting through the use of neural net weights using four trained DLN models. To validate the accuracy of the four experimental models, an evaluation index was chosen to evaluate the prediction performance of the proposed model as follows:  
The _MAPE_ can be defined as  
\[MAPE=\frac{1}{N}\sum_{t=0}^{N}|\frac{O_{t}-\hat{O_{t}}}{O_{t}}|, \tag{16}\]  
where \(O_{t}\) is the real wind power value, \(\hat{O_{t}}\) is the estimated wind power output, and \(N\) is the number of data points. As presented in Equation (15), the MAPE is calculated by dividing the estimation error by the real value of wind power generation.