## 3 Model Establishment
### Feature Engineering  
The data determines the upper limit of machine learning, and the algorithm approximates this upper limit as much as possible. Feature engineering refers to the process of transforming raw data into training data for the model. Its purpose is to obtain better training data characteristics. The first thing we need to do is extract more features from the original data. We suppose that wind power is associated with some time features. Then, we create some time features, such as day of the week and hour of day. In addition to these above features, we guess that the current wind power may be related to the wind power from 24 and 48 h earlier. All supposed time features are created. The details of these time features could be found in Table 1.  
We then create certain features, and in Figure 1, the Pearson correlation coefficient matrix is expressed as a heatmap. The Pearson correlation coefficient can describe the linear correlation between two features. We find that some features we created have a stronger linear correlation with other features, for example, \"month\" and \"day\". According to the message of the heatmap, the Pearson correlation coefficient between these two features approaches one. Two features with complete linear correlation can be expressed by each other, which means that the contained information of these two features have no differences. For the two features with strong linear correlation, removing one of them can improve the accuracy of the model with less data information loss. Therefore, we drop the \"month\" feature.  
However, the process of filtering features is not still over. Here, we continue to select features with help from XGBoost. First, we use all features to build a model based on XGBoost. Then, we calculate the value of importance of every feature. The value of importance indicates how much this feature affects the model based on XGBoost. In Figure 2, the F score represents the value of importance. Based on the value of importance, we drop some features whose value of importance is smaller than other features. In Figure 2, the two features are \"day\" and \"dow\", whose F scores are significantly smaller than other features. Therefore, for the model based on XGBoost, these two features play an unimportant role in forecasting. In other words, these two features have a weaker correlation with wind power than other features. Consequently, these two features containing \"day\" and \"dow\" are  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Feature** & **Meaning** \\ \hline dow & day of the week (integer 0–6) \\ doy & day of the year (integer 0–365) \\ day & day of the month (integer 1–31) \\ month & month of the year (integer 1–12) \\ hour & hour of the day (integer 0–23) \\ minute & minute of the day (integer 0–1339) \\ t\_m24 & wind power value from 24 h earlier \\ t\_m48 & wind power value from 48 h earlier \\ \hline \hline \end{tabular}
\end{table}
Table 1: Meaning of different time features.  
Figure 1: Heatmap of Pearson correlation coefficient matrix.  
dropped. In the end, the input features of XGBoost are composed of \"speed\", \"direction\", \"doy\", \"t_m24\", \"temperature\", \"hour\", \"t_m48\", \"humidity\", and \"pressure\".