You are on page 1of 4

Comparing BP and RBF Neural Network for Forecasting the Resident

Consumer Level by MATLAB




Zhang Caiqing
1
Qi Ruonan
2
Qiu Zhiwen
3

1, 2, 3School of Business and Management, North China Electric Power University, Baoding,
071003, China
qiruonan_china@163.com


Abstract

This paper introduced BP neural network and
RBF Network's basic theory, compared these two
characteristics of the network structure, and applied
to the resident consumer level forecasts. In RBF
neural network forecasting, by changing the size of
the distribution density of RBF, adjusted the forecast
accuracy of the network. Compared the two neural
network forecast results by MATLAB simulation.
From the quantitative point proved that the RBF
neural network is more efficient and accurate than
BP neural network in forecasting the resident
consumer level, and thus more suitable for practical
application in guiding the design of neural network.

1 Introduction

The resident consumer level is to show people's
material and cultural needs of life satisfaction, it
reflects a country or a region's level of economic
development and people's material and cultural living
standards of the comprehensive index. According to
resident consumer level, could be further calculating
the average consumption volume and value of all
kinds of consumer goods.
Chinese people's consumption level as the
economy developed rapidly growth year by year,
according to China Statistical Yearbook 2007, the
consumption level of Chinese residents reached
6,111 yuan in 2006. In order to forecast the
consumption level of Chinese residents in a more
adequate data analysis, the paper collected the data of
gross national income, per capita income of urban
residents, per capita income of rural residents and the
consumer price index, associated with resident
consumer level as a neural network analysis of data,
so as to achieve better results.

2 BP Neural Network and RBF Neural
Network
2.1 BP Neural Network Structure
BP neural network is usually based on the error
back propagation (BP algorithm) to the multi-layer
neural network, it is designed by D.E.Rumelhart and
J.L.McCelland and its research team in 1986.
Transfer function of BP neural network usually used
Sigmoid that can-function, it can be achieved
between the input and output arbitrary nonlinear
mapping, this makes it has a more extensive
application in function approximation, pattern
recognition, data compression field.
BP neural network is usually based on BP
neurons in the multi-forward neural network
structure. Typical BP network structure in following:



2008 International Conference on Computer and Electrical Engineering
978-0-7695-3504-3/08 $25.00 2008 IEEE
DOI 10.1109/ICCEE.2008.35
169








a1=tansig(IW1,1+b1) a2=purelin(LW2,1+b2)
Figure1 A single hidden layer of BP neural network
2.2 RBF Neural Network Structure
RBF network by the input layer, the hidden layer
and a layer of the output before the three-tier
network, to a single output of the neurons as an
example, implied use of radial basis function as an
incentive function, the RBF is generally Gaussian.
The distance between each hidden layer neurons
connected with the input of the weight w1i and the
importation of vector xq, multiplied by the threshold
b1i as their own input, as figure 2:








Figure 2 RBF neural network structure
A hidden layer of the i neuronal input:
2
1 ( 1 )
q
q
b k w x
ji i j i
j
=
(1)
Output:
2 2 2
exp exp 1 exp ( 1 1) ( 1 )
q
q q q
b w x b r w x k i i i ji i
j i
j




= = =






2

RBF threshold b1 can adjust the sensitivity
function, however, in the actual work another
parameter C (expansion constant) used more
commonly. There are a number of established
methods determine the relationship between C and
b1, neural networks in Matlab Toolbox, the
relationship between C and b1:
1 0.8326 / b C
i i
= (3)
At this point, the output of hidden layer neurons :
2
2
0.8326 ( 1 )
1
2
exp exp 0.8326
q
w x
q ji
j
w x
i
j q
g
j
c c i i








= =








4
The weighted sum of the hidden layer neurons
output as input data for the output:
2
1
n
q
y r w
i
i
i
=
=
(5)
RBF network of training process in two steps: the
first step to learning without teachers, determine
weight w1 between input layer and hidden layer; the
second step for the teachers learn to identify weight
w2 between hidden layer and output layer. Before
training, need to provide input vector X, target vector
T and RBF expansion constant C.
3 Network design
3.1 preparations
In this paper, sorted out the data of gross national
income, per capita income of urban residents, per
capita income of rural residents and the consumer
price index associated with resident consumer level
from 1994 to 2006. 1994-2001 data used as training
samples and 2002-2006 data used as testing samples.

Year
Gross
National
Income
Per Capita
Income of Urban
Residents
1994 48108.5 3496.2
1995 59810.5 4283.0
1996 70142.5 4838.9
1997 78060.8 5160.3
1998 83024.3 5425.1
1999 88479.2 5854.0
2000 98000.5 6280.8
2001 108068.2 6859.6
2002 119095.7 7702.8
2003 135174.0 8472.8
2004 140586.7 9421.6
2005 184739.1 10593.0
2006 211808.0 11759.5
Hidden layer Output layer Input
a
2
=y
31
IW
1,1

b
1

LW
2,
b
2

P
21
1
2
n
1

41
a
1

41
1
41
4
n
2

31
3 31
r
n
q


x
1
q

x
2
q

x
m
q

r
1
q

r
2
q

w2
1

w2
q

y
q

170



Table 1 forecast data source
3.2 network creation and training
The number input of RBF network neurons
depend on the factors that can impact the resident
consumer level, from table 1, their number to 4.
Output value is the resident consumer level, so the
output is 1. Newrbe used to create a precise function
of neural networks, which can automatically choose
the number of hidden layer, making forecasts more
accurate. It must be data normalized before used for
training and testing. p as input vector and t as the
goal vector, which can be drawn from Table 1.
MATLAB code as following:

Table 2 training sample after data normalization
Year
Gross
National
Income
Per Capita
Income of Urban
Residents
1994 0.0000 0.0000
1995 0.1950 0.2339
1996 0.3675 0.3992
1997 0.4995 0.4948
1998 0.5823 0.5735
1999 0.6733 0.7010
2000 0.8321 0.8279
2001 1.0000 1.0000
SPREAD is the distribution density of RBF, first
spread from 2.5 to network training, MATLAB code
as following:

The network established during the training
process, therefore, net network is already trained.
3.3 network test
Network test is network simulation and
verification of its ability to forecast. MATLAB code
as following:

p_test is the test samples from Table 1 afer
2002-2006 data normalization. Running the process
results:

After the anti-normalization treatment, the
forecast results: 4014.8 4306.3 5247.7 5447.1 6147.7
compared with the actual results, due to the limited
sample data and forecasts of the greater, the error in
the acceptable range. In addition, SPREAD value of
the network size affect the accuracy of forecasts,
were taken SPREAD = 2.3, 2.7 circumstances
computing network of forecast accuracy. After the
result anti-normalization, compared with the forecast
results, you can find makes the network more
accurate precision SPREAD value. In order to
compare with the forecast data of RBF network,
design BP network in the MATLAB environment,
enter same input, and create a network as follows to
predict:
Per Capita
Income of Rural
Residents
Consumer
Price
Index
Resident
Consumer
Level
1221.0 124.2 1833
1577.7 117.1 2355
1926.1 108.3 2789
2090.1 102.8 3002
2162.0 99.2 3159
2210.3 98.6 3346
2253.4 100.4 3632
2366.4 100.7 3869
2475.6 99.2 4106
3622.2 101.2 4411
2936.4 103.9 4925
3254.9 101.8 5463
3580.7 101.4 6111
171

The results of several comparative figures as
following:

-0=spread2.5 -*= spread2.3 -+= spread2.7
*=y_bp;
Figure 3: BP and RBF forecast error compared
4.Conclusion
These results can be seen that the smallest
network error in SPREAD value from 2.5, the results
and the actual value of the closest. The forecast error
of resident consumer level expressed by "*" in BP
network. Comprehensive comparison found that RBF
network is better than BP network in prediction
accuracy, training time and training speed. It proved
that the RBF neural network is more efficient and
accurate than BP neural network in forecasting the
resident consumer level, and thus more suitable for
practical application in guiding the design of neural
networks.
5.References
[1]China Statistical Yearbook 2007
[2] GE philosophy, Sun Zhiqiang, Neural network theory
and MATLABR 2007. Electronics Industry Publishing
House. 2007
[3] Dong Changhong. Neural network and application[M ].
Beijing: National Defence Industry Press.2005
[4] Neural Network Toolbox.MathWork.2007
[5] Yang Wei, Wang Ende, Chang Chen. Application BP
neural network forecasting urban water demand [J],
Resources and Environment, vol24, No3 2003.
[6] XU F,LU JG, SUN Y X. Application of neural network
in image processing[J]. Information and Control .2003,
32(4): 345-348.
[7] WEN X, ZHOU L, LIX, et a.l Simulation and
application of neural network for MATLAB [M ]. Beijing:
Science Press,.2003.
[8] HippertH S, Bunn DW, Souza R C. Large neural
net-works for electricity load forecasting: are they
overfitted [J]. International Journal of Forecasting .2005,
21(3): 425-434.
[9] GhiassiM, SaidaneH, Zimbra D K. A dynamic artificial
neural network model for forecasting time series e-vents
[J]. International Journal of Forecasting.2005,21(2):
341-362.

172

You might also like