欢迎来到天天文库
浏览记录
ID:37914293
大小:691.50 KB
页数:15页
时间:2019-06-02
《BP神经网络实验报告》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、深圳大学实验报告实验课程名称:人工神经网络技术实验项目名称:BP神经网络对蝴蝶花分类学院:专业:软件工程报告人:学号:班级:同组人:无指导教师:实验时间:实验报告提交时间:教务处制一、实验目的初步熟悉MATLAB工作环境,熟悉命令窗口,学会使用帮助窗口查找帮助信息。二、实验内容1、网络设计,包括输入层、隐含层、输出层节点个数的设计。2、算法步骤3、编程,注意原始数据的通用化,数据输入的随机性。4、网络训练,注意训练数据与验证数据分开。5、网络验证6、结果分析,修改隐含层节点个数,修改学习率,分别对结果的影响。三、实验步骤直接在Matlab软件中的Editor中运行以下代码
2、:(完善的代码用红色字体表示)%li.m%ABPNNwithmomentumtosolveFisher'sIrisFlowerproblem%bylixiujuan,Nov13,2011%%theNNarchitecture%itisathreelayersneuralnetwork4-3-3.%%parameterdescription%h=4thenodenumerofinputlayer%i=3thenodenumerofhiddenlayer%j=3thenodenumerofoutputlayer%V[h,i]theweightsbetweeninputandh
3、iddenlayers%W[i,j]theweightsbetweenhiddenandoutputlayers%Pi[i]thethresholdsofhiddenlayernodes%Tau[j]thethresholdsofoutputlayernodes%a[h]theinputvalues%b[i]thehiddenlayernodeactivations%c[j]theoutputlayernodeactivations%ck[j]thedesiredoutputofoutputlayernodes%d[j]theerorinoutputlayernodes%
4、e[i]theerorinhiddenlayernodes%DeltaW[i,j]theamountofchangefortheweightsW[i,j]%DeltaV[h,i]theamountofchangefortheweightsV[h,i]%DeltaPi[i]theamountofchangeforthethresholdsPi[i]%DeltaTau[j]theamountofchangeforthethresholdsTau[j]%Alpha=0.1theleaningrate%Beta=0.1theleaningrate%Gamma=0.8thecons
5、tantdetermineseffectofpastweightchanges%Tor=0.001thetorrelancethatdetermineswhentostoptraining%Maxepoch=1000themaxiteratenumber%%otherparameters%Ntrain=115thenumberoftrainningsets%Ntest=35thenumberoftestsets%Otrain[115]theoutputoftrainingsets%Otest[35]theoutputoftestsets%Odesired[150]thed
6、esiredoutputoftrainingandtestsets%%functiondescription%f(x)=logsig(x)%f(x)=1/(1+exp(-x))%%datafile%inputfile:data.dat%closeall;clc;clf;clearall;%parametersfortheNNstructureh=4;i=3;j=3;Alpha=0.1;Beta=0.1;Gamma=0.85;Tor=0.0005;Maxepoch=2000;Accuracy=0;Ntrain=115;Ntest=35;%assignrandomvalues
7、intherange[-1,+1]V=2*(rand(h,i)-0.5);W=2*(rand(i,j)-0.5);Pi=2*(rand(1,i)-0.5);Tau=2*(rand(1,j)-0.5);DeltaWOld(i,j)=0;%setthedelatofWijto0DeltaVOld(h,i)=0;%setthedelatofVijto0DeltaPiOld(i)=0;%setthedelatofPito0DeltaTauOld(j)=0;%setthedelatofTauto0%thelearningprocessE
此文档下载收益归作者所有