# Prediction of Wind Power with Machine Learning Models
## 2 Materials and Methods
### Obtaining Parameters and Pre-Processing
Figure 1: Esenkoy wind turbine location [30]. Some terms in the correlation matrix are here briefly explained. Rainfall has its quantity expressed in millimetres per hour. Air density pertains to the air per unit volume group, which indicates the air mass that fills a given space. Furthermore, solar radiation denotes the energy emitted by the sun through electromagnetic waves. Cloud cover ratio, also known as cloud cover percentage or cloudiness, pertains to the proportion of the sky obstructed by clouds at a particular location and time. Wind speed relates to the velocity at which air molecules move horizontally within the atmosphere. Wind direction denotes the direction from which the wind emanates. Figure 3 illustrates paired scatter plots that depict the interrelationships among various features. The scatter plots featuring a diagonal structure visually present histograms that outline the probability distribution of individual weather features. Scatter plots visualise the connections between these distinct features within the lower and upper triangles. Furthermore, each feature exemplifies its distribution alongside the other features. These paired scatter plots make alterations in one specific feature concerning all other features apparent. Before model training, the removal of outliers is necessary. This process may involve handling missing data by either removing or imputing them, converting categorical variables into numerical values, and scaling the data. Wind speed values below 3.5 m/s or above 25.5 m/s need to be cleaned, as they do not align with the turbine's appropriate power curve. This specific range represents values within which the turbine operates efficiently. Similarly, even if the wind speed exceeds 3.5 m/s, if the active power value is zero, this indicates that the turbine is not active during those time intervals. Lastly, data points with negative active power values should also be cleaned. I utilised the quartile method to clean outliers in the active power column, which involves identifying and removing outliers in a data set using the data's quartiles (Q1 and Q3) along with the calculation of  
Figure 2: Correlation of input parameters with active power. the interquartile range (IQR). Outliers were defined as values that fall outside the range of Q1 \(-\) 1.5 * IQR to Q3 + 1.5 * IQR, and these values were excluded from the data set. As a result of this process, 68 outliers were removed. kNN can be particularly effective in completing missing data, especially in the case of minor data gaps and when a suitable similarity measure is chosen. However, its performance may decrease with significant data gaps or high-dimensional data sets, so it is crucial to select an appropriate approach to address data incompleteness. In this study, the kNN technique was employed for imputing missing values, with the chosen value of K being 5. Figure 4 illustrates the wind power curve generated from the cleaned data after removing the outlier. This curve visually represents the variation of active and theoretical power for wind speed. Upon analysis of the chart, it is evident that the power production curve attains its utmost point when the wind speed approaches approximately 13 m/s and continues in a straight line. Figure 3: Histograms and intensities for variables. The parameters used in active power prediction models have different vector values. Hence, normalising these input vectors provides several advantages to ensure their standardisation. Hence, the input features/tensors were scaled to a range of 0 to 1 before being fed into the DL layers using a min-max scaler. The normalised scale of a value was calculated using Equation (1):  
\[X_{scaled}=\frac{x_{o}-min(x)}{max(x)-min(x)} \tag{1}\]  
Here, \(X_{scaled}\) is the normalised value, \(x_{o}\) is the original value, and max(x) and min(x) are the series' most significant and minor values, respectively.