# Prediction of Freight Ability in Country Base on GRNN

Baihua Zhang

► To cite this version:

Baihua Zhang. Prediction of Freight Ability in Country Base on GRNN. 4th Conference on Computer and Computing Technologies in Agriculture (CCTA), Oct 2010, Nanchang, China. pp.525-531, 10.1007/978-3-642-18354-6_61. hal-01563487

HAL Id: hal-01563487

https://inria.hal.science/hal-01563487

Submitted on 17 Jul 2017

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# Prediction of freight ability in country base on GRNN

Baihua Zhang

Department of Computer, Wenzhou Vocational and Technical College,
325000, Wenzhou, P. R. China,
zbaihua@126.com

**Abstract.** Developing the country's economic is a hot topic in Chinese society, and then the freight ability is a value that show the development of the local economic. The prediction of freight ability in country is benefit to the planning of country's transport. This article choose suited input first, and then make up the GRNN model, at last, predict the ability of the freight.

**Keywords:** Prediction, Freight ability in Country, GRNN

## 1 Research background

Perfect transportation is key guarantee for country to solute "Three Rural Issues". Accelerating the development can efficaciously help to deal with problem about circulation of agricultural products, strengthen the agricultural integrated produce ability and improve the adjustment of industry structure in country. Besides, it can also widen developing idea, improve the investment environment and achieve the goals of agricultural development and income rising; what's more, smooth transport could resolve those predicaments about sale and buy, stimulate the growth of rural consumption and shrink the distance among regions.

Perfect transportation plays a supporting role in development of urban and rural, construction of harmonious society. Convenient communication of labor and goods will effectively change the binary pattern contacted with employment, income, education, medical resource and so on. Rural transport is the important component and the end of integrated transportation network. Just like the capillary in body, rural road network builds bridge between aorta of the whole nation and great channel of special regions, and is the symbol show the width and depth of transport. We must take measures to speed up the development of transport network in rural regions, so as to arouse its skeleton effect, and keep the whole network development coordinately and proportionally.

Woeful condition of transport infrastructure is one of the key reasons leading to poverty of rural regions, which play objectively inciting role in development of country economy. The success of rural transport plan partly lies on the prediction of freight ability in country, which prepensely and preparedly carries on program for
rural transport for related workers when they face interrelated works, to meet the need
of the rural economy development[1].

## 2 GRNN

The common freight volume prediction contains time series, regression analysis, grey prediction and composed prediction integrating kinds of methods. These methods almost concentrate in the analysis on Regression Model and Time Series Model toward its causality, these models cannot predict the inner structure and complicated character of these predicted dynamic data comprehensively and constitutionally, as a result, many the amount of information are missed. As a kind of parallel calculation model, Artificial Neural Networks holds many advantages surpassing traditional modeling methods, and is more effective for nonlinear mapping. ANN don't need too much experienced knowledge about modeled objects, such as the structure, parameter and dynamic character, only demanded is working out objects' output data and input data, and then input/output mapping will be easily reached through network' own learning function.

Prediction of freight volume can use BP net and RBF net, which, however, owns some weak point such as low convergence speed and much too tiny parts. So, unfortunately, the result is not absolutely desirable when the sample is not enough and unwanted sound is crowded. Compared with BP net and RBF net, GRNN have a strong advantage in approximation capability, category capacity, learning speed. Net will finally converge to optimal regression surface which contains more samples, get better predict result even when the sample data is in shortage and in unsteadiness. Hence, I will attempt to build prediction model to predict rural freight volume by the help of GRNN[2].

### 2.1 GRNN introduction

Structure of GRNN is shown as Figure 1:

<figure><img src="image_2.png" /><figcaption>Picture 1 The picture of GRNN net's conformation</figcaption></figure>

The first layer is hidden layer of Radial basis, the amount of neurons equals that of training samples. In this layer, weight function is Euclidean distance function,
whose function is calculating the distance between data in computing network and the first weights $IW_{1,1}$, $b^1$ stands for threshold in this hidden layer. Mark “g” expresses the relation between data from *dist* and $b^1$. Transfer function in this layer is RBF, and the Gaussian function is regarded as transfer function:

$$R_i(x) = \exp\left(-\frac{x-c}{2\sigma_i^2}\right) \qquad (1)$$

In addition, $\sigma_i$ decides the shape of basis function in the first hidden layer, the larger it is, the smoother the basis function is, so $\sigma_i$ is also called smoothing factors.

The second layer is linear output layer, whose weights function is standardization dot product weight function, been used to calculate the vector $n^2$, $\alpha^1$ multiply each line element in $LW_{2,1}$, then divided by the sum of every factor of $\alpha^1$, we can obtain every element. And the result $n^2$ will be offered for transfer functions[3]:

$$\alpha^2 = \text{purelin}(n^2) \qquad (2)$$

Study modification of GRNN connection weights also use BP Algorithm. Basis function in network hidden layer nodes chooses Gaussian function. As that above can show, this kind of network has capacity of local approximation, which just is the reason leading to quicker study programs. In addition, there are little personal adjusting parameter, only one threshold, and all the network study depend on data sample, which bring up the ability preventing prediction result from being affected by those personal and subjective presumption to the utmost extent. Compared with BPNN, GRNN demands less parameter need to be adjusted and has one smoothing factor, so can find proper forecast network quickly, and holds more advantage in calculation.

## 2.2 Construction and training of network

### (1) Choose impact factor

The analysis on impact factor of rural freight volume contains human, wealth, objects. Adopted in this paper have some impact factors, which is regarded as network output as follow.

① Transport instrument. For water transport in the whole freight is extremely small, the main transport instrument is motor vehicle and railway. Adopt rural freight cars number to indicate(x1) and the number of freight train(x2).

② Mileage of transport route. water transport take up bitterly little. So adopt mileage of rural highway(x3) and Railway(x4).

③ Number of practitioners on transport. The amount of those people own driver's license and driving permit in rural region(x5).

④ Level of local economy development. Local GDP (x6)and agriculture, animal husbandry and fishery value(x7) will be chose.
⑤Tax on rural transport. Total tax of local transport can reflect the ability of rural transport macroscopically.

(2)Choose output factors.

Make the freight mileage in the country(x10)、railway freight traffic (x10) and the highway freight traffic(x11) as the output factors, which is called the network output amount.

Building GRNN after choose impact factor and output factors. Because smoothing factor may affect the capability of network, so it is necessary to try again for the best result.

According to the output factor and input factor being determined above, make one rural region's historical statistics from 2001~2007 as training sample of network, and regard historical statistics between 2008 and 2009 as extrapolation of test samples. Input sample and target sample is as follow table.

<table><caption>Table1 The sample data between 2001 to 2009 in a country area (input sample)</caption><thead><tr><th>Year</th><th>x(1)</th><th>x(2)</th><th>x(3)</th><th>x(4)</th><th>x(5)</th><th>x(6)</th><th>x(7)</th><th>x(8)</th></tr></thead><tbody><tr><td>2001</td><td>21.30</td><td>1349.41</td><td>0.97</td><td>0.32</td><td>23.1</td><td>707.58</td><td>109.73</td><td>80.5</td></tr><tr><td>2002</td><td>20.93</td><td>1484.05</td><td>1.10</td><td>0.32</td><td>28.6</td><td>821.40</td><td>123.68</td><td>94.5</td></tr><tr><td>2003</td><td>21.88</td><td>1616.93</td><td>1.27</td><td>0.35</td><td>30.8</td><td>900.99</td><td>148.18</td><td>87.5</td></tr><tr><td>2004</td><td>22.85</td><td>1767.14</td><td>1.51</td><td>0.36</td><td>31.9</td><td>947.97</td><td>163.63</td><td>91</td></tr><tr><td>2005</td><td>24.63</td><td>1910.76</td><td>1.79</td><td>0.36</td><td>34.1</td><td>993.01</td><td>183.19</td><td>91</td></tr><tr><td>2006</td><td>26.07</td><td>2062.04</td><td>2.05</td><td>0.37</td><td>36.3</td><td>1081.78</td><td>195.27</td><td>98</td></tr><tr><td>2007</td><td>27.85</td><td>2191.44</td><td>2.34</td><td>0.37</td><td>39.6</td><td>1160.79</td><td>214.17</td><td>98</td></tr><tr><td>2008</td><td>29.56</td><td>2353.32</td><td>2.49</td><td>0.39</td><td>42.9</td><td>1267.96</td><td>231.90</td><td>105</td></tr><tr><td>2009</td><td>31.85</td><td>2504.06</td><td>2.74</td><td>0.39</td><td>45.1</td><td>1412.00</td><td>250.62</td><td>105</td></tr></tbody></table>

<table><caption>Table1 The sample data between 2001 to 2009 in a country area (goal sample)</caption><thead><tr><th>Year</th><th>x(9)</th><th>x(10)</th><th>x(11)</th></tr></thead><tbody><tr><td>2001</td><td>1241.08</td><td>633.62</td><td>559.64</td></tr><tr><td>2002</td><td>1507.50</td><td>735.93</td><td>680.56</td></tr><tr><td>2003</td><td>1800.38</td><td>837.96</td><td>815.08</td></tr><tr><td>2004</td><td>1967.07</td><td>966.26</td><td>945.80</td></tr><tr><td>2005</td><td>2257.76</td><td>1109.06</td><td>1095.63</td></tr><tr><td>2006</td><td>2490.93</td><td>1205.58</td><td>1194.97</td></tr><tr><td>2007</td><td>2741.84</td><td>1329.33</td><td>1241.02</td></tr><tr><td>2008</td><td>2972.20</td><td>1458.85</td><td>1346.21</td></tr><tr><td>2009</td><td>3189.50</td><td>1577.57</td><td>1456.31</td></tr></tbody></table>

First, take normalization with those data, after it the data are as follows:
<table><caption>Table 2 The data between in a country area after normalization</caption><thead><tr><th>Year</th><th>x(1)</th><th>x(2)</th><th>x(3)</th><th>x(4)</th><th>x(5)</th><th>x(6)</th><th>x(7)</th><th>x(8)</th><th>x(9)</th><th>x(10)</th><th>x(11)</th></tr></thead><tbody><tr><td>2001</td><td>0.034</td><td>0.000</td><td>0.000</td><td>0.000</td><td>0.000</td><td>0.000</td><td>0.000</td><td>0.000</td><td>0.000</td><td>0.000</td><td>0.000</td></tr><tr><td>2002</td><td>0.000</td><td>0.117</td><td>0.073</td><td>0.000</td><td>0.250</td><td>0.162</td><td>0.099</td><td>0.571</td><td>0.137</td><td>0.108</td><td>0.135</td></tr><tr><td>2003</td><td>0.087</td><td>0.232</td><td>0.169</td><td>0.429</td><td>0.350</td><td>0.275</td><td>0.273</td><td>0.286</td><td>0.287</td><td>0.216</td><td>0.285</td></tr><tr><td>2004</td><td>0.176</td><td>0.362</td><td>0.305</td><td>0.571</td><td>0.400</td><td>0.341</td><td>0.383</td><td>0.429</td><td>0.373</td><td>0.352</td><td>0.431</td></tr><tr><td>2005</td><td>0.339</td><td>0.486</td><td>0.463</td><td>0.571</td><td>0.500</td><td>0.405</td><td>0.521</td><td>0.429</td><td>0.522</td><td>0.504</td><td>0.598</td></tr><tr><td>2006</td><td>0.471</td><td>0.617</td><td>0.610</td><td>0.714</td><td>0.600</td><td>0.531</td><td>0.607</td><td>0.714</td><td>0.641</td><td>0.606</td><td>0.709</td></tr><tr><td>2007</td><td>0.634</td><td>0.729</td><td>0.774</td><td>0.714</td><td>0.750</td><td>0.643</td><td>0.741</td><td>0.714</td><td>0.770</td><td>0.737</td><td>0.760</td></tr><tr><td>2008</td><td>0.790</td><td>0.869</td><td>0.859</td><td>1.000</td><td>0.900</td><td>0.796</td><td>0.867</td><td>1.000</td><td>0.888</td><td>0.874</td><td>0.877</td></tr><tr><td>2009</td><td>1.000</td><td>1.000</td><td>1.000</td><td>1.000</td><td>1.000</td><td>1.000</td><td>1.000</td><td>1.000</td><td>1.000</td><td>1.000</td><td>1.000</td></tr></tbody></table>

After data processing, I will establish a GRNN and carry on training and test. For great effect of smoothing factor on network function, it is necessary to try again for best value. Use matlab and its ANN toolbox newgrnn to program and calculate.

<figure><img src="image_3.png" /><figcaption>Picture 2 The error of closing into the net</figcaption></figure>
<figure><img src="image_4.png" /><figcaption>Picture 3 The error of forecasting of the net</figcaption></figure>

Combine the two figures above and examine the result, we can find that smoothing factors closely decide the approximation performance of network sample, and express to be positive correlation. When smoothing factors is 0.1, the deviation will be small for not only approximation performance and forecast performance. As the addition of smoothing factor, the deviation will accordingly increase.

When smoothing factors is 0.1, the test output is:

$$ 
\begin{array}{l}
yc= \\
0.7702 \quad 0.7802 \\
0.7370 \quad 0.7570 \\
0.7599 \quad 0.7799
\end{array}
 $$

Deal with these data by Inverse normalization, and then inverte the Matrix, the result are as follows:

<table><caption>Table 2 The data between the true value and predicted value</caption><thead><tr><th rowspan="2">Year</th><th colspan="2">x(9)</th><th colspan="2">x(10)</th><th colspan="2">x(11)</th></tr><tr><th>True value</th><th>Predicted value</th><th>True value</th><th>Predicted value</th><th>True value</th><th>Predicted value</th></tr></thead><tbody><tr><td>2008</td><td>2972.20</td><td>2741.74</td><td>1458.85</td><td>1329.31</td><td>1346.21</td><td>1240.98</td></tr><tr><td>2009</td><td>3189.50</td><td>2761.22</td><td>1577.57</td><td>1348.18</td><td>1456.31</td><td>1258.40</td></tr></tbody></table>

Consequently, prediction error is more obvious, for the reason that the increasing degree between 2008 and 2009 is bigger, and these dates are far away from those training data, it is hard to reason. Besides, the number of the training sample is less, so the forecasting precision is not well. Taking into account these, the result of forecasting can be accepted.
# 3 Conclusion and analysis

Basis on the analysis of influencing factor and predict character of rural freight volume, this paper predict the rural freight volume through GRNN. The testing and analysis of prediction consequent prove that the GRNN is valid for predicting rural freight volume. The guiding ideology and calculate method also need to be perfected, though this paper provide a reference for the prediction of rural freight volume in a certain sense. The result consequentially plays instructing role in rural transport and rural economy.

# References

1. Wenbin Wang, Research on Agriculture Logistics System Evaluation and Optimization [D], Master's Degree Paper of Shandong Normal University, 2006.

2. Zhengxiang Yang. The use of GRNN in the area of transport prediction[J]. Technology and Economy in Areas of Communications,2008

3. Zhexue Ge. The theory of ANN and the realization by matlab R2007[M]. Publishing of Electronics Industry, 2007