You are on page 1of 5

TIME SERIES FORECASTING WITH

LSTM NEURAL NETWORK

MALINI V1 KOWSALYA S2
UG Scholar UG Scholar
Department of Computer Science and Engineering Department of Computer Science and Engineering
Bannari Amman Institute of Technology Bannari Amman Institute of Technology
Sathyamangalam, India Sathyamangalam, India
Malini.cs21@bitsathy.ac.in Kowsalya.cs21@bitsathy.ac.in

KARTHIKA DEVI R3 KAVYASHREE R4


UG Scholar UG Scholar
Department of Computer Science and Engineering Department of Computer Science and Engineering
Bannari Amman Institute of Technology Bannari Amman Institute of Technology
Sathyamangalam, India Sathyamangalam, India
Karthikadevi.cs21@bitsathy.ac.in Kavyashree.cs21@bitsathy.ac.in

Abstract—Agricultural, industrial and other field simulation, retrieve by remote sensing or ground
depends massively on soil temperature, humidity and observations. In addition to predicting the growing
moisture rate. The parameters are to be predicted condition of plants, modelling soil temperature and
accurately, those can enhance the production rate . The moisture gives farmers insight into how plant grows and
essential aim of this paper is to forecast rainfall rate, day helps them make decisions about what to do to ensure the
by day temperature, humidity of soil at 5cm depth. We successful growth of crops. As the prediction possibilities
have collected five days dataset at the interval of 5 widens, the greater the likelihood of taking productive
seconds. For that, we have applied machine and deep steps will be.
learning methods for predicting the future values using
the past trends. Currently, the soil parameters are This could be very useful to maximize the manufacturing
forecasted using Forecasting fashions consisting of and precision agriculture can turn out to be a reality. But,
Autoregression Integrated Moving Average (ARIMA), the larger the prediction window, the larger the errors, If
Vector Autoregression (VAR), Long Short-time period the errors are too massive, the prediction results will
memory (LSTM) fashions. In this paper, we are going to change into vain. Artificial intelligence, prediction and
implement these models, analyzing and comparing analysing image/ video have become common
them, to prove advanced RNN, a sequential network applications of deep learning algorithms in the recent
LSTM works much better than other time series models decades. For predicting sequential data, a number of
in predicting the multi-step ahead data values. Thus, modelling algorithms have been developed, including
LSTM model is very well suited for soil temperature, Bayesian models, Linear regression models),
humidity and rainfall rate prediction. Autoregression integrated moving average (ARIMA)
model, Vector Autoregression (VAR) model, Exponential
Keywords: LSTM, Machine learning and deep learning, smoothing and deep neural network models. These are the
soil temperature, humidity, and rainfall. most popular and widely used algorithms for time series
forecasting.
1. INTRODUCTION
The linear machine learning models like ARIMA, VAR,
A number of factors impact the growth of crops, including gives effective output for predicting the temperature,
soil temperature, moisture. These factors directly humidity of soil. But they did not consider the spatial
influence the plant growth, which in turn results in correlation and only predicts one-step ahead. Therefore,
agricultural yield. In contrast, temperature and moisture we develop a multistep ahead prediction model, featuring
of soil also plays a significant role in land-air interaction. ( LSTM ) long short-term with encoder and decoder for
This makes them vital when it comes to evaluating the spatial correlation. The experimental evaluation of the
earth, analysing the global climate and evaluating the model on real-time data has clearly demonstrated that this
effects of climatic change as well. There are several ways model is more effective and superior to existing models.
to measure soil temperature, humidity, currently: through

1
output, it's far nicely visible that the MLP-FFA version
2. LITERATURE REVIEW outshines the standalone multi-layer perceptron
version.

1. X. Li, J. Tang and C. Yin [1], They advanced a version 8. A. Horelu, C. Leordeanu, E. Apostol, D. Huru, M.
for multistep in advance prediction of soil temperature Mocanu and V. Cristea [8], short-term dependencies
and moisture, series to series version which factors and long-term dependencies obtained with the help of
lengthy short-time period memory (LSTM) primarily farm-monitoring sensors are considered, predictions
based totally encoder- decoder structure. The RMSE are made with Hidden Markov models and Neural
and MSE are 0.22°C and 0.17°C for temperature and Network models. It is concluded that RNN with LSTM
0.28% and 0.23% for moisture, which justifies the performs better than Hidden Markov model, by
powerful functioning of the version. providing excellent accuracy.

2. Q. Li et al. [2], via way of means of the use of an 9. [9], they predicted the near future of the crop irrigation
progressive characteristic that hyperlinks LSTM loss requirements using machine learning approaches. It is
and hostile term, they expanded the correlation among seen that LSTM model performs well compared to
soil temperature and its environmental factors, which other models with 0.72% RMSE and 0.52% cross
can’t be done with an adversarial model. The RMSE validation error
and MSE are 2.2776 and 1.796 which concludes the
increased performance of the model GANs-LSTM. 10. Xuezhi Wang, Wenhui Li, Qingliang Li [10], they
designed GRU based embedded prediction system,
3. [3] , designed a innovative weather forecasting model, considering the soil temperature at different depth
that deals with TCN (temporal convolutional network) (5cm, 10cm, 15 cm) and time stamps (6hrs, 12hrs,
and LSTM (long short-term memory) networks. The 24hrs). The result i.e., performance of RMSE, MAE,
TCN model predicts better than other machine MSE, R2, shows that their model works well when
learning approaches. compared to other neural network models.

4. [4] , to come up with best prediction for strawberry


yield , they compared different techniques, mean 3. PROPOSED METHOD
predictions, machine and deep learning models and
with the help of evaluation metrics they concluded The time collection is the gathering of facts of a variable
AC-LSTM and ACV-LSTM as best performing over a length of time . A time collection forecast is the
model. technique of creating clinical predictions primarily based
totally on history. Models are built through past data
5. H. Hao, F. Yu and Q. Li [5], To expect the soil analysis and using them to predict future events and make
temperature at 3 areas, depths and 3 specific delays, strategic decision. Typically, these type of data are
they used a brand new mixture known as EEMD- collected on a periodic basis like, month (e.g. CPI), week
CNN, ensemble empirical mode decomposition (e.g. Money supply), quarter (e.g. GDP) or annual (e.g.
primarily based totally CNN. The evaluation with Government Budgets) data. Numerous applications make
different fashions finish that EEMD-CNN has the use of time series data including statistical analysis,
higher performance. mathematical finance, earthquake and weather
predictions and in many other fields.
6. Shirvani A, Moradi F, Moosavi A A. [6], weekly data
of soil temperature are taken into account, and
ARIMA (autoregressive integrated moving average) ,
a stochastic model was developed. The predicted
model indicated a high correlation coefficient, which
proves the accurate prediction of soil temperature
anomalies

7. Saeed Samadianfard, Mohammad Ali Ghorbani,


Babak Mohammadi [7], Their fundamental purpose
turned into to assess month-to-month soil temperature
at more than one depths : 5cm, 10cm, 20cm, 50cm,
100cm, with MLP-FFA (multi- layer perceptron
algorithms with firefly optimizer), a hybrid set of rules Fig. 3.1 Time Series Forecasting workflow
to get massive statistical accuracy. With the forecasted

2
3.1 Dataset Collection

Farm Monitoring Sensor Dataset, the dataset that has been


used is a real time dataset. In this database we have three
attributes and variation of three categories. These class
variants contain numerical values. This dataset has no
missing values. Data sets are split into two, of these 80%
are used for training and 20% are used for testing. Other
features of the database are:

1. Temperature
2. Humidity Fig. 3.3.b Trend and Seasonality of humidity

3.4 Pre-processing of Data


3.2. Farm Monitoring Sensor Data Distribution
The raw data is converted to an accessible dataset
using a preprocessing approach. To put it another way,
whenever the Information is obtained from a variety of
sources and stored in a database. The analysis cannot be
done in a raw format.

Fig. 3.4.a Data Pre processing

3.7 Data Splitting

After preparing and evaluating information, it is clean


and unpredictable. First trained the data with algorithms
and ignoring the test dataset and split the data. The
preparation model will be done using ingenuity and
mathematics, as well as a partial level of preparation
knowledge. The objective of standardization is to place
Fig. 3.2. Parameters Plotting (temperature, humidity) every one of the characteristics on a similar scale.

3.3 Data decomposition


4. RESULTS AND DISCUSSION

LSTM are form of recurrent community which can


be networks that reuse the output from a preceding step as
an enter for the subsequent step. Each node in the neural
community calculates the enter and returns an output. In
recurrent community this output is then used alongside the
subsequent element, because the centre for the subsequent
step and so on. In LSTM the nodes are recurrent however
additionally they have an inner nation as a running
reminiscence space, because of this that statistics may be
saved and retrieved over many time steps. The enter cost,
the preceding output and the inner nation are all used
Fig. 3.3. a Trend and Seasonality of temperature withinside the nodes calculation. The consequences of the
calculation are used now no longer simplest to offer an
output cost however additionally to replace the nation.

3
Like any neural community LSTM nodes have parameters
that decide how the inputs are used withinside the [5] H. Hao, F. Yu and Q. Li, “Soil Temperature Prediction
calculations however LSTM additionally have parameters Using Convolutional Neural Network Based on Ensemble
referred to as gates that manipulate the glide of statistics Empirical Mode Decomposition,” in IEEE Access, vol. 9,
in the node, particularly how lots the secure nation pp.4084-4096,2021,doi:
statistics is used as an enter to the calculations. These gate 10.1109/ACCESS.2020.3048028.
parameters are weights and biases, because of this that the
conduct relies upon at the inputs. Similarly, there are gates [6] Shirvani A, Moradi F, Moosavi A A. Time series
to govern how lots of cutting-edge statistics is stored to modelling of increased soil temperature anomalies during
the nation and what kind of the output is decided through long period. Int. Agrophys. 2015;29(4):509-515.
the cutting-edge calculations as opposed to the saves doi:10.1515/intag-2015-0058.
statistics. So, LSTM nodes are definitely greater complex
than everyday recurrent nodes however this makes them [7] Saeed Samadianfard, Mohammad Ali Ghorbani,
higher at getting to know the complicated Babak Mohammadi, Forecasting soil temperature at
interdependencies withinside the sequences. multiple-depth with a hybrid artificial neural network
model coupled-hybrid firefly optimizer algorithm,
Information Processing in Agriculture, Volume 5, Issue 4,
5. CONCLUSION 2018, Pages 465-476,ISSN2214-3173,doi:
The success of farming and precision of agriculture 10.1016/j.inpa.2018.06.005.
depends on the use of multifaceted predictive models that
assume several parameters of soil as the key value that [8] A. Horelu, C. Leordeanu, E. Apostol, D. Huru, M.
affect crop yield. In this paper, we are implemented Mocanu and V. Cristea,"Forecasting Techniques for Time
different models, analyzing and comparing them, to prove Series from Sensor Data," 2015 17th International
advanced RNN, a sequential network Bi- LSTM works Symposium on Symbolic and Numeric Algorithms for
much better than other time series models in predicting Scientific Computing (SYNASC),2015, pp. 261-264, doi:
the multi- step ahead data values. Thus, Bi-LSTM model 10.1109/SYNASC.2015.49.
is very well suited for soil temperature, humidity rate
prediction. The RMSE values are 0.9873 for temperature,
4.4793 for humidity. [9] Suebsombut P, Sekhari A, Sureephong P, Belhi A,
Bouras A. Field Data Forecasting Using LSTM and Bi-
LSTM Approaches. Applied Sciences.
2021;11(24):11820. Doi :10.3390/app112411820
6. REFERENCES
[10] Xuezhi Wang, Wenhui Li, Qingliang Li, “A New
[1] X. Li, J. Tang and C. Yin, "Sequence-to-Sequence Embedded Estimation Model for Soil Temperature
Learning for Prediction of Soil Temperature and Prediction”, Scientific Programming, vol. 2021, Article
Moisture," in IEEE Geoscience and Remote Sensing ID 5881018, 16 pages, 2021. doi: 10.1155/2021/5881018
Letters, vol. 19, pp. 1-5, 2022, Art no. 3005605, doi:
10.1109/LGRS.2022.3141072. [11] Priyamvada and R. Wadhvani, “Review on various
models for time series forecasting,” 2017 International
[2] Q. Li et al., "GANs-LSTM Model for Soil Conference on Inventive Computing and Informatives
Temperature Estimation From Meteorological: A New (ICICI),2017,pp.405-410,
Approach," in IEEE Access, vol. 8, pp. 59427 - 59443, doi:10.1109/ICICI.2017.8365383.
2020, doi:10.1109/ACCESS.2020.2982996.
[3] Hewage, P., Behera, A., Trovati, M. et al. Temporal [12] J. -S. Ang, K. -W. Ng and F. -F. Chua, "Modeling
convolutional neural (TCN) network for an effective Time Series Data with Deep Learning: A Review,
weather forecasting using time-series data from the local Analysis, Evaluation and Future Trend," 2020 8th
weather station. Soft Comput 24, 16453-16482 (2020). International Conference on Information Technology and
doi: 10.1007/s00500-020-04954-0 Multimedia (ICIMU), 2020, pp. 32-37, doi:
10.1109/ICIMU49871.2020.9243546.
[4] I. Okwuchi, L. Nassar, F. Karray and K.
Ponnambalam, “Deep Learning Ensemble Based Model [13] Aljoumani, Basem & Sánchez-Espigares, José &
for Time Series Forecasting Across Multiple Canameras, Nuria & Josa, Ramon & Monserrat, Joaquin.
Applications,” 2020 IEEE (2012). Time series outlier and intervention analysis:
International Conference on Systems, Man, and Irrigation management influences on soil water content in
Cybernetics (SMC), 2020, pp. 3077-3083, doi: silty loam soil. Agricultural Water Management. 111.
10.1109/SMC42975.2020.9282948. 10.1016/j.agwat.2012.05.008.

4
Volume 23, Issue 4, 2010, Pages 586-594, ISSN 0952-
[14] Olavi Kärner, ARIMA representation for daily solar 1976, doi
irradiance and surface air temperature time series, Journal :10.1016/j.engappai.2009.09.015.
of Atmospheric and Solar-Terrestrial Physics, Volume
71, Issues 8–9, 2009, Pages 841-847, ISSN 1364-6826, [16] Ping Zou, Jingsong Yang, Jianrong Fu, Guangming
doi Liu, Dongshun Li, Artificial neural network and time
:/10.1016/j.jastp.2009.03.018. series models for predicting soil salt and water content,
Agricultural Water Management, Volume 97, Issue 12,
[15] Durdu Ömer Faruk, A hybrid neural network and 2010, Pages 2009 - 2019, ISSN 0378-3774,
ARIMA model for water quality time series prediction, doi:10.1016/j.agwat.2010.02.011.
Engineering Applications of Artificial Intelligence,

You might also like