Weather Prediction Using Machine Learning

Prince Patel
3 min readMar 18, 2021

--

Weather is a important aspect of a person life as it can help us to know when it will rain and when it will be sunny. Weather forecasting is the attempt to predict the weather condition at some future time and the weather conditions that may be expected. The climatic conditions parameters are based on the temperature, pressure, humidity, dewpoint, rainfall, precipitation, wind speed and size of data set. The parameters temperature, pressure, humidity, dew point, precipitation, rainfall is only considered for experimental analysis..

Firstly, the data is trained. For this prediction, we will be using Auto Regression model. For the project we will using Python, Matplotlib, Pandas, Scikit-learn and Jupyter Notebook.

Let’s earn some knowledge about programming language, libraries and editor used to build this project.

  • Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK+. SciPy makes use of Matplotlib.
  • Pandas is a high-level data manipulation tool developed by Wes McKinney. It is built on the Numpy package and its key data structure is called the DataFrame. DataFrames allow you to store and manipulate tabular data in rows of observations and columns of variables.
  • Scikit-learn is a free software machine learning library for the Python programming language. It features various classification, regression and clustering algorithms including support vector machines.
  • Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.
  • Seaborn Provides a high-level interface for drawing attractive and informative statistical graphics.

Weather Prediction is simply the prediction of future weather based on different parameters of the past like temperature, humidity, dew, wind speed and direction. Weather Prediction is an important factor affecting people lives. Once data is taken, it is trained. The heart of this project is the algorithm which is used to predict the weather using these data. The more parameters considered, the higher the accuracy. This project can help many people finding the weather of tomorrow.

Training a model is the process of iteratively improving your prediction equation by looping through the dataset multiple times, each time updating the weight and bias values in the direction indicated by the slope of the cost function (gradient). Training is complete when we reach an acceptable error threshold, or when subsequent training iterations fail to reduce our cost.

FLOWCHART

GRAPH

DATASET

RESULT

The prediction system works properly. The values of all the attributes were properly pre-processed. After all the pre-processing was completed, model was implemented and it was trained using train data. Our accuracy was found to be around .

CONCLUSION

The weather prediction done using auto-regressive model and are very essential for improving the future performance for the people. For predicting the weather, the auto-regressive model was applied to the datasets of the weather. We made a model to predict the weather using some selected input variables collected from Kaggle. The problem with current weather scenario is that we are not able to prepare our self and not able to do some important works. So, for knowing the weather scenario at high accuracy considering every factor that affects in the weather scenario, this model is created.

--

--

No responses yet