bp神經(jīng)網(wǎng)絡(luò)matlab實例(bp神經(jīng)網(wǎng)絡(luò)matlab實例)

bp神經(jīng)網(wǎng)絡(luò)matlab實例(bp神經(jīng)網(wǎng)絡(luò)matlab實例)

ID:38983239

大小:25.10 KB

頁數(shù):23頁

時間:2019-06-22

bp神經(jīng)網(wǎng)絡(luò)matlab實例(bp神經(jīng)網(wǎng)絡(luò)matlab實例)_第1頁
bp神經(jīng)網(wǎng)絡(luò)matlab實例(bp神經(jīng)網(wǎng)絡(luò)matlab實例)_第2頁
bp神經(jīng)網(wǎng)絡(luò)matlab實例(bp神經(jīng)網(wǎng)絡(luò)matlab實例)_第3頁
bp神經(jīng)網(wǎng)絡(luò)matlab實例(bp神經(jīng)網(wǎng)絡(luò)matlab實例)_第4頁
bp神經(jīng)網(wǎng)絡(luò)matlab實例(bp神經(jīng)網(wǎng)絡(luò)matlab實例)_第5頁
資源描述:

《bp神經(jīng)網(wǎng)絡(luò)matlab實例(bp神經(jīng)網(wǎng)絡(luò)matlab實例)》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫

1、bp神經(jīng)網(wǎng)絡(luò)matlab實例(bp神經(jīng)網(wǎng)絡(luò)matlab實例)Case1trainingBPnetworkbymomentumgradientdescentalgorithm.Trainingsamplesaredefinedasfollows:InputvectorasP=[-1-231-115-3]Thetargetvectorist=[-1-111]Solution:theMATLABprogramofthisexampleisasfollows:CloseallClearEchoonCLC%NEWFF-generatinganewfeedforw

2、ardneuralnetwork%TRAIN--trainingBPneuralnetwork%SIM--SimulationofBPneuralnetworkPauseStartbyhittinganykeyCLCPercentdefinestrainingsamples%PasinputvectorP=[-1,-2,3,1;-1,1,5,-3];%TisthetargetvectorT=[-1,-1,1,1];Pause;CLC%createanewfeedforwardneuralnetworkNet=newff(minmax(P),[3,1],

3、{'tansig','purelin'},'traingdm')ThecurrentinputlayerweightsandthresholdsInputWeights=net.IW{1,1}Inputbias=net.b{1}ThecurrentnetworklayerweightsandthresholdsLayerWeights=net.LW{2,1}Layerbias=net.b{2}PauseCLC%settrainingparametersNet.trainParam.show=50;Net.trainParam.lr=0.05;Net.t

4、rainParam.mc=0.9;Net.trainParam.epochs=1000;Net.trainParam.goal=1e-3;PauseCLC%callTRAINGDMalgorithmtotrainBPnetwork[net,tr]=train(net,P,T);PauseCLCSimulationofBPnetworkby%A=sim(net,P)CalculatethesimulationerrorE=T-AMSE=mse(E)PauseCLCEchooffExample2adoptsBayesianregularizationalg

5、orithmtoimprovethegeneralizationabilityofBPnetwork.Inthiscase,weusedtwokindsoftrainingmethods,namelyL-Malgorithm(trainlm)andtheBiasregularizationalgorithm(trainbr),isusedtotraintheBPnetwork,sothatitcanfitattachedtoawhitenoisesinesampledata.Amongthem,thesampledatacanbegeneratedas

6、followsMATLABstatements:Inputvector:P=[-1:0.05:1];Targetvector:randn('seed',78341223);T=sin(2*pi*P)+0.1*randn(size(P));Solution:theMATLABprogramofthisexampleisasfollows:CloseallClearEchoonCLC%NEWFF-generatinganewfeedforwardneuralnetwork%TRAIN--trainingBPneuralnetwork%SIM--Simula

7、tionofBPneuralnetworkPauseStartbyhittinganykeyCLC%definetrainingsamplevector%PasinputvectorP=[-1:0.05:1];%TisthetargetvectorRandn('seed',78341223);T=sin(2*pi*P)+0.1*randn(size(P));DrawthesampledatapointsPlot(P,T,+);EchooffHoldon;Plot(P,sin(2*pi*P),':');Drawsinecurveswithoutnoise

8、EchoonCLCPauseCLC%createanewfeedforwardneuralne

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文

此文檔下載收益歸作者所有

當(dāng)前文檔最多預(yù)覽五頁,下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學(xué)公式或PPT動畫的文件,查看預(yù)覽時可能會顯示錯亂或異常,文件下載后無此問題,請放心下載。
2. 本文檔由用戶上傳,版權(quán)歸屬用戶,天天文庫負(fù)責(zé)整理代發(fā)布。如果您對本文檔版權(quán)有爭議請及時聯(lián)系客服。
3. 下載前請仔細(xì)閱讀文檔內(nèi)容,確認(rèn)文檔內(nèi)容符合您的需求后進(jìn)行下載,若出現(xiàn)內(nèi)容與標(biāo)題不符可向本站投訴處理。
4. 下載文檔時可能由于網(wǎng)絡(luò)波動等原因無法下載或下載錯誤,付費完成后未能成功下載的用戶請聯(lián)系客服處理。