matlab newff函数

本文介绍如何使用newff函数创建前馈反向传播神经网络,包括输入参数详解、推荐函数feedforwardnet、训练函数的选择及注意事项等。通过实例演示了如何创建、训练网络并评估性能。
newff
 newff Create a feed-forward backpropagation network.
 
   Obsoleted in R2010b NNET 7.0.  Last used in R2010a NNET 6.0.4.
   The recommended function is feedforwardnet.
 
   Syntax
 
     net = newff(P,T,S)
     net = newff(P,T,S,TF,BTF,BLF,PF,IPF,OPF,DDF)
 
   Description
 
     newff(P,T,S) takes,
       P  - RxQ1 matrix of Q1 representative R-element input vectors.
       T  - SNxQ2 matrix of Q2 representative SN-element target vectors.
       Si  - Sizes of N-1 hidden layers, S1 to S(N-1), default = [].
             (Output layer size SN is determined from T.)
     and returns an N layer feed-forward backprop network.
 
     newff(P,T,S,TF,BTF,BLF,PF,IPF,OPF,DDF) takes optional inputs,
       TFi - Transfer function of ith layer. Default is 'tansig' for
             hidden layers, and 'purelin' for output layer.
       BTF - Backprop network training function, default = 'trainlm'.
       BLF - Backprop weight/bias learning function, default = 'learngdm'.
       PF  - Performance function, default = 'mse'.
       IPF - Row cell array of input processing functions.
             Default is {'fixunknowns','remconstantrows','mapminmax'}.
       OPF - Row cell array of output processing functions.
             Default is {'remconstantrows','mapminmax'}.
       DDF - Data division function, default = 'dividerand';
     and returns an N layer feed-forward backprop network.
 
     The transfer functions TF{i} can be any differentiable transfer
     function such as TANSIG, LOGSIG, or PURELIN.
 
     The training function BTF can be any of the backprop training
     functions such as TRAINLM, TRAINBFG, TRAINRP, TRAINGD, etc.
 
     *WARNING*: TRAINLM is the default training function because it
     is very fast, but it requires a lot of memory to run.  If you get
     an "out-of-memory" error when training try doing one of these:
 
     (1) Slow TRAINLM training, but reduce memory requirements, by
         setting NET.efficiency.memoryReduction to 2 or more. (See HELP TRAINLM.)
     (2) Use TRAINBFG, which is slower but more memory efficient than TRAINLM.
     (3) Use TRAINRP which is slower but more memory efficient than TRAINBFG.
 
     The learning function BLF can be either of the backpropagation
     learning functions such as LEARNGD, or LEARNGDM.
 
     The performance function can be any of the differentiable performance
     functions such as MSE or MSEREG.
 
   Examples
 
     [inputs,targets] = simplefitdata;
     net = newff(inputs,targets,20);
     net = train(net,inputs,targets);
     outputs = net(inputs);
     errors = outputs - targets;
     perf = perform(net,outputs,targets)
 
   Algorithm
 
     Feed-forward networks consist of Nl layers using the DOTPROD
     weight function, NETSUM net input function, and the specified
     transfer functions.
 
     The first layer has weights coming from the input.  Each subsequent
     layer has a weight coming from the previous layer.  All layers
     have biases.  The last layer is the network output.
 
     Each layer's weights and biases are initialized with INITNW.
 
     Adaption is done with TRAINS which updates weights with the
     specified learning function. Training is done with the specified
     training function. Performance is measured according to the specified
     performance function.
新版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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值