You are on page 1of 5

A Non-linear Autoregressive Neural Network Model

for Forecasting Indian Index of Industrial


Production

Kedar Potdar Rishab Kinnerkar


Student, Computer Engineering Student, Department of Electrical and Computer
Watumull Institute of Electronics Engineering and Engineering
Computer Technology, Worli Iowa State University, Ames
Mumbai, INDIA 400 018 IA USA 50011
kedar1916@gmail.com riskin@iastate.edu

Abstract— For a developing country such as India, to have the The ‘Index of Industrial Production’ (IIP) is not randomly
best usage of resources, public planning requires good forecasts generated data, and hence can be used for discrete time series
of future trends. India’s Index of Industrial Production (IIIP) is analysis. [1] There are multiple motives for analysis and
an index which conveys the status of production in the industrial predictions of IIP data. First, it would help stakeholders and
sector of the economy. In this study, an artificial neural network
people concerned with the industrial sector to obtain a better
(ANN) was applied to forecast IIIP. Accordingly, the inputs to the
ANN consisted of data spanning from F.Y. 2004-05 to F.Y. 2013- understanding on how the industrial sector would perform in
14 of Gross Domestic Product (GDP), Consumer Price Index the future. Second, forecasting could help policy makers
(CPI), Wholesale Price Index (WPI) and Index of the Eight Core formulate their policies taking into consideration the direction
Industries (Electricity, Steel, Refinery Products, Crude Oil, Coal, that the industrial sector is heading in. Third, international
Cement, Natural Gas and Fertilizers) to forecast IIIP. Therefore, rating agencies can use forecasting data as an indicator in their
a methodology for forecasting was developed using Nonlinear assessment of a country.
Autoregressive (NAR) and Nonlinear Autoregressive neural
network with exogenous inputs (NARX) models. Several In this paper, a nonlinear autoregressive (NAR) neural
structures of the neural networks were tested for forecasting, and
network for forecasting IIP has been proposed. The study
then the results were compared in terms of forecasting error. The
NARX network with 11 hidden layers and 1 delay line provided employs a comparison between NAR and NAR with
the best results with a Mean Square Error (MSE) of 2.168. Thus, exogenous inputs (NARX) to find an optimal model for
ANNs can be used for accurate forecasting of Industrial forecasting the IIP.
Production.
II. LITERATURE REVIEW
Keywords— connectionism and neural nets, machine learning, There is a great amount of research literature related to
time series analysis time series regression using neural networks. In this section,
some of the relevant work which has already made its mark in
I. INTRODUCTION this field of study has been furnished.
Economic growth of any country is dependent on its Industrial
growth. Industrial growth is crucial to India’s emergence as a Ruiz et al. [3] predicted the consumption of energy in
developed nation. With the increasing need for greater public buildings using NAR neural networks. They use data
production to cater to India’s vast population, the industrial from energy consumption sensors for their work along with
sector is essential to meet India’s ever increasing needs. The external data such as temperature. After testing prediction
‘Index of Industrial Production’ serves as an indicator which models, they conclude that both NAR and NARX neural
denotes the relative growth of production in the industrial networks provide suitable prediction accuracy, and NARX
sector of the Indian economy. While calculating the IIIP for a networks outperform NAR networks due to the external data.
particular time period: a comparison is made between the
chosen time period against the base time period and further In [5], Arbain and Wibowo have used neural networks for
calculations are made. [1] [4] time series regression to predict the water level of the Dungun
River in Malaysia. Using the input variables of rainfall per
‘Time Series’ is a collection of data points with month, evaporation rate, temperature and relative humidity
observations generally sampled at equal intervals of time. [2] recorded in the Dungun River catchment, they predicted the
Time Series Forecasting is the prediction of future values water level using Backpropagation Neural Networks (BPNN)
based on a set of previously obtained values using models.

978-1-5090-6255-3/17/$31.00 ©2017 IEEE


2017 IEEE Region 10 Symposium (TENSYMP)

TABLE 1 TABLE 3
INDEX OF INDUSTRIAL PRODUCTION SECTOR THREE GROUPS IN WHOLESALE PRICE INDEX

Sr. No. Sector No. of items Weight Commodity Group Group Weight in WPI (%)
1 Mining 61 141.57 Primary Articles 20.12
2 Manufacturing 620 755.27 Fuel and Power 14.91
3 Electricity 1 103.16 Manufactured Products 64.76
4 General Index 682 1000

In a linear approach, the accuracy decreases if the


and NARX neural networks. Their experiments conclude that
fluctuations in the input parameters are high and within a short
the NARX model with 5 input variables is better than BPNN. span of time. Thus, for getting an accurate model, a nonlinear
approach is better in this case.
To predict ozone density in Houston, Prybutok et al. [6]
compared neural network models with ARIMA and regression A NAR neural network, applied to time series forecasting,
models. They compared a neural network model with describes a discrete NAR model. It can be written as follows:
conventional statistical models, regression and Box-Jenkins
(1)
ARIMA. Their results showed that the neural network model
performed better at the task of predicting concentrations of The equation describes a NAR network’s function to
ozone than the conventional models. predict a particular value of data series y using p previous
values of y. The function f(.) is unknown and the neural
In [7], BH Goh used an artificial neural network (ANN) network training approximates the function by optimizing the
model to predict the demand for the construction of residential network weights and neuron bias. Furthermore, the term e(t)
projects in Singapore. He compared univariate Box‐Jenkins represents the error or noise term.
approach, multiple loglinear regression and ANN regression
and concluded that ANN model performs the best overall.
B. NARX Model
Unlike the NAR model, the NARX model uses exogenous
III. METHODOLOGY inputs in its computations. A significant difference between
The current research required the following stages of NARX and other recurrent networks is that NARX makes use
development: data collection and preprocessing, ANN of limited feedback which it gets from its output neuron. [14]
modeling and, finally, analysis and comparison between As demonstrated in the paper below the NARX model with
performances of the two models: NAR and NARX. limited feedback is used without any computational loss, which
is why it was preferable to use. [10]
In this study, two neural network architectures used for The equation modeling the NARX network behavior for
time series forecasting were used. The first one is NAR neural time series prediction is as follows:
networks, which are used to predict a time series from past
values of the particular series. [8] The second one is NAR (2)
neural networks with exogenous inputs (NARX) used to In the abovementioned equation, the y(t) term corresponds
predict one-time series’ given past values of the same-time to the output obtained from the NARX model. The x(t-1), x(t-
series, the feedback input, and another time series, called the 2), etc. are the data inputs that constitute India’s IIP (IIIP), e.g.
external or exogenous time series. [9] [3] CPI, GDP. The function f() corresponds to the mapping done
A. NAR Model by a Multilayer Perceptron (MLP). It takes in the input and
corresponding output of the abovementioned data inputs and
In this application, 12 inputs nodes with relatively high computes the results for each one of these inputs and constructs
variations in amplitude for a short span of time were used. a NARX model.

TABLE 2 IV. DATA ACQUISITION AND PREPROCESSING


WEIGHTS OF THE EIGHT CORE INDUSTRIES
A. Data Collection
Industries % weightage in IIP
Electricity 10.32 In this study, five datasets were used – comprising of
Steel (Alloy + Non Alloy) 6.68 twelve time series. The five datasets are as follows:
Refinery Products 5.94 1. Index of Industrial Production
Crude Oil 5.22
Coal 4.38 IIP is an abstract number, and its magnitude represents the
Cement 2.41 status or level
Natural Gas 1.71
Fertilizers 1.25
2017 IEEE Region 10 Symposium (TENSYMP)

TABLE 4 thus permitting the removal of the effect of any subsidy or


FREUQUENCY OF THE USED TIME SERIES
indirect tax from the final cost. [19]
Sr. No. Dataset Frequency
Index of Industrial Production (dependent The GDP at Factor Cost quarterly data was obtained from
1 Monthly
variable)
Reserve Bank of India’s Database of Indian Economy with
2 GDP at Factor Cost Quarterly
Consumer Price Index (Rural & Urban –
base year 2004-05 till 2013-14.
3 Monthly
combined)
4 Wholesale Price Index Monthly 4. Wholesale Price Index
5
Eight Core Industries(ECI) – General
Monthly
Wholesale Price Index (WPI) is the cost of wholesale
Index goods that are sold in bulk and traded among organizations
6 Coal Monthly instead of end consumers. In India, WPI is the primary
7 Crude Oil Monthly measure of inflation, and it measures the representative bulk
8 Natural Gas Monthly
price of wholesale goods. [16]
9 Petroleum Monthly
10 Fertilizers Monthly
WPI is divided into three groups: Primary Articles, Fuel and
11 Steel Monthly
Power and Manufactured Products. WPI data is released
12 Cement Monthly
13 Electricity Monthly
monthly in India. In this study, data from Fiscal Year 2004-05
to 2013-14 was used. It is obtained from Reserve Bank of
India’s Database on Indian Economy. [17]
of production in the industrial sector for a particular time
period compared with a reference time period. The current base The distribution of the three groups in the WPI is shown in
year is 2004-05. Table 3.
IIP is time series with frequency of one month and is 5. Consumer Price Index
released by the Ministry of Statistics and Programme Consumer Price Indices (CPI) measure variations in the
Implementation (MOSPI). [11] The Index of Industrial overall prices of goods and services acquired for household
Production comprises 682 individual items. The division of consumption. Moreover, CPI numbers are widely used as a
items is shown in Table 1. For this study, IIP data from 2004- macroeconomic indicator of inflation, a tool for inflation
05 to 2013-14 was used. targeting and price stability monitoring by the government and
2. Index of Eight Core Industries central banks, and deflators in national accounts. Furthermore,
CPI is used for measuring dearness allowance provided to
The Index of Eight Core Industries is a monthly production employees when prices increase. Therefore, CPI is considered
measure, and is additionally considered to be the chief to be one of the most important economic indicators. [18]
monthly industrial performance indicator. This index is
compiled on the basis of information regarding monthly CPI in India is reported by MOSPI. [18]
production obtained from the Source Agencies. [15]
CPI data in India is divided into Rural and Urban. Apart
The index counts the performance of the eight core from these two groups, there exists a ‘Combined Index’,
industries, which are Coal, Crude Oil, Natural Gas, Petroleum which as the name suggests is the combination of Rural and
Refinery Products, Fertilizers, Steel, Cement and Electricity. Urban indices.
Furthermore, this index accounts for 37.90 % in IIP.
For this study, the combined index of CPI that is recorded
The weights of the eight core industries in IIP (in at monthly intervals from 2004-05 to 2013-14 was used. Thus,
decreasing order) are given in Table 2. a summary of the 13 time series for modeling our NAR and
NARX models with their frequencies is given in Table 4.
For this study, the eight core industries and the general
index time series that are recorded at a frequency of one B. Data Preprocessing
month were used. The data used is from 2004-05 to 2013-14. The original data collected from different sources contain
flawed features. These flaws need to be treated before
3. Gross Domestic Product at Factor Cost processing the data.
Gross domestic product (GDP) is a monetary index
measuring the market value of all final goods and services
produced over a given period. India’s GDP is released The following steps are taken for preprocessing:
quarterly.

Factor cost measures the national income or output based


on the cost of production factors, rather than market prices,
2017 IEEE Region 10 Symposium (TENSYMP)

TABLE 5 TABLE 6
PERFORMANCE OF NAR NEURAL NETWORK PERFORMANCE OF NARX NEURAL NETWORK
Sr. No. of No. of MSE MSE Sr. No. No. of No. of delayed MSE MSE
No. layers delayed lines Training Testing layers lines Training Testing
1 6 1 9.36060 8.16983 1 6 1 12.69749 9.49640
2 7 1 12.5931 6.89666 2 7 1 2.90704 5.84927
3 8 1 6.70296 12.74071 3 8 1 2.28092 26.82655
4 9 1 7.20492 5.09620 4 9 1 4.40000 20.91625
5 10 1 6.52560 14.62406 5 10 1 7.57500 30.81499
6 11 1 8.59902 6.36540 6 11 1 13.38862 23.01490
7 12 1 10.47430 15.74989 7 12 1 11.59980 24.54546
8 13 1 22.05189 22.33044 8 13 1 2.01745 8.10128
9 6 2 7.52666 13.41158 9 6 2 1.41043 12.53845
10 7 2 19.29471 13.33509 10 7 2 0.255698 2.29432
11 8 2 6.0484 26.26487 11 8 2 0.339068 2.16835
12 9 2 21.25287 27.89176 12 9 2 0.180458 20.18673
13 10 2 17.46734 12.98628 13 10 2 0.372230 7.65781
14 11 2 22.32796 25.15506 14 11 2 11.03554 21.65967
15 12 2 10.85875 20.80271 15 12 2 0.749914 14.36224
16 13 2 11.92303 30.57112 16 13 2 2.16069 22.50687

That is, given the series Zt, the following new series can be
1. Aligning Data Frequencies created:
Of the 13 time series used for modelling, all variables
except GDP are sampled at monthly intervals. The GDP data (3)
is sampled at quarterly intervals. In this study, the remaining \
datasets were converted to match the frequency of GDP. The The differenced data will contain one point less than the
monthly variables are converted to quarterly by taking original data.
averages of 3-month periods corresponding to the four
quarters of a financial year. 3. Data Normalization
Since the data in time series is not normalized, it can
2. Differencing for Stationarity negatively affect the regression performance of the neural net-
The properties of a stationary time series are not dependent work model. [30] The time series data was transformed into
on the time at which it is observed. Therefore, time series with normalized data using the following equation:
trends or seasonality are not stationary, i.e., the value of the
time series will be affected by the trend and seasonality at
(4)
different times. [12]

Stationarity is desirable when modelling a time series for V. PERFORMANCE METRICS


several reasons. First and foremost, the behavior of stationary
Performance evaluation is required to determine the best
time series differs from non-stationary time series. However,
neural network architecture. This helps in extremely reliable
with regard to stationary series, a shock will have less
and accurate predictions by obtaining an architecture that
influence over time, whereas for non-stationary series the
finishes with minimum training iterations and minimum time
influence of shock remains for longer time steps. Furthermore,
of training. For regression problems, the Mean Square Error
using non-stationary data could provide misleading results or
(MSE) metric is frequently used to determine the performance
so-called 'spurious regressions'. [13]
of model. The best neural network model has the smallest
MSE value.
If a time series is not stationary, it can be made stationary
by differencing. Differencing is a technique which involves
the computation of differences between two consecutive VI. EXPERIMENTAL RESULTS AND ANALYSIS
observations. Moreover, it can help stabilize the mean of a
time series by excluding variations in the level of a time series,
thus eliminating trend and seasonality. [20] In this study, the NAR and NARX neural networks were
used to forecast future values of a time series. Time series,
y(t), was obtained from the past values of that time series.
Various models of the network with different number of
hidden layers and tapped delay lines were tested. The
Lavenberg-Marquardt backpropagation algorithm was used
2017 IEEE Region 10 Symposium (TENSYMP)

with training for 1000 epochs and learning rate of 0.001. [2] C. Chatfield, The Analysis of Time Series: An Introduction, 6th ed,
Chapman & Hall/CRC, Boca Raton, Fla.
Training automatically terminates when the improvement of
[3] L. G. B. Ruiz, M. P. Cuéllar, M. D. Calvo-Flores, and M. D. P. Jiménez,
generalization stops, which is indicated by an increase in the "An Application of Non-Linear Autoregressive Neural Networks to
MSE of validation samples. [8] [9] Predict Energy Consumption in Public Buildings", Energies, vol. 9, no.
9, pp. 684, 2016
The data is divided into training, validating and testing [4] S. S. Singh, T. Loidang Devi, and T. Deb Roy. “Time Series Analysis
data. Accordingly, 70%, 15% and 15% of data is used for of Index of Industrial Production of India,” IOSR Jour-nal of
Mathematics (IOSR-JM), vo. 12, no. 3 ,pp. 01-07, May. - Jun. 2016
training, validation and testing, respectively. [22]
[5] S. H. Arbain, and A. Wibowo, "Neural networks based nonline-ar time
series regression for water level forecasting of Dungun River," Journal
A. NAR Method of Computer Science, vol. 8, no. 9, pp.1506, 2012.
Table 5 illustrates the values for MSE obtained for [6] V. R. Prybutok, J. Yi, and D. Mitchell, "Comparison of neural network
different tested models of the NAR network. As observed, the models with ARIMA and regression models for predic-tion of Houston's
NAR network with 9 layers and 1 tapped delay line provides daily maximum ozone concentrations," Euro-pean Journal of
Operational Research, vol. 122, no. 1, pp. 31-40, 2000.
best accuracy with a testing MSE of 5.09620 followed by the
[7] B. H. Goh, "Forecasting residential construction demand in Singapore: a
NAR networks with 11 and 7 layers and 1 tapped delay line. comparative study of the accuracy of time series, regression and
Furthermore, the models with a single tapped delay line artificial neural network techniques," Engineer-ing, Construction and
consistently outperform the models with 2 delay lines in Architectural Management, vol. 5, no. 3, pp. 261-275, 1988
training and testing MSEs. [8] The Mathworks Inc., “Nonlinear autoregressive neural net-work -
MATLAB narnet - MathWorks India”,
https://in.mathworks.com/help/nnet/ref/narnet.html 2016
B. NARX Method [9] The Mathworks Inc., “Nonlinear autoregressive neural net-work with
Table 6 illustrates the values of MSE for NARX model for external input - MATLAB narxnet - MathWorks India”,
prediction of IIP. From Table 6 it is clear that NARX network https://in.mathworks.com/help/nnet/ref/narxnet.html 2016
with 11 layers and 2 delayed lines provides the smallest MSE [10] T. Lin, B. G. Horne, P. Tino, and C. L. Giles, “Learning long-term
of 2.16835. The network with 7 layers and 2 delayed lines dependencies in NARX recurrent neural networks,” IEEE Transactions
on Neural Networks, vol. 7, no. 6, pp. 1329-1338, 1996,
provides the second best result with a testing MSE of 2.29432. doi:10.1109/TVCG:72.548162
The NARX network with 2 delayed lines outperforms the ones [11] Government of India – Ministry of Statistics and Programme
with 1 delayed line. Implementation, “Time Series Indices of Industrial Production 2004-
05”, http://mospi.nic.in/time-series-indices-industrial-
production-2004-05. 9th December 2016.
[12] A. Refenes, A. Editor, Neural networks in the capital markets. New
VII. CONCLUSION York, John Wiley & Sons, 1995.
[13] C. Brooks, Introductory econometrics for finance. Cambridge, Cam-
In this paper, the findings behind building an ANN model bridge University press, 2002.
using NAR and NARX techniques for fore-casting IIIP trends [14] H. T. Siegelmann, B. G. Horne, and C. Lee Giles. "Computa-tional
were demonstrated. Furthermore, these two models were capabilities of recurrent NARX neural networks," IEEE Transactions on
compared in terms of their respective accuracy performance. Systems, Man, and Cybernetics, Part B (Cybernetics) vol. 27, no. 2, pp.
Various models of the NAR and NARX neural net-works with 208-215, April 1997, doi: 10.1109/TVCG:3477.558801
different numbers of hidden layers and tapped delay lines were [15] Government of India – Ministry of Commerce & Industry, “Index of
Eight Core Industries (Base: 2004-05=100)”,
tested. The best forecasting accuracy was obtained using the http://www.eaindustry.nic.in/eight_core_infra/Eight_Infra.pdf.
NARX model with 8 hidden layers and 2 delayed line. The 13 November 2016
input parameters as mentioned in Table 4 used could fit [16] The Economic Times, "Definition of 'Wholesale Price Index,”
coherently in the ANN models and provided accurate results http://economictimes.indiatimes.com/definition/wholesale-price-index
2016
to predict IIIP. Low errors were obtained during the testing,
[17] Reserve Bank of India, “Database on Indian Economy”,
which provides proof for the same. In conclusion, ANN https://dbie.rbi.org.in/DBIE/dbie.rbi?site=home 2016.
techniques can be used for forecasting of a nonlinear time [18] Government of India – Ministry of Statistics and Programme
series such as the Indian Index of Industrial Production. Implementation, “Consumer Price Index”,
http://164.100.34.62:8080/cpiindex/Default1.aspx 2016
[19] G. Bannock, R. E. Baxter, and E. Davis, The Economist Books
Dictionary of Economics. London, John Wiley and Sons, 1998.
[20] R. J. Hyndman and G. Athanasopoulos, Forecasting: principles and
REFERENCES practice, OTexts, 2013.
[21] K. Potdar and R. Kinnerkar, “A Comparative Study of Machine
[1] Government of India – Ministry of Statistics and Programme
Learning Algorithms applied to Predictive Breast Cancer Da-ta,”
Implementation, “Index of Industrial Production – Revision of Base year
International Journal of Science and Research, vol. 5, no. 9, pp. 1550-
to 2004-05: An Overview”
1553, Sep. 2016
http://www.mospi.gov.in/sites/default/files/main_menu/iip/
base_revision_2004-05_29nov11.pdf. 2011

You might also like