Weather Prediction Using Machine Learning
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 Linear Regression algorithm. For the project we will using Python, Numpy, Jupiter notebook and Panda. The project split into separate Jupiter notebooks one to collect the weather data and inspect it.
Prerequisites
To run this project on your local system requires the following packages to be import:
- numpy
- matplotlib
- panda
Let’s earn some knowledge about programming language, libraries and editor used to build this project.
- NumPy : Used for storing and manipulating high dimensional arrays.
- Matplotlib : Used for plotting.
- Google Colab : Used as the development environment for executing high-end computations on its backend GPUs/TPUs and for editing Jupyter Notebooks.
- 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 forecasting 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.
The project simply uses temperature for training the data. Here these data are then trained using Linear Regression for the prediction.
Functional Requirements
- The system must provide the predicted weather.
- The system must have an easy to use interface for using the system for all the users.
- The admin must be able to update the dataset
- The dataset of the weather must be available for the system
Data Collection
Data and Regression analysis
Machine Learning
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.
Result
The prediction system works properly. The values of all the attributes were properly preprocessed. After all the preprocessing 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 linear regression algorithm and are very essential for improving the future performance for the people. For predicting the weather, the linear regression algorithm algorithm 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.