You are on page 1of 4

Weather Prediction using linear regression model

1
U. Vivek Krishna, 1S. Sudhakaran, 1S. Sanju, 1 Dr.R.Kaladevi, 2Hariharan Shanmugasundaram
1
Department of Computer Science and Engineering, Saveetha Engineering College, India
2
Department of Computer Science and Engineering,Vardhaman College of Engineering,India
vivekkrish71@gmail.com, sudhakaran140701@gmail.com, sanju.satish.raman2002@gmail.com,
kalaramar26@gmail.com, mailtos.hariharan@gmail.com

Abstract- Weather prediction has been a delicate authors related. Chapter 3 explains proposed
task in the meteorological department since times due methodology along with dataset snippet, algorithm
to varied reason similar as the drastically unpredicted used and results. Chapter 4 provides the conclusion.
behaviour of climate. These predictions are important
because they impact diurnal life and also affect the 2. LITERATURE SURVEY
frugality of a state or indeed a nation. Our model uses Swift growth in the fields of software operation,
machine literacy algorithm to predict the weather. communication technology and hardware makes it
Our model is intended to provide accurate weather easy to develop new technologies to predict weather.
prediction. Long- term climatic change on Earth and This includes real- world information measures and
the goods it'll have on current and unborn observations. By 2020, it is expected that there will
generations' lives are both unknown. 25 and 50 billion internet connected devices. The
Keywords – Weather prediction, Machine literacy, amount of data available over the internet will
Forecasting. expand. Internet of Things (IOT) technology
continues to broaden the existing Internet by
1. INTRODUCTION permitting relations and commerce in between real
and cyber world [1].
Precise forecasts are essential in moment's world.
People depend on meteorologists in everything they In addition, IOT device ends up being fluently
do, from civilization to product, from business offered because of lower precious sensing units and
passages to particular trip. Since the world is enhanced commerce, the range of gizmos and pieces
experiencing several climatic changes and the of devices that gives precious real- time weather
consequences that follows affects the accuracy of condition probably grow vast [3].
weather forecasting. The weather in one region can
significantly affect the weather in other areas due to Naive Bayes classifier displays accurate results when
the fact that weather systems can travel great used for textual data. This approach provides system
distances in all directions gradually. We propose a to classify events grounded on probability[4].
model to predict weather that combines data from a Logistic Retrogression Algorithm calculates the
specific point with literal meteorological information correlation between the known variable and one or
from adjacent cities. The suggested methodology further unknown variables. Linear Regression gives
makes use of once data to train our model that the output in binary values[5].While KNN makes
predicts the weather with accuracy for the coming predictions based on the dataset. For each new
days. These models can be executed on low- cost, instance( x) search for the value of K most similar
low- resource computing platforms and still deliver instances and predicting the output variable for those
prompt and accurate predictions that are applicable to K cases[6]. RNN, CRBM and CN models- purpose
daily life. is to identify the eventuality of profound literacy
fashion for weather forecasting on deep learning
The major benefactions of this paper includes networks[7]." The result of Back Propagation Neural(
operation of machine learning towards the BPN) model are transferred to a Hopfield Network.
forecasting of meteorological conditions over short The information and yield layer in BPN has three
timescales, which can run on lower resource- neurons, while the hidden layer has five neurons, and
intensive equipment. Hopfield Network displays work with the help of a
training data set[9]. To achieve equilibrium, the
This paper is organised as follows: Chapter 2 system must perform temperature, wind speed, or
provides a brief insights about the works of different humidity flow. The process will be repeated until it
converges, and at each iteration, bias and weight
values should be updated [10].

The above systems discussed various various


machine learning algorithms to predict weather but
till now no solutions are accurate.

3. PROPOSED SYSTEM

The proposed system explains the working model of


the algorithm used in weather prediction

Our model uses linear weather dataset with attributes


which are the crucial factors that impact weather
change, temperature, both maximum and minimum
temperatures, atmospheric humidity, precipitation, the
UV indicator of the atmosphere, and atmospheric mean
Fig 2: Proposed Weather Prediction System
pressure. The collected data is segregated into various
sections that are useful to the machine learning model 3.2 IMPLEMENTATION AND ANALYSIS
that are not in this proposed model. The dataset is also
pre-processed, that is replace the missing and error 3.2.1 Data Set
values in the dataset.The dataset also undergoes data
The proposed system used data which comprise of
pre-processing, which involves putting the data through
fields such as date, temperature at that particular
a procedure that backups any missing or incorrect
date ,maximum and minimum temperature, wind and
values in the dataset with the mean value or the most
weather condition. The dataset is shown in Fig 3.
constant value in that field. Following the data pre-
Depending on geographical location the weather
processing, the cleaned dataset is divided into two sets,
changes. With attributes like min. temperature, max.
the training set and the test set. The training set is used
temperature, humidity, and precipitation. The data
to educate the machine learning model how to compute
set we are working with is for a particular area and is
the results, while the testing set is used to find the
organized by date.
results, compare the real and measured values, and use
the error value as a standard to educate the machine
learning model indeed more. The proposed workflow is
shown in Fig1. 3.2.2 ALGORITHM

In order to read the uniform weather, this paper


introduces a simple linear regression algorithm.
Linear regression is a supervised machine learning
algorithm. The term "linear regression " refers to a
statistical system that displays a direct relationship
between an unknown variable(X-axis) and a known
variable( Y- axis).
Fig.1: Methodology of Weather Forecast System
Linear Regression makes the system to predict Y
obtained on the value of X. Y is the Dependent
Variable ( Response or Output) which is continous. X
3.1 PROPOSED ARCHITECTURE is a independent variable( Predictor). By fitting the
variables to a line, a relationship between the
The architecture shows the process Involved in
independent and dependent variables can be found.
weather prediction with the relationship between user
This line is referred to as a regression line, and a
and machine learning environment in Fig 2.
linear equation represents:

y=mx+c (1)

where, m – slope and x – intercept.


Fig 4: Future Trends

The following three graphs indicates the monthly,


daily and yearly rainfall trends independently in fig
3.3.2.

Fig 3. Snippet of the dataset

In our model we've taken date( ds) as X and


temperature( yhat) as Y. We train our model using
the linear regression algorithm. Our model accepts
date as the input from the user and predict the
temperature on the date given by user as the input.
Our datasets consists of the past dates but not the
future. By using this algorithm we can predict the
accuracy for the future dates

3.2.3 RESULT

The change in temperature over the times has been


depicted in Fig 4 which shows a slight increase in
temperature as we move towards the future.

Fig .5. Yearly , Weekly And Monthly Trends


3.2.4 ANALYSIS [10] Mehrnoosh Torabi, Sattar Hashemi, “A Data Mining
Paradigm to Forecast Weather”, The 16th CSI International
From the result it is inferred that the quadratic Symposium on Artificial Intelligence and Signal Processing
(AISP 2012),IEEE, pp 579-584.
hypothesis cannot be used in ML model. The [11] Amruta A. Taksande, P. S. Mohod, “Applications of Data
hypothesis function should be either cubic or advanced. Mining in Weather Forecasting Using Frequent Pattern Growth
Algorithm”, International Journal of Science and Research (IJSR),
Likewise, point scaling is critical since the value Volume 4 Issue 6, June 2015, pp 3048-3051.
increases as the degree of the polynomial increases. [12] Mr. Sunil Navadia, Mr. Jobin Thomas, Mr. Pintukumar
Before choosing the best match, outliers should be Yadav, Ms. Shakila Shaikh, “Weather Prediction: A novel
approach for measuring and analyzing weather data”, International
avoided or excluded because they're bad for ML conference on I-SMAC (IoT in Social, Mobile, Analytics and
models. This not only increases the model's accuracy Cloud), (I-SMAC 2017), IEEE, pp 414-417.
but also maintains the thickness of the results, which [13] Ghosh et al., "Weather Data Mining using Artificial Neural
Network," 2011 IEEE Recent Advances in Intelligent
may alter if outliers are added. Reputed weather Computational Systems, Trivandrum, 2011, pp. 192-195.
forecasters are not perfect, but their predictions are [14] Sushmitha Kothapalli, S. G. Totad, “A Real-Time Weather
generally more accurate than those of our linear Forecasting and Analysis”, IEEE International Conference on
Power, Control, Signals and Instrumentation Engineering
regression model. This suggests that the weather is a (ICPCSI-2017), pp 1567- 1570.
non-linear system. In addition, the data used in this [15] A. G. Salman, B. Kanigoro and Y. Heryadi, "Weather
model is from a single position, unlike the majority of forecasting using deep learning techniques," 2015 International
Conference on Advanced Computer Science and Information
forecasters who use data from numerous locations. Systems (ICACSIS), 2015, pp. 281-285.

4. CONCLUSION

The proposed model predicts the weather from the


dataset used to train the system and achieved 95%
accuracy. The proposed model simple and easy
understandable than the conventional models used at
the meteorological department as we use less
resources and can be used on any machine, including
mobile devices. In future, we have planned to collect
weather data from various parts of a city and use
more ml algorithms to check which algorithm is the
best.

REFERENCES
[1] Jinghua Yan 1998 Performance Analysis of Monthly
Precipitation Prediction of Short-term Climate Model in South
China [J] Guangdong Meteorology.
[2] - Xiaohua Zheng, Ke Li and Zhenjiang Qu Research on
Precipitation Field Forecast from April to October Based on Land
Surface Processes [C] Collected Papers of the Weather
Forecasting and Impact Assessment Technology Branch of the
2007 Annual Meeting of the Chinese Meteorological Society
2007.
[3] - Rajesh Kumar Asst. Prof., Dept. of ECS Dronacharya
College of Engineering, Gurgaon, India. International Journal of
Computer Applications (0975 – 8887) Volume 76– No.2, August
2013
[4]. Scott C. James Yushan Zhang, Fearghal O’’Donncha, “A
machine learning framework to forecast wave conditions”, Coastal
Engineering Volume 137, july 2018, Pages 1-10.
[5]. Tanzila Saba, Amjad Rehman, Jarallah S. AlGhamdi –
Weather forecasting based on hybrid neural model.
[6]. Mark Holmstrom, Dylan Liu, Christopher Vo – Machine
Learning Applied to Weather Forecasting.
[7]. Jitcha Shivang, S.S Sridhar – Weather Prediction For Indian
Location Using Machine Learning .
[8]. Sanjay D. Sawaitful, Prof. K.P. Wagh, Dr. P.N. Chatur –
Classification and Prediction of Future Weather by using Back
Propagation Algorithm-An Approach.
[9] Dhanashree S. Medhekar, Mayur P. Bote, Shruti D.
Deshmukh, “Heart Disease Prediction System using Naive
Bayes”, International Journal Of Enhanced Research In Science
Technology & Engineering, Vol. 2, Issue. 3,pp 1-5,2013.

You might also like