⑴ BP演算法及其改進
傳統的BP演算法及其改進演算法的一個很大缺點是:由於其誤差目標函數對於待學習的連接權值來說非凸的,存在局部最小點,對網路進行訓練時,這些演算法的權值一旦落入權值空間的局部最小點就很難跳出,因而無法達到全局最小點(即最優點)而使得網路訓練失敗。針對這些缺陷,根據凸函數及其共軛的性質,利用Fenchel不等式,使用約束優化理論中的罰函數方法構造出了帶有懲罰項的新誤差目標函數。
用新的目標函數對前饋神經網路進行優化訓練時,隱層輸出也作為被優化變數。這個目標函數的主要特點有:
1.固定隱層輸出,該目標函數對連接權值來說是凸的;固定連接權值,對隱層輸出來說是凸的。這樣在對連接權值和隱層輸出進行交替優化時,它們所面對的目標函數都是凸函數,不存在局部最小的問題,演算法對於初始權值的敏感性降低;
2.由於懲罰因子是逐漸增大的,使得權值的搜索空間變得比較大,從而對於大規模的網路也能夠訓練,在一定程度上降低了訓練過程陷入局部最小的可能性。
這些特性能夠在很大程度上有效地克服以往前饋網路的訓練演算法易於陷入局部最小而使網路訓練失敗的重大缺陷,也為利用凸優化理論研究前饋神經網路的學習演算法開創了一個新思路。在網路訓練時,可以對連接權值和隱層輸出進行交替優化。把這種新演算法應用到前饋神經網路訓練學習中,在學習速度、泛化能力、網路訓練成功率等多方面均優於傳統訓練演算法,如經典的BP演算法。數值試驗也表明了這一新演算法的有效性。
本文通過典型的BP演算法與新演算法的比較,得到了二者之間相互關系的初步結論。從理論上證明了當懲罰因子趨於正無窮大時新演算法就是BP演算法,並且用數值試驗說明了懲罰因子在網路訓練演算法中的作用和意義。對於三層前饋神經網路來說,懲罰因子較小時,隱層神經元局部梯度的可變范圍大,有利於連接權值的更新;懲罰因子較大時,隱層神經元局部梯度的可變范圍小,不利於連接權值的更新,但能提高網路訓練精度。這說明了在網路訓練過程中懲罰因子為何從小到大變化的原因,也說明了新演算法的可行性而BP演算法則時有無法更新連接權值的重大缺陷。
礦體預測在礦床地質中佔有重要地位,由於輸入樣本量大,用以往前饋網路演算法進行礦體預測效果不佳。本文把前饋網路新演算法應用到礦體預測中,取得了良好的預期效果。
本文最後指出了新演算法的優點,並指出了有待改進的地方。
關鍵詞:前饋神經網路,凸優化理論,訓練演算法,礦體預測,應用
Feed forward Neural Networks Training Algorithm Based on Convex Optimization and Its Application in Deposit Forcasting
JIA Wen-chen (Computer Application)
Directed by YE Shi-wei
Abstract
The paper studies primarily the application of convex optimization theory and algorithm for feed forward neural networks』 training and convergence performance.
It reviews the history of feed forward neural networks, points out that the training of feed forward neural networks is essentially a non-linear problem and introces BP algorithm, its advantages as well as disadvantages and previous improvements for it. One of the big disadvantages of BP algorithm and its improvement algorithms is: because its error target function is non-convex in the weight values between neurons in different layers and exists local minimum point, thus, if the weight values enter local minimum point in weight values space when network is trained, it is difficult to skip local minimum point and reach the global minimum point (i.e. the most optimal point).If this happening, the training of networks will be unsuccessful. To overcome these essential disadvantages, the paper constructs a new error target function including restriction item according to convex function, Fenchel inequality in the conjugate of convex function and punishment function method in restriction optimization theory.
When feed forward neural networks based on the new target function is being trained, hidden layers』 outputs are seen as optimization variables. The main characteristics of the new target function are as follows:
1.With fixed hidden layers』 outputs, the new target function is convex in connecting weight variables; with fixed connecting weight values, the new target function is convex in hidden layers』 outputs. Thus, when connecting weight values and hidden layers』 outputs are optimized alternately, the new target function is convex in them, doesn』t exist local minimum point, and the algorithm』s sensitiveness is reced for original weight values .
2.Because the punishment factor is increased graally, weight values 』 searching space gets much bigger, so big networks can be trained and the possibility of entering local minimum point can be reced to a certain extent in network training process.
Using these characteristics can overcome efficiently in the former feed forward neural networks』 training algorithms the big disadvantage that networks training enters local minimum point easily. This creats a new idea for feed forward neural networks』 learning algorithms by using convex optimization theory .In networks training, connecting weight variables and hidden layer outputs can be optimized alternately. The new algorithm is much better than traditional algorithms for feed forward neural networks. The numerical experiments show that the new algorithm is successful.
By comparing the new algorithm with the traditional ones, a primary conclusion of their relationship is reached. It is proved theoretically that when the punishment factor nears infinity, the new algorithm is BP algorithm yet. The meaning and function of the punishment factor are also explained by numerical experiments. For three-layer feed forward neural networks, when the punishment factor is smaller, hidden layer outputs』 variable range is bigger and this is in favor to updating of the connecting weights values, when the punishment factor is bigger, hidden layer outputs』 variable range is smaller and this is not in favor to updating of the connecting weights values but it can improve precision of networks. This explains the reason that the punishment factor should be increased graally in networks training process. It also explains feasibility of the new algorithm and BP algorithm』s disadvantage that connecting weigh values can not be updated sometimes.
Deposit forecasting is very important in deposit geology. The previous algorithms』 effect is not good in deposit forecasting because of much more input samples. The paper applies the new algorithm to deposit forecasting and expectant result is reached.
The paper points out the new algorithm』s strongpoint as well as to-be-improved places in the end.
Keywords: feed forward neural networks, convex optimization theory, training algorithm, deposit forecasting, application
傳統的BP演算法及其改進演算法的一個很大缺點是:由於其誤差目標函數對於待學習的連接權值來說非凸的,存在局部最小點,對網路進行訓練時,這些演算法的權值一旦落入權值空間的局部最小點就很難跳出,因而無法達到全局最小點(即最優點)而使得網路訓練失敗。針對這些缺陷,根據凸函數及其共軛的性質,利用Fenchel不等式,使用約束優化理論中的罰函數方法構造出了帶有懲罰項的新誤差目標函數。
用新的目標函數對前饋神經網路進行優化訓練時,隱層輸出也作為被優化變數。這個目標函數的主要特點有:
1.固定隱層輸出,該目標函數對連接權值來說是凸的;固定連接權值,對隱層輸出來說是凸的。這樣在對連接權值和隱層輸出進行交替優化時,它們所面對的目標函數都是凸函數,不存在局部最小的問題,演算法對於初始權值的敏感性降低;
2.由於懲罰因子是逐漸增大的,使得權值的搜索空間變得比較大,從而對於大規模的網路也能夠訓練,在一定程度上降低了訓練過程陷入局部最小的可能性。
這些特性能夠在很大程度上有效地克服以往前饋網路的訓練演算法易於陷入局部最小而使網路訓練失敗的重大缺陷,也為利用凸優化理論研究前饋神經網路的學習演算法開創了一個新思路。在網路訓練時,可以對連接權值和隱層輸出進行交替優化。把這種新演算法應用到前饋神經網路訓練學習中,在學習速度、泛化能力、網路訓練成功率等多方面均優於傳統訓練演算法,如經典的BP演算法。數值試驗也表明了這一新演算法的有效性。
本文通過典型的BP演算法與新演算法的比較,得到了二者之間相互關系的初步結論。從理論上證明了當懲罰因子趨於正無窮大時新演算法就是BP演算法,並且用數值試驗說明了懲罰因子在網路訓練演算法中的作用和意義。對於三層前饋神經網路來說,懲罰因子較小時,隱層神經元局部梯度的可變范圍大,有利於連接權值的更新;懲罰因子較大時,隱層神經元局部梯度的可變范圍小,不利於連接權值的更新,但能提高網路訓練精度。這說明了在網路訓練過程中懲罰因子為何從小到大變化的原因,也說明了新演算法的可行性而BP演算法則時有無法更新連接權值的重大缺陷。
礦體預測在礦床地質中佔有重要地位,由於輸入樣本量大,用以往前饋網路演算法進行礦體預測效果不佳。本文把前饋網路新演算法應用到礦體預測中,取得了良好的預期效果。
本文最後指出了新演算法的優點,並指出了有待改進的地方。
關鍵詞:前饋神經網路,凸優化理論,訓練演算法,礦體預測,應用
Feed forward Neural Networks Training Algorithm Based on Convex Optimization and Its Application in Deposit Forcasting
JIA Wen-chen (Computer Application)
Directed by YE Shi-wei
Abstract
The paper studies primarily the application of convex optimization theory and algorithm for feed forward neural networks』 training and convergence performance.
It reviews the history of feed forward neural networks, points out that the training of feed forward neural networks is essentially a non-linear problem and introces BP algorithm, its advantages as well as disadvantages and previous improvements for it. One of the big disadvantages of BP algorithm and its improvement algorithms is: because its error target function is non-convex in the weight values between neurons in different layers and exists local minimum point, thus, if the weight values enter local minimum point in weight values space when network is trained, it is difficult to skip local minimum point and reach the global minimum point (i.e. the most optimal point).If this happening, the training of networks will be unsuccessful. To overcome these essential disadvantages, the paper constructs a new error target function including restriction item according to convex function, Fenchel inequality in the conjugate of convex function and punishment function method in restriction optimization theory.
When feed forward neural networks based on the new target function is being trained, hidden layers』 outputs are seen as optimization variables. The main characteristics of the new target function are as follows:
1.With fixed hidden layers』 outputs, the new target function is convex in connecting weight variables; with fixed connecting weight values, the new target function is convex in hidden layers』 outputs. Thus, when connecting weight values and hidden layers』 outputs are optimized alternately, the new target function is convex in them, doesn』t exist local minimum point, and the algorithm』s sensitiveness is reced for original weight values .
2.Because the punishment factor is increased graally, weight values 』 searching space gets much bigger, so big networks can be trained and the possibility of entering local minimum point can be reced to a certain extent in network training process.
Using these characteristics can overcome efficiently in the former feed forward neural networks』 training algorithms the big disadvantage that networks training enters local minimum point easily. This creats a new idea for feed forward neural networks』 learning algorithms by using convex optimization theory .In networks training, connecting weight variables and hidden layer outputs can be optimized alternately. The new algorithm is much better than traditional algorithms for feed forward neural networks. The numerical experiments show that the new algorithm is successful.
By comparing the new algorithm with the traditional ones, a primary conclusion of their relationship is reached. It is proved theoretically that when the punishment factor nears infinity, the new algorithm is BP algorithm yet. The meaning and function of the punishment factor are also explained by numerical experiments. For three-layer feed forward neural networks, when the punishment factor is smaller, hidden layer outputs』 variable range is bigger and this is in favor to updating of the connecting weights values, when the punishment factor is bigger, hidden layer outputs』 variable range is smaller and this is not in favor to updating of the connecting weights values but it can improve precision of networks. This explains the reason that the punishment factor should be increased graally in networks training process. It also explains feasibility of the new algorithm and BP algorithm』s disadvantage that connecting weigh values can not be updated sometimes.
Deposit forecasting is very important in deposit geology. The previous algorithms』 effect is not good in deposit forecasting because of much more input samples. The paper applies the new algorithm to deposit forecasting and expectant result is reached.
The paper points out the new algorithm』s strongpoint as well as to-be-improved places in the end.
Keywords: feed forward neural networks, convex optimization theory, training algorithm, deposit forecasting, application
BP演算法及其改進
2.1 BP演算法步驟
1°隨機抽取初始權值ω0;
2°輸入學習樣本對(Xp,Yp),學習速率η,誤差水平ε;
3°依次計算各層結點輸出opi,opj,opk;
4°修正權值ωk+1=ωk+ηpk,其中pk=,ωk為第k次迭代權變數;
5°若誤差E<ε停止,否則轉3°。
2.2 最優步長ηk的確定
在上面的演算法中,學習速率η實質上是一個沿負梯度方向的步長因子,在每一次迭代中如何確定一個最優步長ηk,使其誤差值下降最快,則是典型的一維搜索問題,即E(ωk+ηkpk)=(ωk+ηpk)。令Φ(η)=E(ωk+ηpk),則Φ′(η)=dE(ωk+ηpk)/dη=E(ωk+ηpk)Tpk。若ηk為(η)的極小值點,則Φ′(ηk)=0,即E(ωk+ηpk)Tpk=-pTk+1pk=0。確定ηk的演算法步驟如下
1°給定η0=0,h=0.01,ε0=0.00001;
2°計算Φ′(η0),若Φ′(η0)=0,則令ηk=η0,停止計算;
3°令h=2h, η1=η0+h;
4°計算Φ′(η1),若Φ′(η1)=0,則令ηk=η1,停止計算;
若Φ′(η1)>0,則令a=η0,b=η1;若Φ′(η1)<0,則令η0=η1,轉3°;
5°計算Φ′(a),若Φ′(a)=0,則ηk=a,停止計算;
6°計算Φ′(b),若Φ′(b)=0,則ηk=b,停止計算;
7°計算Φ′(a+b/2),若Φ′(a+b/2)=0,則ηk=a+b/2,停止計算;
若Φ′(a+b/2)<0,則令a=a+b/2;若Φ′(a+b/2)>0,則令b=a+b/2
8°若|a-b|<ε0,則令,ηk=a+b/2,停止計算,否則轉7°。
2.3 改進BP演算法的特點分析
在上述改進的BP演算法中,對學習速率η的選取不再由用戶自己確定,而是在每次迭代過程中讓計算機自動尋找最優步長ηk。而確定ηk的演算法中,首先給定η0=0,由定義Φ(η)=E(ωk+ηpk)知,Φ′(η)=dE(ωk+ηpk)/dη=E(ωk+ηpk)Tpk,即Φ′(η0)=-pTkpk≤0。若Φ′(η0)=0,則表明此時下降方向pk為零向量,也即已達到局部極值點,否則必有Φ′(η0)<0,而對於一維函數Φ(η)的性質可知,Φ′(η0)<0則在η0=0的局部范圍內函數為減函數。故在每一次迭代過程中給η0賦初值0是合理的。
改進後的BP演算法與原BP演算法相比有兩處變化,即步驟2°中不需給定學習速率η的值;另外在每一次修正權值之前,即步驟4°前已計算出最優步長ηk。
⑵ 如何算改進了一個演算法,怎麼改才叫改進了呢
我認為,所謂「改進」就是使發現原演算法的不足之處,並優化之,結果是使該演算法效率大大提高高,或者適用度更廣泛,如果「改進」後的演算法不比之前的更優,就不能算改進。反之,只要能夠大大提高改演算法的效率,或者使該演算法適用度更廣,就算是改進。至於改進一個細節,如果是一個重要的細節,當然也算是改進。
不過,演算法都是高手發明的,他們在公布之前一定將這種演算法優化過了,如果要再改進,那一定要非常細心或者比他更高才行。
⑶ 如何改進演算法,提高程序效率
從根本上了解演算法是怎麼執行的,這樣可以做到一通百通。
一般來說,降低時間復雜度是比較好的方法。 有時候,佔用更多的內存可以幫助程序更快的運行。還有就是選用效率高的語言,例如C。
⑷ bp神經網路的演算法改進一共有多少種啊!麻煩舉例一下!
1、引入動量項
2、變尺度法
3、變步長法
具體怎麼做,網上都有相關資料,公式比較難打,只能寫到這個份
⑸ AES加密演算法怎樣進行改進
AES(Advanced Encryption Standard):高級加密標准,是下一代的加密演算法標准,速度快,安全級別高。
用AES加密2000年10月,NIST(美國國家標准和技術協會)宣布通過從15種候選演算法中選出的一項新的密匙加密標准。Rijndael被選中成為將來的AES。Rijndael是在1999年下半年,由研究員Joan Daemen 和 Vincent Rijmen 創建的。AES正日益成為加密各種形式的電子數據的實際標准。
美國標准與技術研究院(NIST)於2002年5月26日制定了新的高級加密標准(AES)規范。
演算法原理 AES演算法基於排列和置換運算。排列是對數據重新進行安排,置換是將一個數據單元替換為另一個。AES使用幾種不同的方法來執行排列和置換運算。AES是一個迭代的、對稱密鑰分組的密碼,它可以使用128、192和256位密鑰,並且用128位(16位元組)分組加密和解密數據。與公共密鑰加密使用密鑰對不同,對稱密鑰密碼使用相同的密鑰加密和解密數據。通過分組密碼返回的加密數據的位數與輸入數據相同。迭代加密使用一個循環結構,在該循環中重復置換和替換輸入數據。密碼學簡介據記載,公元前400年,古希臘人發明了置換密碼。1881年世界上的第一個電話保密專利出現。在第二次世界大戰期間,德國軍方啟用「恩尼格瑪」密碼機,密碼學在戰爭中起著非常重要的作用。
隨著信息化和數字化社會的發展,人們對信息安全和保密的重要性認識不斷提高,於是在1997年,美國國家保准局公布實施了「美國數據加密標准(DES)」,民間力量開始全面介入密碼學的研究和應用中,採用的加密演算法有DES、RSA、SHA等。隨著對加密強度的不斷提高,近期又出現了AES、ECC等。
使用密碼學可以達到以下目的:保密性:防止用戶的標識或數據被讀取。數據完整性:防止數據被更改。身份驗證:確保數據發自特定的一方。
⑹ 如何改進SVM演算法,最好是自己的改進方法,別引用那些前人改進的演算法
樓主對於這種問題的答案完全可以上SCI了,知道答案的人都在寫論文中,所以我可以給幾個改進方向給你提示一下:
1 SVM是分類器對於它的准確性還有過擬合性都有很成熟的改進,所以採用數學方法來改進感覺很難了,但是它的應用很廣泛 SVMRank貌似就是netflix電影推薦系統的核心演算法,你可以了解下
2 與其他演算法的聯合,boosting是一種集成演算法,你可以考慮SVM作為一種弱學習器在其框架中提升學習的准確率
SVM的本身演算法真有好的改進完全可以在最高等級雜志上發論文,我上面說的兩個方面雖然很簡單但如果你有實驗數據證明,在國內發表核心期刊完全沒問題,本人也在論文糾結中。。
⑺ 對演算法的改進,改進多少才行才算合理
我也是這個建議。
1.在空間可以承受的情況下考慮改進時間效率。大的演算法的話可以對其中的部分演算法進行替換。
2.如果時間效率己達理論下限,可以進行空間效率的改進,包括實現的數據結構等等。
3.如果要求實現演算法的話,針對代碼的改進餘量不小。僅僅從語言本身考慮就有很大的優化空間。例如關鍵演算法用ASM宏實現,數據結構的組新組織(涉及CPU取數時的對齊問題),演算法的函數組織等等。
對一個成熟演算法的任何一方面進行改進都是了不起的工作。
⑻ 數據結構中快速排序演算法的不足以及改進
一般快速排序演算法都是以最左元素作為劃分的基準值,這樣當數據元素本身已經完全有序(不管正序或者逆序)時,每一趟劃分只能將一個元素分割出來,其效率很低:時間復雜度O(n^2),空間復雜度為O(n)
所以改進方法就是找尋合適的基準值,保證不至於在關鍵字有序或者接近有序時發生這個情況,一般可以使用三者取中(就是待劃分序列的頭元素、尾元素、中間元素三者的中間值)、或者隨機選擇等方法,這樣即使關鍵字完全有序,也可以保證時間復雜度O(nlogn),空間復雜度O(logn)
⑼ 優化演算法是什麼呢
優化演算法是指對演算法的有關性能進行優化,如時間復雜度、空間復雜度、正確性、健壯性。
大數據時代到來,演算法要處理數據的數量級也越來越大以及處理問題的場景千變萬化。為了增強演算法的處理問題的能力,對演算法進行優化是必不可少的。演算法優化一般是對演算法結構和收斂性進行優化。
同一問題可用不同演算法解決,而一個演算法的質量優劣將影響到演算法乃至程序的效率。演算法分析的目的在於選擇合適演算法和改進演算法。一個演算法的評價主要從時間復雜度和空間復雜度來考慮。
遺傳演算法
遺傳演算法也是受自然科學的啟發。這類演算法的運行過程是先隨機生成一組解,稱之為種群。在優化過程中的每一步,演算法會計算整個種群的成本函數,從而得到一個有關題解的排序,在對題解排序之後,一個新的種群----稱之為下一代就被創建出來了。首先,我們將當前種群中位於最頂端的題解加入其所在的新種群中,稱之為精英選拔法。新種群中的餘下部分是由修改最優解後形成的全新解組成。
常用的有兩種修改題解的方法。其中一種稱為變異,其做法是對一個既有解進行微小的、簡單的、隨機的改變;修改題解的另一種方法稱為交叉或配對,這種方法是選取最優解種的兩個解,然後將它們按某種方式進行組合。爾後,這一過程會一直重復進行,直到達到指定的迭代次數,或者連續經過數代後題解都沒有改善時停止。
⑽ 冒泡演算法的改進
冒泡排序過程
設想被排序的數組R[1..N]垂直豎立,將每個數據元素看作有重量的氣泡,根據輕氣泡不能在重氣泡之下的原則,從下往上掃描數組R,凡掃描到違反本原則的輕氣泡,就使其向上"漂浮"(交換位置),如此反復進行,直至最後任何兩個氣泡都是輕者在上,重者在下為止。
性能分析
若記錄序列的初始狀態為"正序",則冒泡排序過程只需進行一趟排序,在排序過程中只需進行n-1次比較,且不移動記錄;反之,若記錄序列的初始狀態為"逆序",則需進行n(n-1)/2次比較和記錄移動。因此冒泡排序總的時間復雜度為O(n*n)。
冒泡排序實現
根據掃描方向不同,實現略有不同。
普通冒泡演算法
一般的冒泡排序的第i趟處理是從r[0]到r[n-i],依次比較相鄰兩個記錄的關鍵字,並在反序時交換相鄰的記錄,其結果是將這n-i+1個記錄中關鍵字最大的元素交換到第n-i+1的位置上。整個排序過程需要進行n-1趟處理。
冒泡演算法的改進:
改進1:增加1個標志位,記錄是否發生交換
我們在傳統的冒泡排序的基礎上增加一個標志位exchange用來表示在一次冒泡排序中,數組的順序是否發生改變,如果改變了,意味著數組可能還未排列好,所以要進行下一次冒泡排序,而如果exchange的值不為真,也就是說明該數組在本次冒泡排序中,數組的順序沒有發生改變,即數組已經有序,則排序結束。
改進2:記錄發生交換的最後位置
我們在改進1的基礎上將標志位記錄的信息修改為一次冒泡排序中最後一次交換數據的位置,這樣進行洗一次冒泡排序的時候,我們可以知道,在這個標志位記錄的位置後面的數據均已有序,也就不用考慮了,這樣就不用考慮改進1中exchange改變了之後,數組是否已經排好的情況了。
改進3:增加2個記錄位,雙向記錄發生交換的最後位置
我們在改進2的基礎上設想,很多數組是有一定的規律性的,如果我們考慮到很多數組自身存在的一些有序性的話,會使問題簡化很多,所以我們考慮,不僅僅可以設置單項的記錄位掃描,可以設置正反向雙向掃描,這樣需要增加2個記錄位,分別記錄上一次冒泡排序中正向和反向發生交換的最後位置,這樣就類似於從兩側開始向中間排序,最小的,次小的……從左邊開始排,最大的,次大的……從右邊開始排,大大提高了效率。