朱晨飛 黃淑華 王懷聰 何杭松
摘 ?要: BP?AdaBoost算法結(jié)合BP神經(jīng)網(wǎng)絡(luò)和AdaBoost算法二者的優(yōu)點,在提高準(zhǔn)確率的同時加快訓(xùn)練速度。但傳統(tǒng)BP神經(jīng)網(wǎng)絡(luò)在訓(xùn)練時可能會出現(xiàn)陷入局部最優(yōu)的問題,針對此缺陷,提出一種改進(jìn)的BP?AdaBoost算法,先采用思維進(jìn)化算法調(diào)整BP神經(jīng)網(wǎng)絡(luò)的權(quán)值和閾值,再運用優(yōu)化后的BP神經(jīng)網(wǎng)絡(luò)構(gòu)造多個優(yōu)化的弱預(yù)測器,最后將AdaBoost多分類思想引入改進(jìn)的BP?AdaBoost算法中,構(gòu)造多個強(qiáng)預(yù)測器判斷決策輸出結(jié)果。將改進(jìn)的BP?AdaBoost算法與小波神經(jīng)網(wǎng)絡(luò)用于上證指數(shù)開盤指數(shù)的預(yù)測中,通過實驗對比分析,證明了算法的可行性與優(yōu)越性。
關(guān)鍵詞: 神經(jīng)網(wǎng)絡(luò); BP?AdaBoost算法; 思維進(jìn)化算法; 多分類; 上證指數(shù)預(yù)測; 強(qiáng)預(yù)測器
中圖分類號: TN711?34; TP183 ? ? ? ? ? ? ? ? ? ?文獻(xiàn)標(biāo)識碼: 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
人工神經(jīng)網(wǎng)絡(luò)中,多層前饋BP(Back Propagation)神經(jīng)網(wǎng)絡(luò)的應(yīng)用最為廣泛,它利用誤差逆?zhèn)鞑ニ惴ㄟM(jìn)行訓(xùn)練,可以任意精度逼近非線性函數(shù),具有循環(huán)反復(fù)交替進(jìn)行的學(xué)習(xí)過程和輸入信號順傳播、輸出誤差反向傳播的特點。迭代分類算法AdaBoost(Adapting Boosting)運用特定方式訓(xùn)練弱分類器,通過弱分類器的誤差予以弱分類器不同權(quán)重,最后線性組合成一個強(qiáng)分類器輸出決策結(jié)果。BP?AdaBoost算法有效結(jié)合BP與AdaBoost算法二者優(yōu)點 [1?2],可提高算法泛化能力,防止單個BP神經(jīng)網(wǎng)絡(luò)訓(xùn)練時準(zhǔn)確率較低的問題,同時避免傳統(tǒng)AdaBoost分類速度會隨訓(xùn)練樣本增加驟然變慢的問題。目前,很多學(xué)者將AdaBoost算法和BP神經(jīng)網(wǎng)絡(luò)相結(jié)合并運用于不同領(lǐng)域,有效地解決了一些分類和回歸問題。文獻(xiàn)[3?4]將BP?AdaBoost算法進(jìn)行改進(jìn)后用于分類研究,通過對比實驗驗證了BP?AdaBoost算法具有更好的泛化能力,并通過改進(jìn)算法進(jìn)一步提高分類的準(zhǔn)確率和實效性。文獻(xiàn)[5]將BP?AdaBoost算法用于預(yù)測研究,并通過實驗驗證了在建筑能耗預(yù)測中BP?AdaBoost算法的預(yù)測精度優(yōu)于GA?BP和傳統(tǒng)的BP神經(jīng)網(wǎng)絡(luò)。
本文通過引入思維進(jìn)化算法調(diào)整神經(jīng)網(wǎng)絡(luò)的初始權(quán)值、閾值,克服BP神經(jīng)網(wǎng)絡(luò)易陷于局部最小的問題,從而構(gòu)造優(yōu)化弱預(yù)測器,然后根據(jù)AdaBoost算法中的多分類思想構(gòu)造多個優(yōu)化后的強(qiáng)預(yù)測器,提高BP?AdaBoost算法的泛化性能和預(yù)測精度。
3.2 ?仿真實驗分析
本文分別用MEA?BP?AdaBoost算法和對非線性與時變性數(shù)據(jù)具有很好預(yù)測效果的小波神經(jīng)網(wǎng)絡(luò)[11]對受諸多復(fù)雜因素影響、具有非線性的上證指數(shù)開盤指數(shù)進(jìn)行預(yù)測。
在對函數(shù)[y=x21+x22]進(jìn)行預(yù)測時,由計算機(jī)隨機(jī)生成的數(shù)據(jù)集離散度較小、分布較均勻。樣本范圍如表2所示。由表2可知,搜集的真實上證指數(shù)特征數(shù)據(jù)集中最大值和最小值相差較大,但本文提出的優(yōu)化算法也能對其進(jìn)行較為精準(zhǔn)的預(yù)測,體現(xiàn)了該算法較好的泛化能力。小波算法和本文優(yōu)化算法擬合情況如圖4所示,小波算法和本文優(yōu)化算法精度對比如表3所示。
通過圖4和表3可知,小波神經(jīng)網(wǎng)絡(luò)對大部分測試樣本預(yù)測誤差相對較大,而本文優(yōu)化算法預(yù)測結(jié)果與真實值偏離程度較低,對實際上證指數(shù)值的總體擬合程度要優(yōu)于小波神經(jīng)網(wǎng)絡(luò),并且其誤差精度指標(biāo)均比小波神經(jīng)網(wǎng)絡(luò)小,尤其在均方誤差中較為明顯,表明其具有更好的預(yù)測準(zhǔn)確性。因此在對上證指數(shù)開盤指數(shù)的預(yù)測中,改進(jìn)算法MEA?BP?AdaBoost改善了BP神經(jīng)網(wǎng)絡(luò)缺陷,提高了BP?AdaBoost算法的預(yù)測精度,具有更好的泛化能力和穩(wěn)定性。
本文提出MEA?BP?AdaBoost算法,引入思維進(jìn)化法來調(diào)整BP的初始權(quán)值和閾值,然后將其構(gòu)造成多個改進(jìn)的弱預(yù)測器,并按照AdaBoost算法規(guī)則組合構(gòu)成強(qiáng)預(yù)測器,避免了普通進(jìn)化算法收斂速度較慢且易早熟的問題,有效改善了BP神經(jīng)網(wǎng)絡(luò)自身的缺陷,提高了全局搜索能力。同時,將AdaBoost算法進(jìn)行多分類時的思想引入改進(jìn)算法,構(gòu)建多個并行處理的強(qiáng)預(yù)測器,在不增加時間開銷的前提下,進(jìn)一步提升算法預(yù)測精度,使改進(jìn)算法在預(yù)測中具有很好的泛化性能和穩(wěn)定性。通過將其應(yīng)用于上證指數(shù)的開盤指數(shù)預(yù)測中,并與小波神經(jīng)網(wǎng)絡(luò)預(yù)測結(jié)果進(jìn)行對比,改進(jìn)的BP?AdaBoost算法預(yù)測更精準(zhǔn),預(yù)測結(jié)果更接近真實值,從宏觀的角度為觀測股市態(tài)勢提供更加有效的信息。
參考文獻(xiàn)
[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算法研究與應(yīng)用[J].高技術(shù)通訊,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] 李蓓,張興敢,方暉.一種改進(jìn)的BP?AdaBoost算法及在雷達(dá)多目標(biāo)分類上的應(yīng)用[J].南京大學(xué)學(xué)報(自然科學(xué)版),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算法的建筑能耗預(yù)測研究[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神經(jīng)網(wǎng)絡(luò)43個案例分析[M].北京:北京航空航天大學(xué)出版社,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īng)網(wǎng)絡(luò)在大壩變形預(yù)測應(yīng)用[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ìn)遺傳算法的神經(jīng)網(wǎng)絡(luò)優(yōu)化算法研究[J].儀器儀表學(xué)報,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] 郝杰.基于改進(jìn)小波神經(jīng)網(wǎng)絡(luò)的上證指數(shù)預(yù)測研究[D].廣州:華南理工大學(xué),2014.
HAO Jie. Research on Shanghai Composite index prediction ?based on improved wavelet neural network [D]. Guangzhou: South China University of Technology, 2014.