Git Product home page Git Product logo

ksa_weather_prediction's Introduction

Temperature and Wind Speed Forecasting using Two Machine Learning Models

image

Contents

Project Describtion

The idea of the project is to build machine learning model that able to forecast the weather elements in Saudi Arabia. The main goals this project are:

  • Predict Temperature and Wind Speed for different cities in Saudi Arabia.

  • Compare the results of using two ML models.

  • Use the available data to understand how is the weather is changing in Saudi Arabia.

Dataset

The dataset contains a 249023 rows and 15 columns, and these columns are:

Variable Describtion
City 13 major cities in Saudi Arabia
Date Record date in DD/MM/YY formats
Time Recored time in 24-Hour time format
Year Recorded Year
Month Recorded Month
Day Recorded Day
Hour Recorded Hour
Minute Recorded Minute
Weather Describtion of weather condition ( Clear - Sunny - Cloudy - ... )
Temperature Rerorded temprature (in °C)
Wind wind speed measured (in kph)
Humidity Percentage of humidity
Barometer Atmospheric pressure (in hPa)
Visibility a measure of the distance at which an object or light can be clearly discerned (in km)

Programming Language and Libraries

Python:

  • Pandas
  • NumPy
  • Matplotlib
  • Seaborn
  • Scikit-Learn

Approach:

Two machine learning models are used to for the predictive analysis:

  • Linear Regression
  • Random Forest

Limitation:

  • Limited Data Available.
  • Not using time series analysis for forecasting.
  • Few models were used.

Results and Evaluation:

MAE (Mean absolute error), and R-squared are used to evaulate model accuracy.

Temperature Using Linear Regression:

Accuracy for Linear Regression: 0.7785913886229557

Temperature Using Random Forest:

Accuracy for Random Forest: 0.9803790198725455

Wind Speed Using Random Forest:

Accuracy for Wind Speed: 0.5938123950492595

Future work:

  • Include more cities
  • Use analysis information to help estimate the potential for solar and wind energy in Saudi Arabia.
  • Forecast the rainfall as well.
  • Make the prediction using Time Series Analysis.

Conclusion:

The data for the Saudi Arabia Weather History was obtained and utilized to perform predictive machine that can forecast the temprature and wind speed. An Exploratory Data Analysis were carried out to find the trending weather behaviour in Saudi Arabia. Although a relativly good accureacy were achived, this model is not so reliable as the sample size were not big enough (only 3 years time range). Two machine learning models were trained, tested, then compared to find the optimal model. To evaluate the model accuracy, several evaluation metrics were used for comparison (MAE, MSE, and R^2). The R2 for random forest model was 0.98 which is better than 0.78 in the linear regression model.

ksa_weather_prediction's People

Contributors

imohammed-alamer avatar m0hannad avatar sillyrobot883 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

omkar441

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.