朱晨飛 黃淑華 王懷聰 何杭松
摘 ?要: BP?AdaBoost算法結合BP神經網絡和AdaBoost算法二者的優點,在提高準確率的同時加快訓練速度。但傳統BP神經網絡在訓練時可能會出現陷入局部最優的問題,針對此缺陷,提出一種改進的BP?AdaBoost算法,先采用思維進化算法調整BP神經網絡的權值和閾值,再運用優化后的BP神經網絡構造多個優化的弱預測器,最后將AdaBoost多分類思想引入改進的BP?AdaBoost算法中,構造多個強預測器判斷決策輸出結果。將改進的BP?AdaBoost算法與小波神經網絡用于上證指數開盤指數的預測中,通過實驗對比分析,證明了算法的可行性與優越性。
關鍵詞: 神經網絡; BP?AdaBoost算法; 思維進化算法; 多分類; 上證指數預測; 強預測器
中圖分類號: TN711?34; TP183 ? ? ? ? ? ? ? ? ? ?文獻標識碼: A ? ? ? ? ? ? ? ? ? ? 文章編號: 1004?373X(2019)19?0064?04
Abstract: The BP?AdaBoost algorithm can combine the advantages of the BP neural network and AdaBoost algorithm to improve the accuracy and the training speed. However, the traditional BP neural network may be easy to fall into local optimum. Therefore, an improved BP?AdaBoost algorithm is proposed to solve this problem. In the algorithm, the mind evolutionary algorithm is adopted to adjust the weights and thresholds of BP neural network, the optimized BP neural network is used to build several optimized weak predictors, and then the multi?classification idea of AdaBoost algorithm is introduced into the improved BP?AdaBoost algorithm to construct multiple strong predictors to determine the output result. The improved BP?AdaBoost algorithm and wavelet neural network were used in the opening index prediction of Shanghai Composite Index. The feasibility and superiority of the improved BP?AdaBoost algorithm were proved by the comparison analysis.
Keywords: neural network; BP?AdaBoost algorithm; mind evolutionary algorithm; multi?classification; Shanghai Composite Index; strong predictor
人工神經網絡中,多層前饋BP(Back Propagation)神經網絡的應用最為廣泛,它利用誤差逆傳播算法進行訓練,可以任意精度逼近非線性函數,具有循環反復交替進行的學習過程和輸入信號順傳播、輸出誤差反向傳播的特點。迭代分類算法AdaBoost(Adapting Boosting)運用特定方式訓練弱分類器,通過弱分類器的誤差予以弱分類器不同權重,最后線性組合成一個強分類器輸出決策結果。BP?AdaBoost算法有效結合BP與AdaBoost算法二者優點 [1?2],可提高算法泛化能力,防止單個BP神經網絡訓練時準確率較低的問題,同時避免傳統AdaBoost分類速度會隨訓練樣本增加驟然變慢的問題。目前,很多學者將AdaBoost算法和BP神經網絡相結合并運用于不同領域,有效地解決了一些分類和回歸問題。文獻[3?4]將BP?AdaBoost算法進行改進后用于分類研究,通過對比實驗驗證了BP?AdaBoost算法具有更好的泛化能力,并通過改進算法進一步提高分類的準確率和實效性。文獻[5]將BP?AdaBoost算法用于預測研究,并通過實驗驗證了在建筑能耗預測中BP?AdaBoost算法的預測精度優于GA?BP和傳統的BP神經網絡。
本文通過引入思維進化算法調整神經網絡的初始權值、閾值,克服BP神經網絡易陷于局部最小的問題,從而構造優化弱預測器,然后根據AdaBoost算法中的多分類思想構造多個優化后的強預測器,提高BP?AdaBoost算法的泛化性能和預測精度。


3.2 ?仿真實驗分析
本文分別用MEA?BP?AdaBoost算法和對非線性與時變性數據具有很好預測效果的小波神經網絡[11]對受諸多復雜因素影響、具有非線性的上證指數開盤指數進行預測。
在對函數[y=x21+x22]進行預測時,由計算機隨機生成的數據集離散度較小、分布較均勻。樣本范圍如表2所示。由表2可知,搜集的真實上證指數特征數據集中最大值和最小值相差較大,但本文提出的優化算法也能對其進行較為精準的預測,體現了該算法較好的泛化能力。小波算法和本文優化算法擬合情況如圖4所示,小波算法和本文優化算法精度對比如表3所示。

通過圖4和表3可知,小波神經網絡對大部分測試樣本預測誤差相對較大,而本文優化算法預測結果與真實值偏離程度較低,對實際上證指數值的總體擬合程度要優于小波神經網絡,并且其誤差精度指標均比小波神經網絡小,尤其在均方誤差中較為明顯,表明其具有更好的預測準確性。因此在對上證指數開盤指數的預測中,改進算法MEA?BP?AdaBoost改善了BP神經網絡缺陷,提高了BP?AdaBoost算法的預測精度,具有更好的泛化能力和穩定性。
本文提出MEA?BP?AdaBoost算法,引入思維進化法來調整BP的初始權值和閾值,然后將其構造成多個改進的弱預測器,并按照AdaBoost算法規則組合構成強預測器,避免了普通進化算法收斂速度較慢且易早熟的問題,有效改善了BP神經網絡自身的缺陷,提高了全局搜索能力。同時,將AdaBoost算法進行多分類時的思想引入改進算法,構建多個并行處理的強預測器,在不增加時間開銷的前提下,進一步提升算法預測精度,使改進算法在預測中具有很好的泛化性能和穩定性。通過將其應用于上證指數的開盤指數預測中,并與小波神經網絡預測結果進行對比,改進的BP?AdaBoost算法預測更精準,預測結果更接近真實值,從宏觀的角度為觀測股市態勢提供更加有效的信息。
參考文獻
[1] LI N, CHENG X, ZHANG S, et al. Recognizing human actions by BP?AdaBoost algorithm under a hierarchical recognition framework [C]// IEEE International Conference on Acoustics, Speech and Signal Processing. [S. l.]: IEEE, 2013: 3407?3411.
[2] LI H, CHEN Q, ZHAO J, et al. Nondestructive detection of total volatile basic nitrogen (TVB?N) content in pork meat by integrating hyperspectral imaging and colorimetric sensor combined with a nonlinear data fusion [J]. LWT ? food science and technology, 2015, 63(1): 268?274.
[3] 呂雁飛,侯子驕,張凱.多分類BP?AdaBoost算法研究與應用[J].高技術通訊,2015,25(5):437?444.
L? Yanfei, HOU Zijiao, ZHANG Kai. Study of multi?class BP?AdaBoost and its application [J]. Chinese high technology letters, 2015, 25(5): 437?444.
[4] 李蓓,張興敢,方暉.一種改進的BP?AdaBoost算法及在雷達多目標分類上的應用[J].南京大學學報(自然科學版),2017,53(5):984?989.
LI Bei, ZHANG Xinggan, FANG Hui. An improved algorithm of BP?AdaBoost and application of radar multi?target classification [J]. Journal of ?Nanjing University (Natural science), 2017, 53(5): 984?989.
[5] 方濤濤,馬小軍,陳沖.基于BP?AdaBoost算法的建筑能耗預測研究[J].科技通報,2017,33(7):162?166.
FANG Taotao, MA Xiaojun, CHEN Chong. Prediction for building energy consumption based on BP?AdaBoost algorithm [J]. Bulletin of science and technology, 2017, 33(7): 162?166.
[6] 王小川.Matlab神經網絡43個案例分析[M].北京:北京航空航天大學出版社,2013.
WANG Xiaochuan. 43case analysis of neural network in Matlab [M]. Beijing: Beijing University Press, 2013.
[7] CHEN S, WU Z C, L? H. Application of neural network optimized by mind evolutionary computation in building energy prediction [J]. IOP conference series: materials science and engineering, 2018, 322: 062006.
[8] 朱毅,莫勇.MEA?BP神經網絡在大壩變形預測應用[J].北京測繪,2017(3):75?78.
ZHU Yi, MO Yong. Application of MEA?BP neural network in dam deformation prediction [J]. Beijing surveying and mapping, 2017(3): 75?78.
[9] LIU H, TIAN H, LIANG X, et al. New wind speed forecasting approaches using fast ensemble empirical model decomposition, genetic algorithm, Mind Evolutionary Algorithm and Artificial Neural Networks [J]. Renewable energy, 2015, 83: 1066?1075.
[10] 劉浩然,趙翠香,李軒,等.一種基于改進遺傳算法的神經網絡優化算法研究[J].儀器儀表學報,2016,37(7):1573?1580.
LIU Haoran, ZHAO Cuixiang, LI Xuan, et al. Study on a neural network optimization algorithm based on improved genetic algorithm [J]. Chinese journal of scientific instrument, 2016, 37(7): 1573?1580.
[11] 郝杰.基于改進小波神經網絡的上證指數預測研究[D].廣州:華南理工大學,2014.
HAO Jie. Research on Shanghai Composite index prediction ?based on improved wavelet neural network [D]. Guangzhou: South China University of Technology, 2014.