This project predicts wind turbine power output based on several environmental variables: wind speed, wind direction, and temperature. It applies multiple machine learning models to the problem, trains them on the data, and combines their outputs using a voting regressor to generate predictions.
First, data is generated using the Weibull distribution for wind speed, a uniform distribution for wind direction (-2, -1, 0 , 1, 2 ...), and a normal distribution for temperature. This data is then preprocessed using a custom DataProcessor class that scales the wind speed, wind direction, and temperature.
The machine learning models used in this project include a linear regression, a Gaussian process regressor, a multi-layer perceptron regressor, and a support vector regressor. These models are trained on the preprocessed data, and their outputs are combined using a voting regressor to create the final predictions.
To install the necessary packages, run the following command:
To generate wind turbine data, use the generate_data
command:
python -m wind_turbine_power.cli generate_data --size 1000 --cut_in 3.5 --rated_speed 15 --rated_power 25 --cut_out 25 --shape 2 --scale 2 --random_seed 42 --out_path ./data/raw/wind_turbine_data.csv
To train the prediction model, use the train_model
command:
python -m wind_turbine_power.cli train_model --data_path ./data/raw/wind_turbine_data.csv --model_path ./data/processed/wind_turbine_model.pkl
To predict power output for given wind speed, wind direction, and temperature, use the predict
command:
python -m wind_turbine_power.cli predict --model_path ./data/processed/wind_turbine_model.pkl 24.5872 0 20
Please note that the wind speed should be in m/s, the wind direction in this format (-2, -1, 0 , 1, 2 ...), and the temperature in Celsius.
This project can be extended to include more environmental factors that affect wind turbine output. Moreover, more complex machine learning models can be employed to improve prediction accuracy.