matlab详解newff(前馈反向传播网络)

1,newff函数参数说明

net = newff(P,T,S)                             % 这两种定义都可以
net = newff(P,T,S,TF,BTF,BLF,PF,IPF,OPF,DDF)
1
2
   P:输入参数矩阵。(RxQ1),其中Q1代表R元的输入向量。其数据意义是矩阵P有Q1列,每一列都是一个样本,而每个样本有R个属性(特征)。一般矩阵P需要归一化,即P的每一行都归一化到[0 1]或者[-1 1]。 
  T:目标参数矩阵。(SNxQ2),Q2代表SN元的目标向量。 
  S:N-1个隐含层的数目(S(i)到S(N-1)),默认为空矩阵[]。输出层的单元数目SN取决于T。返回N层的前馈BP神经网络 
   TF:相关层的传递函数,默认隐含层为tansig函数,输出层为purelin函数。 
  BTF:BP神经网络学习训练函数,默认值为trainlm函数。 
  BLF:权重学习函数,默认值为learngdm。 
  PF:性能函数,默认值为mse,可选择的还有sse,sae,mae,crossentropy。 
  IPF,OPF,DDF均为默认值即可。 
  例子:

net = newff( input,output, [50] , { 'logsig' 'purelin' } , 'traingdx' ) ;    
1
2,传递函数TF 
  purelin: 线性传递函数。 
  tansig :正切S型传递函数。 
  logsig :对数S型传递函数。  
  隐含层和输出层函数的选择对BP神经网络预测精度有较大影响,一般隐含层节点转移函数选用 tansig函数或logsig函数,输出层节点转移函数选用tansig函数或purelin函数。 
3,学习训练函数BTF 
  traingd:最速下降BP算法。 
  traingdm:动量BP算法。 
  trainda:学习率可变的最速下降BP算法。 
  traindx:学习率可变的动量BP算法。 
  trainrp:弹性算法。 
  变梯度算法: 
    traincgf(Fletcher-Reeves修正算法) 
     traincgp(Polak_Ribiere修正算法) 
     traincgb(Powell-Beale复位算法) 
     trainbfg(BFGS 拟牛顿算法) 
     trainoss(OSS算法)

4,参数说明 
  通过net.trainParam可以查看参数 
   Show Training Window Feedback showWindow: true 
   Show Command Line Feedback showCommandLine: false 
   Command Line Frequency show: 两次显示之间的训练次数 
  Maximum Epochs epochs: 训练次数 
   Maximum Training Time time: 最长训练时间(秒) 
   Performance Goal goal: 网络性能目标 
   Minimum Gradient min_grad: 性能函数最小梯度 
   Maximum Validation Checks max_fail: 最大验证失败次数 
   Learning Rate lr: 学习速率 
  Learning Rate Increase lr_inc: 学习速率增长值 
  Learning Rate lr_dec: 学习速率下降值 
   Maximum Performance Increase max_perf_inc: 
   Momentum Constant mc: 动量因子
————————————————
版权声明:本文为CSDN博主「xiaotao_1」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xiaotao_1/article/details/79078729

新版Matlab中神经网络训练函数Newff的详细讲解-新版Matlab中神经网络训练函数Newff的使用方法.doc 本帖最后由 小小2008鸟 于 2013-1-15 21:42 编辑 新版Matlab中神经网络训练函数Newff的详细讲解 一、   介绍新版newffSyntax·          net = newff],{TF1 TF2...TFNl}, BTF,BLF,PF,IPF,OPF,DDF) Descriptionnewff],{TF1 TF2...TFNl}, BTF,BLF,PF,IPF,OPF,DDF) takes several arguments PR x Q1 matrix of Q1 sample R-element input vectorsTSN x Q2 matrix of Q2 sample SN-element target vectorsSiSize of ith layer, for N-1 layers, default = [ ]. TFiTransfer function of ith layer. (Default = 'tansig' for hidden layers and 'purelin' for output layer.)BTFBackpropagation network training function BLFBackpropagation weight/bias learning function IPFRow cell array of input processing functions. OPFRow cell array of output processing functions. DDFData divison function ExamplesHere is a problem consisting of inputs P and targets T to be solved with a network.·          P = [0 1 2 3 4 5 6 7 8 9 10];T = [0 1 2 3 4 3 2 1 2 3 4];Here a network is created with one hidden layer of five neurons.·          net = newff;The network is simulated and its output plotted against the targets.·          Y = sim;plotThe network is trained for 50 epochs. Again the network's output is plotted.·          net.trainParam.epochs = 50;net = train;Y = sim; plot 二、   新版newff与旧版newff调用语法对比 Example1比如输入input(6*1000),输出output为(4*1000),那么旧版定义:net=newff,[14,4],{'tansig','purelin'},'trainlm');新版定义:net=newff; Example2比如输入input(6*1000),输出output为(4*1000),那么旧版定义:net=newff,[49,10,4],{'tansig','tansig','tansig'},'traingdx');新版定义:net=newff; 更详细请看word文档 新版Matlab中神经网络训练函数Newff的使用方法.doc
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值