Predict the weather conditions of a day in NYC or other large cities using various machine learning algorithms. Observe the accuracy of each model in all categories of weather conditions. Prediction is split into 5 categories:
- Sky - Clear vs Cloudy
- Rain
- Thunderstorm
- Snow
- Fog - Mist and Haze included
This split allows the models to be properly fitted to a single feature rather than overextending themselves too thin.
Prediction requires four input values from the user:
- Date to predict
- Current Temperature
- Current Pressure
- Current Wind Direction
This four gives the best accuracy across all models tested. Any less or more increases the error of the predictions.
Models were trained on data from: https://www.kaggle.com/selfishgene/historical-hourly-weather-data?select=weather_description.csv.
Model is currently trained on NYC but can be easily swapped with other cities from the dataset.
Accuracy of some of the models used: | Example of weather pridiction: |
---|---|
Clone this repo and cd into it:
git clone https://github.com/ShanaryS/weather-prediction-ML.git
cd weather-prediction-ML
Create and activate your virtual environment:
- Windows:
virtualenv env
.\env\Scripts\activate
- MacOS/Linux:
virtualenv --no-site-packages env
source env/bin/activate
Install the required packages:
pip install -r requirements.txt
- Train Models:
python run_training
- Predict Weather:
python run_prediction