# The Integration of Internet of Things and Machine Learning for Energy Prediction of Wind Turbines
## 3 ML for Wind Energy Prediction
### Dataset and Preprocessing  
The Wind Power Generation Data--Prediction dataset was acquired from Kaggle ([[https://www.kaggle.com/datasets/mubashirrahim/wind-power-generation-data-forecasting/data](https://www.kaggle.com/datasets/mubashirrahim/wind-power-generation-data-forecasting/data)]([https://www.kaggle.com/datasets/mubashirrahim/wind-power-generation-data-forecasting/data](https://www.kaggle.com/datasets/mubashirrahim/wind-power-generation-data-forecasting/data)), accessed on 7 November 2024) and uploaded to the Kaggle platform by [PERSON]. The meteorological equipment--IoT devices deployed at the site was used to meticulously gather the data. There is no guarantee of data quality, which could affect the accuracy of the results. Furthermore, there is no validation or assurance that the report on time measurements is correct. Deep neural networks could potentially replace regression models in situations where the dataset is significantly larger and includes real-time data. The meteorological apparatus measured temperature, humidity, dew point, and wind properties at predetermined elevations of 2 m, 10 m, and 100 m. Concurrently, sensors were installed on wind turbines to monitor their efficiency and electricity production. The datasets consist of a detailed hourly log obtained from four distinct sites, spanning from 2 January 2017, 00:00:00, to 31 December 2021, 23:00:00. The data underwent rigorous quality checks to detect and rectify any anomalies or inconsistencies, ensuring a high level of data reliability. Regular equipment maintenance has consistently ensured the quality of data over time. The following are the columns and weather parameters in the data:  
* Time: The moment in the day when the measurements were made. * temperature 2m: The temperature in degrees Fahrenheit at two meters above the surface. * relativehumidity 2m: The proportion of relative humidity at two meters above the surface. * dewpoint 2m: Dew point, measured in degrees Fahrenheit at two meters above the surface. * windspeed 10m: The wind speed, expressed in meters per second, at 10 m above the surface. * windspeed 100m: The speed of the wind at 100 m above sea level, expressed in meters per second. * winddirection 10m: The wind direction at 10 m above the surface is represented in degrees. (0-360). * winddirection 100m: The direction of the wind at 100 m above the surface, expressed in degrees (0-360). * windgusts 10m: A wind gust is an abrupt, transient increase in wind speed at 10 m.
* Power: The normalized turbine output, expressed as a percentage of the turbine's maximum potential output, and set between 0 and 1. The normal or Gaussian distribution that is indicated in Figure 9 represents the famous bell-shaped curve, which is characterized by the arithmetic mean \(\mu\) and the standard  
Figure 8: Employing meteorological data to predict electric energy levels. deviation \(\sigma\). The normal distribution is the most frequently employed probability and statistics distribution. Contemporary techniques like linear regression, analysis of variance (ANOVA), and t-tests heavily depend on the assumption that the data follow a normal distribution. Because the dataset contains outliers, which indicate the accuracy of the sensors' measurements, the curves do not have a well-defined shape [21]. Libraries: Python's libraries for data analysis, visualization, and scientific computing are extensively utilized. They provide a comprehensive range of tools and features that make it easier to explore data and generate insights [22]. The libraries to be utilized in the preprocessing stage are as follows:  
* Pandas is a robust Python 3.13.0 ([[https://www.python.org/](https://www.python.org/)]([https://www.python.org/](https://www.python.org/)), accessed on 26 September 2024) package utilized for the manipulation and analysis of data. The software provides data structures such as DataFrames and Series, which facilitate the manipulation and analysis of organized data.