Comparison of exponential smoothing and neural network method to forecast rice production in Indonesia

Rice is the most important food commodity in Indonesia. In order to achieve affordability, and the fulfillment of the national food consumption according to the Indonesia law no. 18 of 2012, Indonesia needs information to support the government's policy regarding the collection, processing, analyzing, storing, presenting and disseminating. One manifestation of the Information availability to support the government’s policy is forecasting. Exponential smoothing and neural network methods are commonly used to forecasting because it provides a satisfactory result. Our study are comparing the variants of exponential and backpropagation model as a neural network to forecast rice production. The evaluation is summarized by utilizing Mean Square Percentage Error (MAPE), Mean Square Error (MSE). The results show that neural network method is preferable than the statistics method since it has lower MSE and MAPE values than statistics method.


Introduction
The Rice (Oryza sativa L) is the most prominent commodity for Indonesian [1,2].In order to achieve affordability, and the fulfilment of the national food consumption according to the law No. 18 of 2012, Indonesia needs information to support the government's policy regarding the collecting, processing, analysing, storing, and disseminating of food commodity.One manifestation of the information availability to support the government policy is forecasting [3] that can be used for planning, monitoring and evaluating to ensure a stability of food supply and food prices.Furthermore the monitoring system as though forecasting could support an early warning system to predict the food problem.Generally, agriculture forecasting have various benefits: provide recommendations to farmers to increase revenue, estimates the cost of food needs, provide data analysis on the time period in the future based on previous experience that can influence government's policy [3].Forecasting methods are various, but in general there are two types such as: qualitative and quantitative [4].Qualitative forecasting is based on the assumption of management, market research, structured group and historical analogies.In most cases quantitative forecasting method such as statistics method has successfully applied to forecast continuous data such as in stock market, price forecasting, inventory system, global horizontal irradiance, supply and demand system [5][6][7][8][9].
On the other hand, neural network has been widely used to perform quantitative forecasting for the time-series data, it works by training and evaluating process that will generate a model to predict the recent information [10][11].Furthermore the research that was conducted by [12] shows that neural networks methods has given a satisfactory result for all data variant, it is used to predict the time-series data that has the property of deterministic-synthetic and chaotic.According to Hill, O'Connor and Remus in [13], neural network gives preferable results than the traditional forecasting methods both in monthly and quarter time-series condition.Related work of neural network forecasting in nature phenomena has also been done for cases of meteorological drought [14], weather drought [15] and rainfall forecasting [16] and gives promising result.This study aims to provide a comparison analysis between statistics and neural network methods.The experiments conduct by using time-series dataset of rice production in Indonesia from 1970 until 2014 that are sourced from the department of agriculture of the Republic of Indonesia.Data are devided into three group, first category is training group that are chosen from the year 1970 until 2000.Second category is validation group that are choosen from the year 2000 until 2007 and the last category is  ISSN: 1693-6930 TELKOMNIKA Vol.17, No. 3, June 2019: 1367-1375 1368 evaluation group that are choosen from the year 2007 until 2014.The classification purpose of data is to ensure an acceptable prediction result.There are four statistics techniques that are used: single exponential smoothing, double exponential smoothing, triple exponential smoothing and moving average.Futhermore, multi-layer back propagation neural network are used as a comparison.Evaluation experiment will be compared based on MSE, MAPE and computational speed parameters.The organization of this paper is as follow: related work is described in section 2, a brief review of some of the theory on statistics and neural network theory are presented in section 3. Research method section 4. Result and analysis section 5. Finally the conclusion is summarized in section 6.

Related Work
Various forecasting techniques related to the field of agriculture have been investigated.In the study of [17], the author developed a forecasting method based on realistic and simple assumptions.They use time series data covering the period from 2000-2013.The results of the study indicate that the proposed method can be used to predict agricultural production in the short term period.Nevertheless, in this work there are no mention of indicators such as the level of prediction accuracy and computational speed which shows that the method can be applied practically and can be applied for the economic planning and decision making.Subsequent research was carried out by [18].In this study the author implemented the ARIMAX and Vector Autoregressive (VAR) models for forecasting the price of rice commodities in Indonesia.
The data used includes multi-variable time series data, namely consumer rice prices, production prices, dry milled rice, harvested areas and rice prices in Thailand.The results of this study indicate that using the ARIMAX model can predict consumer rice prices with far better results than the VAR method.In contrast to the approach mentioned, in our study, we used the ARIMA method as a constant optimization of statistical forecasting calculations that would give effect to the accuracy.The next study was carried out by [19] they forecast prices of medium quality rice to anticipate fluctuations in rice prices.Forecasting is done using the ARIMA model, while the data used ranges from January 2015 to April 2017.The results of this study indicate that the ARIMA model is good used for short-term period.Nevertheless in this study also does not show indicators that can be used specifically to prove that forecasting results can be applied by the government for decision making.In addition to the approaches applied with the statistical method, there are also various neural network-based approaches that have been applied to various cases in agriculture such as [20][21][22][23][24][25].All approaches give very good accuracy between 90%-98%.However, those approaches focus only on classification problems.In this work instead of applying the neural network method for classification problem, we apply it into a regression problem with the aim of obtaining a best forecasting model which could be utilized as a comparison with the exponential smoothing method.

Theory 3.1. Single Exponential Smoothing
Exponential smoothing method was developed in the 1950s and 1960s by Brown (1959), Holt (1957) and Winters (1960).They applied a weighting system to the past data series.It will calculate weights that had depended on the past data series.Based on the utilization of weights, exponential smoothing method are divided into three types: single exponential smoothing, double exponential smoothing and triple exponential smoothing [4].Single exponential smoothing gives a weighting based on the level (α).Single exponential smoothing method satisfies (1).
where:   = forecasting on t period  −1 = forecast on the previous period  −1 = The actual data on the previous period Comparison of exponential smoothing and neural network method… (Gregorius Airlangga) 1369

Double Exponential Smoothing
This method is a development of single exponential smoothing which adds an element of a trend in the weight calculation, so that the double exponential smoothing, we provide two types of weighting in the calculation of that level (α) and trend (β).(2)(3)(4) shows the calculation of double exponential smoothing.
Where,   = forecasting based on level in period t   = forecasting based on trends in period t   = forecasting based on the level and trend in period t  −1 = forecasting based on the level and trend in the previous period  −1 = the actual data in the previous period  = weight level

Triple Exponential Smoothing
Triple exponential smoothing method or known as the winter's method is the evolution of double exponential smoothing where the forecasting used three parameters with different weights are level (α), trend (β), and seasonal (γ).Based on the seasonal type, triple exponential smoothing is divided into two different types, namely multiplicative seasonal models and additive seasonal models.In multiplicative seasonal models we multiply the results of the calculation of the level (α) and trend (β) to the calculation of seasonal (γ).While the seasonal additive models we add the results of the calculation of the level (α) and trend (β) in the calculation of seasonal.Triple exponential smoothing equation with multiplicative seasonal models shown in (5)(6)(7)(8).

Backpropagation Neural Network
Artificial neural networks trying to mimic the structure and workings of the human brain that is able to replace some of the work of man.Jobs such as recognizing patterns, prediction, classification, function approach, optimization jobs are expected to be solved with artificial neural networks [4].One kind of method to train neural networks is back propagation algorithm.This algorithm uses gradient descent learning rule.This algorithm is very useful, simple, reliable and easy enough to understand.Backpropagation network learning process is as follows: 1) Initialize the weights and the margin of error with a small random value.
2) Use the input vector x as output from the input layer to the elements of the process.
3) Calculate the activation value of each unit in the next layer.4) Apply a suitable activation function which f (  ) for the activation function in the hidden layer and (0) for the activation function in the output layer.For the nonlinear case we can use logistic sigmoid function shown in (13).
(  ) = Activation value of z Z = Multiplication result of matrix weight in current layer and previous activation value 5) Repeat steps 3 and 4 for each layer in the network 6) Calculate the value of the error at the output of the (14).
0  = Error between target and final output layer that depends on objective function   = Prediction target   = Final output layer multiplication between weight matrix and previous activation value  1 (  ) = Activation function at final Layer 7) Calculate the value of errors on all hidden layer using (15).
0  = Summation of error values 0    = Error measurement in each layer 8) Update weighting connected to the hidden layer using (16).The dataset used in this study is a real time rice production in 1970-2014 that was taken from Indonesia's statistical agency.Data is divided into three models with a 70% ratio of 70:15:15 Where 70% parts are used as training data model, 15% as part of a data model validation and 15% portion as a model test data.

Exponential Smoothing Forecasting
In this experiment, time series forecasting using three formulas is single exponential smoothing, double exponential smoothing and triple exponential smoothing.The value of alpha (α), beta (β) and theta (γ) at each calculation governed by the optimization algorithm ARIMA so chosen weight level, based on the best seasonal trends and the resulting error value.

Backpropagation Forecasting
Back propagation neural network model consists of input, hidden layer and output layer.The layer dimension are contain of 44 layer one, 1024 second layer, 512 third layer, 256 fourth layer, and 128 output layer.The resulting weight of the neural network of the best will be determined based on the highest similarity between the actual data and target data.After getting the best weights look best with a number of hidden neurons see the error value generated at each model.

Accuracy Measurement
Basically there are no accurate forecasting, but it should be done a measurement to gauge how accurate forecasting results by considering the smallest error value.The smaller the error value is then forecasting can be said to be getting better.To take measurements of forecasting results performed two commonly used measurement technique that uses the MSE (Mean Square Error) and MAPE (Mean Absolute Percentage Error) to satisfy (19) and (20).
where,   = The actual value of rice production   = Value forecasting rice production n = Amount of data

Computational Speed Measurement
Computational speed measurement will be conducted by using time function on python programming language.We use the function to record current time and store it in two type of variables.The first variable has a role to record initial time before algorithm are conducted.Then, the second variable has a role to record finish time after algorithm are conducted.After that, both of variable values will be converted into unix data time and we calculate unix time difference as a computational speed indicator.On this research we just considering the computational speed measurement when predicting and training in each iteration.In addition, we use processor intel core i5 with ram 4 GB as our environment.Calculation time function is conducted when algorithm work in each iteration.To sum up, we use normal average method to conclude single values.

. Exponential Smoothing Forecasting
Using optimization methods ARIMA, the most optimal value of alpha (α) is 1.54764.Single exponential smoothing method produces MSE of 3.3 MAPE of 3.7% and average computational speed in real-time environment is 0.91264 s.

Double Exponential Smoothing Forecasting
Using ARIMA Optimization Method, the most optimal weight value level (α) is 1.22784 and the most optimal weight value trend (β) is 0.05003.Forecasting using double exponential smoothing method resulting with MSE of 2.5, MAPE of 3.8% and computational speed is 1.92138 s.

Triple Exponential Smoothing Forecasting
Using the optimization method ARIMA, the optimal weight value level (α) is 0.3, weight value trend (β) is 0.4, seasonal weights (γ) is 0.2.Using triple exponential smoothing method produces MSE of 2.3 ,MAPE of 3% and the computational speed is 2.67413 s.While forecasting results using triple multiplicative and additive exponential smoothing methods are shown in Figure 1 and Figure 2.

Backpropagation Forecasting
This study used 44 input and output neurons and hidden neurons most optimal of 20, the output equation generated from neural networks backpropagation satisfies the (22).
Forecasting using backpropagation method produces MSE 6.7, MAPE 1.5% and computational speed is 23.23291 s. Figure 3 shows comparison of actual data vs. forecasting result.

Analysis
The Figure 1 shows the forecasting and actual result of triple exponential smoothing multiplicative method between 1970 and 2014, a period of 44 years.Overall, the forecasting result can follow the actual trend and level such as increment and decrement of value.However, in production year 1982 until 1996, the forecasting result can only give a high gap comparing with actual values.The gap is occurred because the effect of beta variable in calculation.Since a period of year before 1982 is gradually increase.The beta variable for the next year is increase too and it makes the prediction in 1982 until 1996 is smoothing a quantity of 5000000-600000 in multiplicative behavior.On the other hand, in Figure 2, the forecasting result from triple exponential smoothing additive give a more preferable result since the value of beta between 1982 until 1996 is smoothing a quantity of rice production in addition behavior.The calculation does not increase the forecasting value significantly.  1971972 1974 1976 1978 1980  1982 1984 1986 1988 1990 1992 1994  1996 1998 2000 2002 2004 2006 2008  The Figure 3 shows the comparison of actual and forecasting value of rice production.Overall the result of forecasting value is very similar with actual value.The algorithm could adjust the increment and decrement behavior smoothly.Even so, the computation time is very high.The result is shown in Figure 4 and Table 1.The computation time of back propagation neural network has a 20x slower than single exponential smoothing method, 8x slower than double exponential smoothing method and 4-5x slower than triple exponential smoothing method, because back propagation neural network has more iteration than another methods especially to find an optimization weight to predict rice production.1.The method of back propagation neural network has better accuracy than the statistical method of single exponential smoothing, double exponential smoothing and triple exponential smoothing with the smallest MSE and MAPE is 6.7% and 1.5%.Meanwhile, exponential smoothing method has a better computational speed as shown on Figure 4. Therefore based on the comparison provided in this study, it is suggested to Indonesia Government to use back propagation neural network as an approach to maintain stability of commodity because the most important criteria to choose best model is accuracy.
In addition, computational speed is could be solved by highly performance devices as well as GPU CUDA and some regularization method such as dropout optimization and mini batch gradient descent.Further study of this research is to investigate the multi-layer neural network to handle highly continuous data in the future and derived from multi-variable production factors.Moreover, since the neural network method is over-fitting and requires huge data to get the best model, it could not really effective to handle anomaly data in the future, therefore an approach to generate prediction model that could handle those inconsistencies data in the future have to be conducted.

=
( + 1) =   () +    ℎ (16)   ( + 1) = Updated weight   () = Current Weight    ℎ = Derivative of current Weight in each Hidden Layer 9) Update weighting connected to the output layer using the (17).  ( + 1) =   () + (   ) Derivative of current Weight in each Final Layer 10) Repeat steps 2 to 0 for all pairs of input vectors during the learning phase, this iteration is called the epoch.11) Repeat steps 1 through 10 until the epoch achieve the desired error rate.The error rate using the sum of squared errors shown in the output layer for all learning result.  = error measurement in each layer.TELKOMNIKA ISSN: 1693-6930  Comparison of exponential smoothing and neural network method… (Gregorius Airlangga)

Figure 3 .
Figure 3. Backpropagation neural network = forecasting based on level in period t   = forecasting based on trends in period t   = seasonal forecasting based on period t   = actual data in period t   = forecasting results based on the level, and the seasonal trend in period t p= seasonal periods (seasonal) TELKOMNIKA Vol.17, No. 3, June 2019: 1367-1375 1370