Skip to content

Predict the weather conditions of a day in NYC using Machine Learning

License

Notifications You must be signed in to change notification settings

ShanaryS/weather-prediction-ML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather Prediction using Machine Learning

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:
Demo #1 Demo #2

Installation

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

Usage

  • Train Models:
python run_training
  • Predict Weather:
python run_prediction

License

MIT

About

Predict the weather conditions of a day in NYC using Machine Learning

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages