Code Monkey home page Code Monkey logo

weather-prediction-ml's Introduction

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

weather-prediction-ml's People

Contributors

shanarys avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.