Performance of neural network model in forecasting Indonesian inflation
SWUP
MA.104
nonlinear model or nonlinear function to any desired accuracy. Neural network is also capable of time series forecasting, in which the next outcome or outcome for the next several
time steps are predicted. This is accomplished by capturing temporal patterns in the data in the form of past memory, which is embedded in the model. In forecasting this knowledge
about the past defines future behaviour.
How to select these weights and how to obtain optimal architecture are key issues in the use of neural network. The usual approach is to derive a special-purpose weight selection
algorithm. In this note, we investigate the usefulness of a neural network model for forecasting inflation. The optimization training is done based on Levenberq-Marquardt
method. The performance of neural network is quantified by MSE, in both in-sample prediction and out-of-sample prediction. The selected lags as input variables are obtained
from the best subset ARIMA model. The optimal architecture, i.e the optimal number of hidden neuron in hidden layer, is specified through a looping process, based on the minimum
out-of-sample performance. The reached of maximum epoch and the achieved of minimum MSE, were the rules of thomb of the stopping criteria.
2. Materials and methods
Neural network is simply a parameterized nonlinear function that can be fitted to data for prediction purposes. The nonlinear function is constructed as a combination of nonlinear
building blocks, known as activation functions. There are many choices for activation function. A common example of an activation function is the sigmoid function,
=
o ¡¢
. The structure of neural network is commonly described in neural network jargon. There are three layers in neural network architecture; input layer, hidden layer and output
layer. The unit in each layer is called neuron. Increasing the numbers of neurons and layers increases the flexibility of the neural network. The first layer, input layer, comprises of a
number of input variables named input neuron. It is refer to independent variable in regression term. In time series term, input neuron is the lags of the series itself, i.e the past
values of the series. In the case of the inflation data, they are the past values of of the inflation data itself. This terminology is as in autoregressif term.
The hidden layer consist of one or many hidden neurons. How many hidden neuron in the hidden layer is still an interesting open problem in neural network modeling. The weights
connections of input to hidden neuron link the first layer to the second layer. Each hidden neurons passes its weighted sum through activation function. The outputs of the hidden
neurons are conveyed into the output neuron via the set of connection weights between hidden neuron and output neuron. The output of neuron in the last layer makes up the
network output, which is usually a single output in prediction case. The output neuron is refer to dependent variable in regression term.
Neural Network model used in this paper is Feed Forward Neural Network FFNN. The FFNN architecture in time series field is a configuration consist of X
t-1
to X
t-p
and a bias in input layer, a hidden layer consist of N neuron and a neuron output. The layout of FFNN with this
architecture is shown in figure 1. This architecture can be modeled in Eq. 1. r = T
¼
и + ∑ ¸
7
T
7
-¸
7
+ ∑ ¸
7 o
.
7
Ñ, 1
where w
bn
are weights between bias and hidden neuron, w
bo
are weights between bias and output neuron, whereas w
in
and w
no
are connection weights between input and hidden neuron, and between hidden neuron and output, respectively. The symbols ψ
n
and ψ
o
are the activation functions used in hidden neuron and output neuron, respectively. The number
B. Warsito, Sukarti, M.A. Mukid
SWUP
MA.105
of weights estimated from the model is × + 2 + + 1. The main problem in neural
network modeling is how to obtain the optimal weights w = {w
bn
, w
bo
, w
in
, w
no
}. As in
commonly optimization problem, we have to obtain w to get the minimum error between actual data X
t
and the prediction.
Figure 3. The FFNN architecture for time series prediction consists of a hidden layer
which N neuron and input variables are the values at lags X
t-1
, X
t-2
,…, X
t-p
In FFNN construction, training process of the network is done by back-propagation algorithm. It comprises three phases: feed-forward of the input pattern, calculating and back
propagate the error, and adjusting the weights. In feed-forward stage, input neuron get the input signal X
t-i
and spread it to the hidden neuron z
1
, …, z
N
. Each of the hidden neuron is then calculate the activation and calculate the weighted summing of the input in the form:
•
€
Õ
= ∑ ¸
¥
r
o
+ ¸
¥
, 2
where X
t-i
is the activation of input i that sent the signal to hidden neuron j; w
ji
is the weights of the sent signal and j = 1,2, …, N is the number of neuron hidden, whereas w
bj
is the weights from bias to hidden neuron j. The result of the summing is then transformed by activation
function T
7
to obtain z
j
: •
¥
= ••
€
Õ
–. 3
The hidden neuron then sent the signal z
j
to output neuron. Furthermore, output neuron calculates the activation to give a response of the input pattern taken from network:
² ¸, • = ∑ ¸
¥
•
¥ ¥
+ ¸ . 4
The function at Eq. 4 is output of the network = ∑ ¸
¥
g
¥ ¥
+ ¸ . 5
During the training process, output neuron will compare the output with the target to determine error of the training. Varying optimization algorithm can be used as a method to
obtain the optimal weights. For simplicity we employ Levenberg-Marquardt method, one populer learning method for error correction, with randomly weights initialization. There are
two stopping criteria used in this technique. The first is the maximum number of epoch and the second is the minimum of the error performance. The training process is repeated,
adjusting weights until one of the two criteria is reached, either the optimum network
Output Layer Hidden Layer
X
t-2
X
t
X
t-1
X
t-p
Input Layer
Bias Bias
Performance of neural network model in forecasting Indonesian inflation
SWUP
MA.106
performance or resulting in minimum error is achieved or the maximum number of epoch is attained.
The other important part of FFNN modeling is how to determine the optimal number of hidden neuron in the hidden layer. Many researchers just use trial and error method as a
rule of thomb of getting the number. In this paper we use a computation programming to get the optimal number by looping processs. The obtaining process is started with a small
number up to a big number in reason. This process finished when the minimum it reached the minimum error.
MSE measures the average of the squares of the error. MSE may overcome the cancellation of positive and negative errors limitation of the just ME, but it fail to give
information on forecasting accuracy relative to the scale of the series analyzed. For business use, MAPE is often preferred because seemingly ones understand percentages better than
squared error. For this objective, we also calculate the MAPE of testing data.
3. Results and discussion