吳亞榕 王歡 李鍵紅
摘 要:針對極限學(xué)習(xí)機(jī)參數(shù)優(yōu)化問題,提出量子遺傳算法優(yōu)化極限學(xué)習(xí)機(jī)的方法(QGA-ELM)。在該方法中,對ELM的輸入權(quán)值和隱含層閾值采用量子比特編碼,并將其映射為QGA的染色體,QGA的適應(yīng)度函數(shù)為對應(yīng)ELM的分類精度;通過QGA的量子旋轉(zhuǎn)門優(yōu)化出輸入權(quán)值與隱含層閾值,以此訓(xùn)練出分類精度更高的ELM,從而改善ELM的泛化性能。通過ELM和QGA-ELM對數(shù)據(jù)集的仿真結(jié)果對比表明,QGA-ELM有效地提升了ELM網(wǎng)絡(luò)的分類精度。
關(guān)鍵詞:極限學(xué)習(xí)機(jī);量子遺傳算法;量子旋轉(zhuǎn)門;分類精度
DOI:10. 11907/rjdk. 191561
中圖分類號:TP301
文獻(xiàn)標(biāo)識碼:A文章編號:1672-7800(2019)006-0010-04
Abstract: In order to optimize the parameters of traditional extreme learning machine (ELM), a new ELM optimized by quantum genetic algorithm (QGA-ELM) was proposed. In this method, the input weights and hidden layer threshold vectors of the ELM were encoded by quantum bits and mapped to chromosomes of QGA, and the fitness function of QGA is the classification accuracy of the corresponding ELM. The input weights and hidden layer threshold vectors optimized by quantum rotation gate were used to train the ELM with higher classification accuracy, thereby improving the generalization performance of ELM. Comparing the simulation results of QGA-ELM and ELM, we draw the conclusion that QGA can effectively improve the classification accuracy of ELM network.
Key Words:extreme learning machine;quantum genetic algorithm;quantum rotation gate;classification accuracy
0 引言
數(shù)據(jù)分類是當(dāng)今高新技術(shù)領(lǐng)域最重要的研究熱點(diǎn)之一,其利用某些特征,對一組對象進(jìn)行判別或分類。數(shù)據(jù)分類所涉及的信息往往存在高維度、影響因素多、關(guān)系復(fù)雜等特征,單靠人的思維往往難以有效地確定其規(guī)律,需要通過一定的數(shù)學(xué)方法借助計(jì)算機(jī)完成。 如何從這些復(fù)雜數(shù)據(jù)信息中發(fā)現(xiàn)更多、更有價(jià)值的關(guān)聯(lián)信息,找到其內(nèi)在規(guī)律,建立的模型能更好地反映研究對象的實(shí)際特征,容易與先驗(yàn)知識相融合,并能適應(yīng)大規(guī)模數(shù)據(jù)處理要求,正逐漸成為當(dāng)前數(shù)據(jù)分類的焦點(diǎn)。近年來,很多學(xué)者將基于神經(jīng)網(wǎng)絡(luò)的算法應(yīng)用于數(shù)據(jù)分類研究中,例如,BP神經(jīng)網(wǎng)絡(luò)、離散HOPFIELD網(wǎng)絡(luò)、支持向量機(jī)、自組織網(wǎng)絡(luò)、模糊神經(jīng)網(wǎng)絡(luò)和廣義神經(jīng)網(wǎng)絡(luò)等[1-8],取得了很多成果。由于神經(jīng)網(wǎng)絡(luò)大多采用梯度下降方法,往往存在訓(xùn)練速度慢、容易陷入局部極小值、學(xué)習(xí)率敏感性等不足,因此,探索一種訓(xùn)練速度快,能夠獲得準(zhǔn)確的最優(yōu)解且具有良好泛化性能的訓(xùn)練算法是提升神經(jīng)網(wǎng)絡(luò)性能的主要目標(biāo)。
極限學(xué)習(xí)機(jī)是一種訓(xùn)練神經(jīng)網(wǎng)絡(luò)的有效方法,具有學(xué)習(xí)速度快、泛化性能好等優(yōu)點(diǎn)[9-11]。該方法通過對單隱含層前饋網(wǎng)絡(luò)的輸入權(quán)值和隱含層節(jié)點(diǎn)的閾值隨機(jī)賦值,用最小二乘法求解輸出權(quán)值矩陣,極大提高了網(wǎng)絡(luò)訓(xùn)練速度和泛化能力。但是隨機(jī)產(chǎn)生的網(wǎng)絡(luò)輸入權(quán)值和隱含層節(jié)點(diǎn)閾值等參數(shù)不能保證訓(xùn)練出的ELM模型達(dá)到最優(yōu),從而影響模式識別精度。量子遺傳算法(Quantum Genetic Algorithm)是一種基于量子計(jì)算原理與傳統(tǒng)遺傳算法[12-13]相結(jié)合的概率優(yōu)化方法,它采用量子比特的概率幅表示方法對染色體進(jìn)行編碼,并利用量子邏輯門對染色體進(jìn)行更新,表現(xiàn)出優(yōu)于傳統(tǒng)遺傳算法的搜索性能[14-18]。
為了提高ELM模型的模式識別精度,本文提出了一種基于量子遺傳算法優(yōu)化的極限學(xué)習(xí)機(jī)算法。其主要創(chuàng)新點(diǎn)可以表述為:通過在極限學(xué)習(xí)機(jī)中引入遺傳算法進(jìn)行優(yōu)化,把經(jīng)量子遺傳算法優(yōu)化ELM輸入權(quán)值的問題,轉(zhuǎn)化成量子遺傳算法選擇最優(yōu)染色體的過程。將QGA-ELM和ELM運(yùn)用到數(shù)據(jù)分類上進(jìn)行仿真實(shí)驗(yàn),結(jié)果表明QGA-ELM算法的分類精度和泛化能力均遠(yuǎn)高于傳統(tǒng)的ELM算法,驗(yàn)證了QGA-ELM算法的有效性。
1 極限學(xué)習(xí)機(jī)
典型的單隱含層前饋神經(jīng)網(wǎng)絡(luò)如圖1所示,由輸入層、隱含層和輸出層組成,輸入層與隱含層、隱含層與輸出層神經(jīng)元間全連接。
3.3 染色體選擇
計(jì)算出每個(gè)染色體的適應(yīng)度后,對種群中每個(gè)染色體進(jìn)行量子旋轉(zhuǎn)門操作,形成新一代染色體種群。當(dāng)染色體進(jìn)化到事先設(shè)定的最大迭代次數(shù)時(shí),選出種群中最優(yōu)染色體作為優(yōu)化后ELM的輸入權(quán)值和隱含層閾值。
4 實(shí)驗(yàn)及結(jié)果分析
4.1 實(shí)驗(yàn)數(shù)據(jù)描述
為了對QGA-ELM算法的泛化能力和分類性能進(jìn)行評估,采用4個(gè)分類數(shù)據(jù)集進(jìn)行實(shí)驗(yàn)。數(shù)據(jù)集皆取自UCI(Machine Learning Repository)。表1描述了4個(gè)數(shù)據(jù)集的基本信息,這4個(gè)數(shù)據(jù)集的特征數(shù)與類別數(shù)的組合具有比較典型的特征。Iris數(shù)據(jù)集的特征數(shù)與類別數(shù)取值都比較小;Wine數(shù)據(jù)集的特征數(shù)明顯高于類別數(shù);Breast Cancer數(shù)據(jù)集是典型的二值分類數(shù)據(jù)集;Wine Quality數(shù)據(jù)集的特征數(shù)與類別數(shù)取值都比較大。
4.2 實(shí)驗(yàn)參數(shù)設(shè)置
算法參數(shù)設(shè)置:種群數(shù)SP為40,最大迭代次數(shù)MAXGEN為100,變量比特長度CL為20,隱含層神經(jīng)元數(shù)目HIDN為數(shù)據(jù)集樣本總量SN的50%,訓(xùn)練集的樣本數(shù)PN為數(shù)據(jù)集樣本總量SN的70%,測試集的樣本數(shù)TN為數(shù)據(jù)集樣本總量SN的30%。
4.3 實(shí)驗(yàn)結(jié)果分析
針對數(shù)據(jù)分類問題,最重要的算法性能評價(jià)指標(biāo)是分類精度。表2給出了ELM和QGA-ELM兩種算法在4個(gè)數(shù)據(jù)集上的實(shí)驗(yàn)結(jié)果。從表2中顯示的結(jié)果可以看出,通過QGA對ELM輸入權(quán)值和隱含層閾值的優(yōu)化,QGA-ELM算法的分類精度要高于ELM。
根據(jù)數(shù)據(jù)集各自所具有的不同特征,ELM可被優(yōu)化的空間也各有不同。QGA-ELM在各數(shù)據(jù)集上的分類精度優(yōu)化曲線如圖2所示。在數(shù)據(jù)特征數(shù)和類別數(shù)較小的數(shù)據(jù)集(例如Iris)中,ELM自身的分類性能已經(jīng)很好,可被優(yōu)化的空間不大,QGA-ELM的分類性能較ELM的提升并不明顯。在數(shù)據(jù)特征數(shù)和數(shù)據(jù)類別數(shù)相差較大的數(shù)據(jù)集中,尤其是特征數(shù)明顯多于類別數(shù)的數(shù)據(jù)集(例如Wine和Breast Cancer),QGA-ELM的分類精度較ELM有較大提升。在隱含層神經(jīng)元數(shù)保持不變的情況下,通過QGA算法的不斷優(yōu)化,可以找到一組輸入權(quán)值和閾值初始化一個(gè)分類精度較高的ELM。值得一提的是,對于二值分類問題,ELM本身已經(jīng)具有較好的分類性能,通過QGA的優(yōu)化,可以使其分類性能得到進(jìn)一步提升。 針對特征數(shù)與分類數(shù)取值都較大的數(shù)據(jù)集(例如Wine Quality),由于類別多,樣本類別間的界限比較模糊,容易導(dǎo)致ELM分類精度不高,誤差較大。從表2測試精度的對比結(jié)果可知,ELM在數(shù)據(jù)集Wine Quality上的分類精度較差,經(jīng)過QGA的優(yōu)化后,結(jié)果依然不夠理想。
由于ELM的分類性能受隱含層神經(jīng)元個(gè)數(shù)影響很大,不同的神經(jīng)元個(gè)數(shù)取值會導(dǎo)致ELM分類精度的極大差異。以數(shù)據(jù)集Wine為例,圖3給出隱含層神經(jīng)元個(gè)數(shù)取值分別為樣本總量的25%、50%、75%和100%時(shí),分類精度隨進(jìn)化次數(shù)遞增而變化的曲線,R為隱含層神經(jīng)元個(gè)數(shù)HIDN與數(shù)據(jù)集樣本總量SN的比值。如圖3所示,在算法初始階段,分類精度會隨著神經(jīng)元個(gè)數(shù)的增加逐次遞增,神經(jīng)元個(gè)數(shù)多會伴隨高分類精度出現(xiàn)。而在進(jìn)化代數(shù)超過20后,R取值為50%的QGA-GLM的分類精度均高于其它QGA- GLM,并在較高的分類精度上繼續(xù)優(yōu)化。由此可見,并不是隱含層神經(jīng)元個(gè)數(shù)越多,就必然導(dǎo)致分類精度越高。
5 結(jié)語
常規(guī)ELM算法在進(jìn)行數(shù)據(jù)分類問題時(shí),由于其初始參數(shù)隨機(jī)設(shè)定,從而影響ELM的泛化性能和分類精度。針對上述不足,本文提出了一種基于QGA算法優(yōu)化ELM輸入權(quán)值和閾值的QGA-ELM算法。在算法尋優(yōu)過程中,采用改進(jìn)的量子旋轉(zhuǎn)角策略,提高了搜索效率和參數(shù)選擇的多樣性,使其分類精度得到有效提升。用4個(gè)典型的數(shù)據(jù)集進(jìn)行測試,結(jié)果表明,在隱含層神經(jīng)元個(gè)數(shù)選擇合適的情況下,QGA-ELM對分類性能的優(yōu)化非常明顯。同時(shí),針對不同數(shù)據(jù)集所具有的各自特征,QGA-ELM對分類性能優(yōu)化的程度也不盡相同。針對數(shù)據(jù)集自身特征與ELM隱含層神經(jīng)元個(gè)數(shù)之間復(fù)雜的關(guān)聯(lián)關(guān)系,仍有待進(jìn)一步研究。
參考文獻(xiàn):
[1] HUANG W,OH S K,PEDRYCZ W. Hybrid fuzzy wavelet neural networks architecture based on polynomial neural networks and fuzzy set/relation inference-based wavelet neurons[J]. IEEE Transactions on Neural Networks and Learning Systems,2017(1):1-11.
[2] CHUN L Y,SONG H,YANY J. Research on music classification based on MFCC and BP neural network[J]. ICIEAC-14,2014,215(s1-2):57-68.
[3] WANG J, POLYTECHNIC S. Research on computer network security classification based on discrete Hopfield network[J]. Journal of Anhui Vocational College of Electronics & Information Technology,2018.
[4] HAO P Y,CHIANG J H,TU Y K. Hierarchically SVM classification based on support vector clustering method and its application to document categorization[J]. Expert Systems with Applications,2007,33(3):627-635.
[5] ROUSSINOV D G. A scalable self-organizing map algorithm for textual classification: a neural network approach to thesaurus generation[J]. Communication Cognition&Artificial Intelligence Spring,1998(15):81-112.
[6] OZBAY Y,CEYLAN R,KARLIK B. A fuzzy clustering neural network architecture for classification of ECG arrhythmias[J]. Computers in Biology & Medicine,2006,36(4):376-388.
[7] WORKINEH A,DUGDA M,HOMAIFAR A,et al. GMDH and RBFGRNN networks for multi-class data classification[J]. International Journal of Applied Mathematics,2015,25(4):955-960.
[8] HAYKIN S. 神經(jīng)網(wǎng)絡(luò)與機(jī)器學(xué)習(xí)[M]. 北京:機(jī)械工業(yè)出版社,2011.
[9] HUANG G B,ZHU Q Y,SIEW C K. Extreme learning machine: theory and applications[J]. Neurocomputing,2006,70(1/3):489-501.
[10] HUANG G B,DING X J,ZHOU H M. Extreme learning for regression and multiclass classification[J]. IEEE Transactions on Systems Man and Cybernetics-Part B: Cybernetics,2012(2):513-529.
[11] SAVITHA R,SURESH S,SUNDARARAJAN N. Fast learning Circular Complex-valued Extreme Learning Machine (CC-ELM) for real-valued classification problems[M]. Elsevier Science Inc.,2012.
[12] VANLI N D,SAYIN M O,DELIBALTA I,et al. Sequential nonlinear learning for distributed multiagent systems via extreme learning machines[J]. IEEE Transactions on Neural Networks and Learning Systems,2016(2):1-13.
[13] GOLDBERG D E. Genetic algorithms in search,optimization and machine learning[M]. New York:Addison-Wesley,1989.
[14] ZHU X,XIONG J. Fault diagnosis of rotation machinery based on support vector machine optimized by quantum genetic algorithm[J]. IEEE Access,2018:1.
[15] 曲志堅(jiān),陳宇航,李盤靖,等. 基于多算子協(xié)同進(jìn)化的自適應(yīng)并行量子遺傳算法[J]. 電子學(xué)報(bào),2019,47(2):266-273.
[16] HAN K H,KIM J H. Genetic quantum algorithm and its application to combinatorial optimization problem[C]. Proc Int Congress Evol Comput. IEEE Press,2000:1354-1360.
[17] HAN K H, KIM J H. Quantum-inspired evolutionary algorithm for a class of combinatorial optimization[J]. IEEE Trans Evol Comput,2002,6(6):580-593.
[18] ZHANG Z F. Novel improved quantum genetic algorithm[J]. Comput Eng,2010,36(6):181-183.
[19] WEI Z,YE S. An improved quantum genetic algorithm and performance analysis[C]. Proc. of the 30th Chin Control Conf. ,2011:5368-5371.
[20] 蔣璐,張軒雄. 基于自適應(yīng)差分遺傳算法的BP神經(jīng)網(wǎng)絡(luò)優(yōu)化[J]. 軟件導(dǎo)刊,2018,17(11):30-33.
[21] YANG J A,ZHANG Z Q. Research of quantum genetic algorithm and its application in blind source separation[J]. Chin J Electron,2003,20(1):62-68.
[22] WEI Z,YE S. An improved quantum genetic algorithm and performance analysis[C]. Proc. of the 30th Chin Control Conf.,2011:5368-5371.
(責(zé)任編輯:孫 娟)