You are on page 1of 7

Available online at www.sciencedirect.

com

ScienceDirect
Available online at www.sciencedirect.com
Procedia Computer Science 00 (2019) 000–000
www.elsevier.com/locate/procedia
ScienceDirect
Procedia Computer Science 174 (2020) 72–78

2019 International Conference on Identification, Information and Knowledge in the Internet of


Things (IIKI2019)

Agricultural Fruit Prediction Using Deep Neural Networks


Tamoor Khan a,*, Jiangtao Qiua,*, Muhammad Asim Ali
Qureshib, Muhammad Shahid Iqbalc,d, Rashid Mehmoode, Waqar Hussainf
a
School of Economic Information Engineering, Southwestern University of Finance and Economics, Chengdu, 611130 China
b
School of International Business, Southwestern University of Finance and Economics, Chengdu, China
c
School of Computer Science and Technology, Anhui University, Hefei China
d
Department of Computer Sciences, Air University, Islamabad, Pakistan
e
College of Information Science and Technology, Beijing Normal University, Beijing 100875, China.
f
College of Information and Computer, Taiyuan University of Technology, Taiyuan 030000, China

Abstract

Agricultural production prediction is a challenging task in the deep neural network field. This paper presents a novel approach

to fruit production prediction using deep neural networks to build a fast and reliable prediction system for agricultural production.

In this article, we have considered different types of fruit production data (apples, bananas, citrus, pears, grapes, and total fruits),

analyzed this data, and predicted the future production of these fruits using deep neural networks. The data are taken from the

National Bureau of Statistics of Pakistan and the production output of major fruits. We implemented 3 different methods to predict

the data for future fruit production. The first method is Levenberg-Marquardt optimization (LM), which was 65.6% accurate; the

second method is called scale conjugate gradient back propagation (SCG), which had an accuracy of 70.2%, and the third method,

is Bayesian regularization back propagation (BR), which was 76.3% accurate. These methods to predict fruit production are

applicable in developing countries because they can compare production with increasing populations and assist in making new

policies to increase production. The estimated results reveal that the government of Pakistan needs to further increase fruit

production and create better policies for farmers to improve their production.

1877-0509 © 2020 The Authors. Published by Elsevier B.V.


This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Peer-review under responsibility of the scientific committee of the 2019 International Conference on Identification, Information and Knowledge
in the Internet of Things

1877-0509 © 2020 The Authors. Published by Elsevier B.V.


This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Peer-review under responsibility of the scientific committee of the 2019 International Conference on Identification, Information and
Knowledge in the Internet of Things.
10.1016/j.procs.2020.06.058
Tamoor Khan et al. / Procedia Computer Science 174 (2020) 72–78 73
2
2 Author name
Author name // Procedia
Procedia Computer
Computer Science
Science 00
00 (2019)
(2019) 000–000
000–000

** Corresponding
Corresponding author.
author. Tel.:008615680801274.
Tel.:008615680801274. Fax.
Fax. 055163861956
055163861956
E-mail address:
E-mail address: tamoorkhan525.iiui@yahoo.com;
tamoorkhan525.iiui@yahoo.com; qjt163@163.com
qjt163@163.com
© 2020
© 2020 The
The Authors.
Authors. Published
Published by
by Elsevier
Elsevier B.V.
B.V.
© 2020 The Authors. Published by Elsevier B.V.
This is an open access article under the CC BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
This
This is an open
is an open access
access article under
article under the CC BY-NC-ND
the scientific
CC BY-NC-ND license
license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
(http://creativecommons.org/licenses/by-nc-nd/4.0/)
Peer-review under responsibility of the committee of the 2019 International Conference on Identification, Information and
Peer-review
Peer-review
Knowledge in under
under responsibility
responsibility
the Internet of
of the scientific committee of the
of Things. the scientific committee of the 2019
2019 International
International Conference
Conference on
on Identification,
Identification, Information
Information
and Knowledge
and Knowledge in in the
the Internet
Internet of
of Things
Things
Keywords: Agriculture
Keywords: Agriculture production,
production, fruit
fruit forecast,
forecast, deep
deep neural
neural networks
networks and
and yearly
yearly production.
production.

1. Introduction
1. Introduction

The accurate
The accurate prediction
prediction of of fruit
fruit production
production helps
helps the
the government
government and and farmers
farmers in in developing
developing countries
countries increase
increase
production for
production for an
an increasing
increasing population,
population, where
where more
more fruit
fruit is
is needed
needed andand where
where fruit
fruit production
production is is low.
low. Prediction
Prediction alsoalso
helps in
helps in finding
finding ways
ways toto increase
increase thethe production
production of of various
various types
types ofof fruit
fruit in
in order
order toto provide
provide fresh
fresh fruits
fruits to
to these
these nations.
nations.
Additionally, production
Additionally, production forecasts
forecasts areare beneficial
beneficial for
for farmers
farmers because
because through
through accurate
accurate prediction,
prediction, theythey can
can focus
focus on on
the crops
the crops that
that have
have low
low production
production but but are
are needed
needed more.
more. The
The government
government can can then
then provide
provide more
more services
services andand loans
loans toto
the farmers
the farmers whowho produce
produce lessless and
and make
make newnew policies
policies toto increase
increase production
production and and meet
meet thethe needs
needs of of increasing
increasing
populations.
populations.
Li X
Li X et
et al.
al. (2017)
(2017) predict
predict stock
stock prices
prices using
using aa deep
deep belief
belief network
network [1][1] and
and Nelson
Nelson et et al.
al. (2017)
(2017) useuse aa LSTM
LSTM neural
neural
network algorithm
network algorithm to to predict
predict price
price movement
movement [2]. [2]. Li
Li LL et
et al.
al. (2017)
(2017) use
use an
an economic
economic parameter
parameter to to predict
predict real
real estate
estate
prices, [3]
prices, [3] and
and Amekraz
Amekraz et et al.
al. (2017)
(2017) use
use an
an ANFIS
ANFIS modelmodel to to predict
predict Amazon
Amazon spot spot prices
prices [4].
[4]. Gao
Gao et et al.
al. (2016)
(2016) focus
focus
on closing
on closing price
price prediction
prediction using
using aa two
two dimensional
dimensional principal
principal component
component analysis
analysis [5].
[5]. Kotur
Kotur et et al.
al. (2016)
(2016) study
study
electricity price
electricity price prediction
prediction using
using aa neural
neural network
network model
model [6].[6]. Lim
Lim W W etet al.
al. (2016)
(2016) useuse aa neural
neural network
network to to predict
predict
housing prices
housing prices [7].
[7]. Pan
Pan etet al.
al. used
used ANN
ANN model
model forfor prediction
prediction of of electricity
electricity load
load [8].
[8]. Yue
Yue et et al.
al. used
used ANN
ANN model
model for for
forecasting of
forecasting of cast
cast of
of oil
oil and
and gasgas drilling
drilling [9].
[9]. Li
Li et
et al.
al. presents
presents thethe simple
simple concepts
concepts of of some
some Bayesian
Bayesian methods,
methods, and and
comprehensively reviews
comprehensively reviews the
the literature
literature of
of Bayesian
Bayesian techniques
techniques in in wind
wind energy
energy transformation
transformation systems.
systems. [10].
[10]. Moller
Moller et et
al. introduces
al. introduces supervised
supervised learning
learning algorithm
algorithm SCGSCG is is introduced
introduced [11].[11]. Linear
Linear regression
regression prediction
prediction is is used
used for
for fruit,
fruit,
education and
education and energy
energy [12-13-14].
[12-13-14]. In In this
this article,
article, we
we propose
propose aa method
method forfor agricultural
agricultural production
production prediction
prediction of of fruit
fruit
using deep
using deep neural
neural networks
networks (Levenberg-Marquardt
(Levenberg-Marquardt optimization
optimization [LM],[LM], scale
scale conjugate
conjugate gradient
gradient backpropagation
backpropagation
[SCG], and
[SCG], and Bayesian
Bayesian regularization
regularization backpropagation
backpropagation [BR]).[BR]). We We use
use aa feed-forward
feed-forward neural
neural network
network and and 30
30 hidden
hidden
layers and
layers and attain
attain better
better accuracy.
accuracy.

2. Method
2. Method

Agricultural production
Agricultural production prediction
prediction isis aa challenging
challenging job job in
in the
the deep
deep neural
neural network
network field.
field. The
The main
main challenge
challenge isis to
to
guide the
guide the government
government and and farmers
farmers whose
whose yearly
yearly production
production is is low
low inin relation
relation to
to the
the population.
population. There
There areare many
many
learning methods
learning methods to to predict
predict the
the stock
stock market
market such
such asas the
the genetic
genetic algorithm,
algorithm, ANN,ANN, and
and support
support vector
vector machines.
machines. ANNANN
is aa common
is common methodmethod employed
employed broadly
broadly in in this
this field.
field. Therefore,
Therefore, in in order
order toto understand
understand the
the trend
trend of
of using
using ANN
ANN in in fruit
fruit
production, the
production, the techniques
techniques toto enhance
enhance thethe performance
performance of of ANN
ANN areare reviewed.
reviewed. Fruit
Fruit production
production is is extremely
extremely important
important
for aa nation
for nation andand itit must
must increase
increase with
with the
the increasing
increasing population
population as as it
it has
has aa great
great impact
impact on on the
the health
health and
and growth
growth of of
that nation.
that nation. The
The prediction
prediction of
of price
price can
can bebe accomplished
accomplished with with two
two methods.
methods. TheThe first
first method
method is is technical,
technical, and
and involves
involves
aa statistical
statistical analysis
analysis of of data;
data; the
the second
second method
method is is fundamental
fundamental and and considers
considers every
every detail,
detail, which
which isis available
available and
and
growth agents
growth agents that
that affect
affect fruit
fruit production.
production. It It is
is performed
performed on on present
present andand historical
historical data,
data, but
but with
with the
the objective
objective ofof
making fruit
making fruit production
production forecasts.
forecasts. In
In our
our study,
study, wewe employ
employ aa technical
technical analysis
analysis using
using aa deep
deep neural
neural network
network algorithm
algorithm
to predict
to predict fruit
fruit production.
production.
Deep learning
Deep learning is is aa well-established
well-established technique
technique in in aa wide
wide range
range ofof applications
applications andand has
has been
been broadly
broadly studied
studied for
for its
its
capacities in
capacities in prediction
prediction ofof fruits.
fruits. However,
However, the the inputs
inputs considered
considered are are mostly
mostly derived
derived from
from the
the data
data within
within the
the yearly
yearly
fruits data
fruits data itself
itself and
and apply
apply three
three deep
deep neural
neural network
network methods
methods LM,LM, SCG SCG andand BR.
BR. Finally
Finally get
get the
the future
future prediction
prediction ofof
fruits data
fruits data and
and accuracy
accuracy ofof results.
results. A
A consideration
consideration of of publicly
publicly available
available data
data for
for fruit
fruit prediction
prediction can
can improve
improve the the
prediction accuracy
prediction accuracy and and future
future fruit
fruit production.
production. Figure
Figure 1 1 shows
shows thethe fruit
fruit production
production prediction
prediction model.
model.
Author name / Procedia Computer Science 00 (2019) 000–000 3
74 Tamoor Khan et al. / Procedia Computer Science 174 (2020) 72–78

Figure 1: Fruit production prediction model

Table 1: Agriculture fruit production prediction algorithm


Algorithm 1: Agriculture fruit production prediction
Input: A set of fruit data X End
Choice = {train LM, train BR, train SCG} Step 6: If choice == train SCG
Output: fruit data X future prediction P For
Algorithm Quadratic approximation
Step 1: Initialize, w0, μ, Critical points in the liner solution system
Step 2: Take matrix M of the previous year’s data, End
data size 1×6 Step 7: If choice == train BR
Step 3: Take matrix P of 35 years of previous data, For
data size 35×6 Find the network weights α, β
Step 4: If choice == train LM Probabilities
For Maximizing the posterior probability function
Step 5: Calculate the Hessian matrix, Evaluate the new End
weights Gradient vector Step 9: End

2.1. Network Architecture and Parameters Selection

In this study, 3-layer feed-forward neural network architecture is employed. For this purpose, a network model
using the Matlab neural network toolbox is used. The proposed feed-forward neural network architecture consists of
1 input layer, 30 hidden layers, and 1 output layer. For the performance of each training algorithm, the hidden layers
neurons adjust and give the best performance. The neurons of the hidden layers use a tangent sigmoid function and
the output neurons use a pure line transfer function; the short notation of this proposed network is 2-h-1, where 2 is
the number of nodes in the input layer, h is the number of neurons in the hidden layer, and 1 is the number of neurons
in the output layer. The proposed network model is provided in Figure 2.
Tamoor Khan et al. / Procedia Computer Science 174 (2020) 72–78 75
4 Author name / Procedia Computer Science 00 (2019) 000–000

Figure 2: Feed Forward Network Architecture

3. Results and Discussion

3.1. Data Set

Time sequence data were collected from the National Bureau of Pakistan. To inspect the association between the
agricultural GDP and the outputs of major fruit crops, yearly time sequence data from 1980 to 2015 were used. The
data were collected from the Economic Survey of Pakistan (various statistical supplements), Pakistan Statistical
Yearbooks, government publications, and the Federal Bureau of Statistics. The variables used in this study are fruit
production, apple output, citrus output, pear output, grape output, banana output, and total fruit output. The output
weight for each is 1,000 tons. The dimension of the data is 6 features and 35 rows (tuples) (35×6) because 6 different
types of fruit and 35 years of data are used. Table 2 show the data description.

Table 2: Data description- Data are from the National Bureau of Pakistan.
Study Ranges Fruits Production
1980–2015 Apples Bananas Citrus Pears Grapes Fruits
158,880 4,340 3,280 3757 6055 176312

3.2. Discussion

Total Fruit Production: All fruits grown in Pakistan make a long list. The most common fruits from inside and
outside the country are mango, citrus, banana, apple, peach, apricot, guava, date, grape, plum, papaya, fig, melon,
barriers, musk melon, watermelon, pomegranate and cherry.
Total fruit production in Pakistan in 1980 was 286.7 tons (1,000) and in 1990, fruit production reached 449.8 tons
(1,000); production in 2000 was 712.4 tons (1,000), which decreased in 2010 and reached 1163.2 tons (1,000). In
2015, production increased and reached 1325.4 tons (1,000). The production of fruits from 1980 to 2015 is shown in
Figure 3, Figure 4 and Figure 5. The forecast of total fruit production is shown in Figure 3, Figure 4 and Figure 5 (LM,
SRC, and BR, respectively).
Apple Production: Apple is a temperate climate fruit that is native to many parts of Europe and Asia. Worldwide,
apples are the 4th most extensively produced deciduous fruit, with production in 94 countries and 69.60 million metric
tons of fresh-weight yields from 4.85 million hectares of land [12].
Apple production in Pakistan in 1980 was 99.2 tons (1,000) and in 1990, the production of apples increased and
reached 232.4 tons (1,000); production in 2000 was 377 tons (1,000). Production decreased in 2010 and reached 366
tons (1,000), and in 2015, production increased and reached 606 tons (1,000). The production of apples, up and down
from 1980 to 2015 is shown in Figure 3, Figure 4 and Figure 5, and the forecast of apple production is shown in Figure
3, Figure 4 and Figure 5 (LM, SRC, and BR, respectively). We have predicted the production of apples from 1980 to
2025.
Citrus Production: In kinow (orange) production, Pakistan is the 6th largest producer, and the production rate is 2.1
million tons. Citrus production in Pakistan in 1980 was 86.7 tons (1,000) and in 1990, the production of citrus increased
and reached 171.1 tons (1,000); production in 2000 was 1,862 tons (1,000), it increased in 2010 to 2,150 tons (1,000)
76 Tamoor Khan et al. / Procedia Computer Science 174 (2020) 72–78
Author name / Procedia Computer Science 00 (2019) 000–000 5

and in 2015, production increased and reached 2,168 tons (1,000). The production of citrus, which is up and down
from 1980 to 2015, is shown in Figure 3, Figure 4 and Figure 5. The production of citrus from 1980 to 2015 and
forecast for citrus production is shown in Figure 3, Figure 4 and Figure 5 (LM, SRC, and BR, respectively). We have
predicted the production of citrus from 1980 to 2025.
Pear Production: Pears are one of most important fruits in temperate climates such as that of Pakistan. Pears can be
grown in temperate and subtropical regions due to the fruit’s wide climatic and soil adaptability. Pear production in
Pakistan in 1980 was 27.7 tons (1,000) and in 1990, the production of pears increased and reached 32.3 tons (1,000).
In 2000, 36.9 tons (1,000) were produced, which increased in 2010 and reached 42 tons (1,000). In 2015, the production
increased and reached 45 tons (1,000). The production of pears, up and down from 1980 to 2015, is shown in Figure
3, Figure 4 and Figure 5. The forecast of pear production is in Figure 3, Figure 4 and Figure 5 (LM, SRC, and BR,
respectively). We have predicted the production of pears from 1980 to 2025.
Grape Production: Nowadays, grape farming is very popular in Pakistan and farmers can earn lot of money from
it. Most varieties of grapes are from Punjab, and a farmer can earn 16 to 20 lakh per acre. Pakistan has a nursery of
grapes to sell their clients, and only European grapes are cultivated for eating. More than 70% of grapes are grown in
Balochistan and Khyber Pakhtunkhwa. Grape production in Pakistan in 1980 was 29.2 tons (1,000) and in 1990,
production increased and reached 32.6 tons (1,000); production in 2000 was 40 tons (1,000), which increased in 2010
and reached 65 tons (1,000), and in 2015, the production increased and reached 66 tons (1,000). The production of
grapes from 1980 to 2015 is shown in Figure 3, Figure 4 and Figure 5. The forecast of grape production is shown in
Figure 3, Figure 4 and Figure 5 (LM, SRC, and BR, respectively). We have predicted the production of grapes from
1980 to 2025.
Banana Production: More than 130 countries produce 107 million metric tons of bananas were produced and the
area were used for this purpose is 0.1 percent, for a total trade value of 9 billion USD (FAO 2013) [15]. Banana
production in Pakistan in 1980 was 125.3 tons (1,000) and in 1990, banana production increased and reached 209.8
tons (1,000). Production in 2000 was 125 tons (1,000); in 2010, it reached 155 tons (1,000), and in 2015, the production
increased and reached 119 tons (1,000). Banana production was up and down from 1980 to 2015. Figure 3, Figure 4
and Figure 5 shows banana production from 1980 to 2015, and the forecast of banana production is given in Figure 3,
Figure 4 and Figure 5 (LM, SRC, and BR, respectively). Banana production frequently decrease every year, we have
predicted the production of apples from 1980 to 2025.

3.3. Results

We used 3 different algorithms to predict future fruit production, and we have found good accuracy. The
classification accuracy of the three baseline methods for the production of fruit in Pakistan is illustrated in Table 3.
From the results, we observe that BR achieved much better performance than the first 2 baseline methods. The average
classification accuracy of BR on the datasets is 76.3%. Furthermore, from the results averaged by 5 repeated runs
(shown in Table 3), we see that the deviations are small compared to the accuracy improvements, which validates that
BR performs suitably to the random initialization.

Table 3: Predicted results (accuracy)


Methods Data Sets Predicted data Accuracy (%)

LM Fruit data of Pakistan 1980–2015 1970–2025 65.6 ± 2 %


SCG Fruit data of Pakistan 1980–2015 1970–2025 70.2 ± 2 %
BR Fruit data of Pakistan 1980–2015 1970–2025 76.3 ± 2 %

Figure 3 show the forecast of the LM algorithm. The first part (fruits) presents the fruit data and the future prediction
of fruit production, the second part (apples) shows apple data and the prediction for apple production, the third part
(citrus) shows the citrus data and its prediction, the fourth part (pears) shows pear production and the prediction, the
fifth part (grapes) shows grape production and its future prediction, and the sixth part (bananas) shows banana
production and the prediction. Similarly, in Figure 4, the SRC algorithm and its prediction of all the fruit data are
Tamoor Khan et al. / Procedia Computer Science 174 (2020) 72–78 77
6 Author name / Procedia Computer Science 00 (2019) 000–000

shown, and finally, Figure 5 show the BR algorithm results and their future production prediction of all fruits (fruits,
apple, citrus, pear, grape and banana).

Figure 3: LM algorithm (fruit, apple, citrus, pear, grape, and banana)

Figure 4: SCR algorithm (fruit, apple, citrus, pear, grape, and banana)

Figure 5: BR algorithm (fruit, apple, citrus, pear, grape, and banana)


78 Tamoor Khan et al. / Procedia Computer Science 174 (2020) 72–78
Author name / Procedia Computer Science 00 (2019) 000–000 7

Conclusion

Agricultural production is important for any nation. Production depends upon on the services available to the
farmers, which totally depends on government agricultural policies. If the government provides services to farmers,
production will increase. In this study, we develop techniques for predicting agricultural production using existing
fruit production data, and we present the results of the analysis. In the prediction model, we use deep neural networks
that periodically predict the trends of agricultural fruit production. Three different deep neural network algorithms
(LM, SCG, and BR) are used to predict future fruit production in Pakistan, and the predicted data are given yearly
from 1980 to 2025. These algorithms have different accuracy, but the best accuracy is obtained with BR, with an
accuracy of more than 75%.

Acknowledgements

The authors are grateful to the School of Economic Information Engineering, Southwestern University of Finance
and Economics, Chengdu, China for their support and cooperation.

References

[1] X. Li, L. Yang, F. Xue, and H. Zhou, “Time series prediction of stock price using deep belief networks with intrinsic plasticity,” in
Proceedings of the 29th Chinese Control and Decision Conference, CCDC 2017, 2017.
[2] D. M. Q. Nelson, A. C. M. Pereira, and R. A. De Oliveira, “Stock market’s price movement prediction with LSTM neural networks,” in
Proceedings of the International Joint Conference on Neural Networks, 2017.
[3] L. Li and K. H. Chu, “Prediction of real estate price variation based on economic parameters,” in Proceedings of the 2017 IEEE
International Conference on Applied System Innovation: Applied System Innovation for Modern Technology, ICASI 2017, 2017.
[4] Z. Amekraz and M. Youssef, “Prediction of Amazon spot price based on chaos theory using ANFIS model,” in Proceedings of
IEEE/ACS International Conference on Computer Systems and Applications, AICCSA, 2016.
[5] T. Gao, X. Li, Y. Chai, and Y. Tang, “Deep learning with stock indicators and two-dimensional principal component analysis for
closing price prediction system,” in Proceedings of the IEEE International Conference on Software Engineering and Service Sciences,
ICSESS, 2016.
[6] D. Kotur and M. Zarkovic, “Neural network models for electricity prices and loads short and long-Term prediction,” in 4th
International Symposium on Environment Friendly Energies and Applications, EFEA 2016, 2016.
[7] W. T. Lim, L. Wang, Y. Wang, and Q. Chang, “Housing price prediction using neural networks,” in 2016 12th International
Conference on Natural Computation, Fuzzy Systems and Knowledge Discovery, ICNC-FSKD 2016, 2016.
[8] X. Pan, B. Lee, and C. Zhang, “A comparison of neural network backpropagation algorithms for electricity load forecasting,” in
Proceedings - 2013 IEEE International Workshop on Intelligent Energy Systems, IWIES 2013, 2013.
[9] Z. Yue, Z. Songzheng, and L. Tianshi, “Bayesian regularization BP Neural Network model for predicting oil-gas drilling cost,” in
BMEI 2011 - Proceedings 2011 International Conference on Business Management and Electronic Information, 2011.
[10] G. Li and J. Shi, “Applications of Bayesian methods in wind energy conversion systems,” Renewable Energy. 2012.
[11] M. F. Møller, “A scaled conjugate gradient algorithm for fast supervised learning,” Neural Networks, 1993.
[12] A. Rehman, Z. Deyuan, I. Hussain, M. S. Iqbal, Y. Yang, and L. Jingdong, “Prediction of Major Agricultural Fruits Production in
Pakistan by Using an Econometric Analysis and Machine Learning Technique,” Int. J. Fruit Sci., 2018.
[13] M. S. Iqbal, T. Khan, S. Kausar, and L. Bin, “Analysis of bioenergy by using linear regression,” SN Appl. Sci., 2019.
[14] M. S. Iqbal and B. Luo, “Prediction of educational institution using predictive analytic techniques,” Educ. Inf. Technol., 2019.
[15] FAO (Food and Agriculture Organization of the United Nations), FAO statistical Yearbook 2013 - World food and agriculture. 2013.

You might also like