﻿ 基于正则化GRU模型的洪水预测
 计算机系统应用  2019, Vol. 28 Issue (5): 196-201 PDF

Flood Forecast Based on Regularized GRU Model
DUAN Sheng-Yue, WANG Chang-Kun, ZHANG Liu-Yan
School of Information Engineering, Nanchang Hangkong University, Nanchang 330063, China
Foundation item: National Natural Science Foundation of China (61866028, 61741312)
Abstract: Aiming at the problems of low accuracy and over-fitting of traditional neural network model in flood forecasting process, this study takes the monthly average water level of Waizhou Hydrological Station in Ganjiang River Basin as the research object, and proposes a flood forecasting model based on regularized GRU neural network to improve the accuracy of flood forecasting. Relu function is selected as the output layer activation function of the whole neural network. To improve the generalization performance of GRU model, regularization of elastic network is introduced into GRU model, and regularizes the input weights in the network. The model is applied to the fitting and prediction of the monthly average water level at Waizhou Hydrological Station, and the experimental comparison shows that the model optimized by regularization of elastic network has a higher fitting degree, the qualified rate is increased by 9.3%, and the calculated root mean square error is small.
Key words: time series     GRU     ElasticNet normalization     flood forecast     water level

1 GRU模型简介

 图 1 GRU神经网络结构示意图[5]

GRU中各个门的表达式如下:

GRU更新门表达式:

 ${Z_t} = s\left( {{W_z} \bullet \left[ {{h_{t - 1}},{x_t}} \right]} \right)$ (1)

GRU重置门表达式:

 ${r_t} = s\left( {{W_r} \bullet \left[ {{h_{t - 1}},{x_t}} \right]} \right)$ (2)

GRU输出部分表达式:

 ${\tilde h_t} = \tanh \left( {{W_k} \bullet \left[ {{r_t} * {h_{t - 1}},{x_t}} \right]} \right)$ (3)
 ${h_t} = \left( {1 - {z_t}} \right) * {h_{t - 1}} + {z_t} * {\tilde h_t}$ (4)
 ${y_t} = s\left( {{W_0} \cdot {h_t}} \right)$ (5)

2 改进GRU模型 2.1 正则化技术

 $\min \left\{ {\sum\limits_{t = 1}^T {l\left( {{y_t},f\left( {{x_t},w} \right)} \right) + \sum\limits_{i = 1}^m {{\lambda _i}{\rho _i}} } } \right\}$ (6)

 $\mathop {\min }\limits_w \left\{ {\frac{1}{T}{{\sum\limits_{t = 1}^T {\sum\limits_{j = 1}^m {\left( {{y_{ti}} - {{\bar y}_{ti}}} \right)} } }^2} + {\lambda _1}{\rm{||}}{{\rm{w}}_1}|| + {\lambda _2}{\rm{||}}{{\rm{w}}_2}|{|^2}} \right\}$ (7)

2.2 正则化GRU模型的洪水预测步骤

 ${x^ * } = \frac{{x - \min }}{{\max - \min }}$ (8)

 $X = \{ {X_1},{X_2},\cdots,X_L^{}\}$ (9)
 ${X_p}{\rm{ = }}\left\{ {{f_p},{f_{p + 1}},\cdots,{f_{m - L + p - 1}}} \right\}$ (10)

 ${\rm{y = }}W \cdot x + b$ (11)

X经过隐藏层后的输出可表示为:

 $Y{\rm{ = }}\left\{ {{Y_1},{Y_2},\cdots,{Y_L}} \right\}$ (12)
 ${Y_p}{\rm{ = }}\left\{ {{f_{p + 1}},{f_{p + 2}},\cdots,{f_{m - L + p}}} \right\}$ (13)

 $loss = \frac{1}{n}\sum\limits_{t = 1}^n {{{({y_i} - {y_{real}})}^2}}$ (14)

 $P_f^{} = \{ {p_{m - L + 1}},{p_{m - L + 2}},\cdots,{p_m}\}$ (15)

${P_f}$ 输入隐藏层后, 输出结果表示为:

 ${Y_f}{\rm{ = }}\{ {y_{m - L + 2}},{y_{m - L + 3}},\cdots,{y_{m + 1}}\}$ (16)

m+1时刻的预测值为 ${y_{m + 1}}$ , 然后将 ${P_f}$ 后的数据与 ${y_{m + 1}}$ 合并成新的一行数据:

 $P_{f + 1}^{}{\rm{ = }}\{ {p_{m - L + {\rm{2}}}},{p_{m - L + {\rm{3}}}},\cdots,{y_{m + 1}}\}$ (17)

${P_{f + 1}}$ 输入隐藏层, 则m+2时刻的预测值为 ${y_{m + 2}}$ , 以此类推, 得到的预测序列为:

 ${Y_0} = \{ {y_{m + 1,}},{y_{m + 2}}, \cdots ,{y_n}\}$ (18)

3 实验与分析 3.1 实验设置

3.2 实验性能评价指标

 ${\rm{QR}} = \frac{n}{m} \times 100\%$ (19)

 $RMSE = \sqrt {\frac{{\sum\limits_{t = 1}^T {{{(\bar y_c^t - y_c^t)}^2}} }}{T}}$ (20)
3.3 实验结果分析

 图 2 GRU模型预测结果图( ${\lambda _1}$ =0, ${\lambda _2}$ =0)

 图 3 ${L_1}$ 正则化网络预测结果图( ${\lambda _1}$ =0.02, ${\lambda _2}$ =0)

 图 4 ${L_2}$ 正则化网络预测结果图( ${\lambda _1}$ =0, ${\lambda _2}$ =0.004)

 图 5 弹性网正则化网络预测结果图( ${\lambda _1}$ =0.0043, ${\lambda _2}$ =0.38)

4 结论

 [1] 范睿. 基于遗传算法的神经网络洪水预报研究与应用[硕士学位论文]. 哈尔滨: 哈尔滨工程大学, 2005. [2] Lippmann RP. An introduction to computing with neural nets. ACM SIGARCH Computer Architecture News, 1988, 16(1): 7-25. DOI:10.1145/44571 [3] 李晓丽, 周小健, 沈钢纲, 等. 不确定支持向量机在洪水预测模型中的应用. 兰州理工大学学报, 2012, 38(3): 107-110. DOI:10.3969/j.issn.1673-5196.2012.03.025 [4] 梁存峰. 基于混沌Volterra自适应模型的洪水预测研究. 水资源与水工程学报, 2011, 22(1): 146-150. [5] 金保明. BP神经网络在闽江十里庵流量预测中的应用. 水电能源科学, 2010, 28(9): 12-14. DOI:10.3969/j.issn.1000-7709.2010.09.004 [6] 何勇, 李妍琰. 改进粒子群优化 BP 神经网络的洪水智能预测模型研究. 西南师范大学学报(自然科学版), 2014, 39(5): 75-80. [7] 叶小舟, 陶飞飞, 戚荣志, 等. 循环神经网络结构中激活函数的改进. 计算机与现代化, 2016(12): 29-33. DOI:10.3969/j.issn.1006-2475.2016.12.006 [8] Semeniuta S, Severyn A, Barth E. Recurrent dropout without memory loss. arXiv preprint arXiv:1603.05118, 2016. [9] 刘洋. 基于GRU神经网络的时间序列预测研究[硕士学位论文]. 成都: 成都理工大学, 2017. [10] 张玉环, 钱江. 基于两种LSTM结构的文本情感分析. 软件, 2018, 39(1): 116-120. DOI:10.3969/j.issn.1003-6970.2018.01.023 [11] 王鑫, 吴际, 刘超, 等. 基于LSTM循环神经网络的故障时间序列预测. 北京航空航天大学学报, 2018, 44(4): 772-784. [12] 刘建伟, 崔立鹏, 刘泽宇, 等. 正则化稀疏模型. 计算机学报, 2015, 38(7): 1307-1325. [13] 崔东文. 多隐层BP神经网络模型在径流预测中的应用. 水文, 2013, 33(1): 68-73. DOI:10.3969/j.issn.1000-0852.2013.01.013 [14] 丁海蛟. 基于LS-SVM的河道洪水预报研究[硕士学位论文]. 昆明: 昆明理工大学, 2016. [15] 孙卫刚, 王正勇. 克尔古提水文站站月水量预报方案的编制. 大科技·科技天地, 2010. [16] 朱星明, 卢长娜, 王如云, 等. 基于人工神经网络的洪水水位预报模型. 水利学报, 2005, 36(7): 806-811. DOI:10.3321/j.issn:0559-9350.2005.07.007 [17] 中华人民共和国水利部. SL 250–2000 水文情报预报规范. 北京: 中国水利水电出版社, 2001.