matlab newff函数弃用了,matlab 新旧版本 newff 问题

P=[-1.7817 -0.2786 -0.2954 -0.2394 -0.1842 -0.1572 -0.1584 -0.1998;

-1.8710 -0.2957 -0.3494 -0.2904 -0.1460 -0.1387 -0.1492 -0.2228;

-1.8347 -0.2817 -0.3566 -0.3476 -0.1820 -0.1435 -0.1778 -0.1849;

-1.8807 -0.2467 -0.2316 -0.2419 -0.1938 -0.2103 -0.2010 -0.2533;

-1.4151 -0.2282 -0.2124 -0.2147 -0.1271 -0.0680 -0.0872 -0.1684;

-1.2879 -0.2252 -0.2012 -0.1298 -0.0245 -0.0390 -0.0762 -0.1672;

-1.5239 -0.1979 -0.1094 -0.1402 -0.0994 -0.1394 -0.1673 -0.2810;

-1.6781 -0.2047 -0.1180 -0.1532 -0.1732 -0.1716 -0.1851 -0.2006;

0.1605 -0.0920 -0.0160  0.1246  0.1802  0.2087  0.2234  0.1003;

0.2045  0.1078 0.2246  0.2031  0.2428  0.2050  0.0704  0.0403;

-1.0242 -0.1461 -0.1018 -0.0778 -0.0363 -0.0476 -0.0160 -0.0253;

-0.7915 -0.1018 -0.0737 -0.0945 -0.0955  0.0044  0.0467  0.0719];

T=[0 1;0 1;0 1;0 1;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1];

P=P';

T=T';

net=newff(minmax(P),[17,2],{'tansig','logsig'},'trainlm');

net.trainParam.epochs=50;

net.trainParam.goal=0.001;

net=train(net,P,T);

P_test=[-1.4736 -0.2845 -3.0724 -0.2108 -0.1904 -0.1467 -0.1696 -0.2001;

–1.6002 –0.2011 –0.1021 –0.1394 –0.1001 –0.1572 –0.1584 –0.2790;

-1.0314 -0.1521 -0.1101 -0.0801 -0.0347 -0.0482 -0.0158 -0.0301]';

Y=sim(net,P_test)   这是旧版本 newff

P=[-1.7817 -0.2786 -0.2954 -0.2394 -0.1842 -0.1572 -0.1584 -0.1998;

-1.8710 -0.2957 -0.3494 -0.2904 -0.1460 -0.1387 -0.1492 -0.2228;

-1.8347 -0.2817 -0.3566 -0.3476 -0.1820 -0.1435 -0.1778 -0.1849;

-1.8807 -0.2467 -0.2316 -0.2419 -0.1938 -0.2103 -0.2010 -0.2533;

-1.4151 -0.2282 -0.2124 -0.2147 -0.1271 -0.0680 -0.0872 -0.1684;

-1.2879 -0.2252 -0.2012 -0.1298 -0.0245 -0.0390 -0.0762 -0.1672;

-1.5239 -0.1979 -0.1094 -0.1402 -0.0994 -0.1394 -0.1673 -0.2810;

-1.6781 -0.2047 -0.1180 -0.1532 -0.1732 -0.1716 -0.1851 -0.2006;

0.1605 -0.0920 -0.0160  0.1246  0.1802  0.2087  0.2234  0.1003;

0.2045  0.1078 0.2246  0.2031  0.2428  0.2050  0.0704  0.0403;

-1.0242 -0.1461 -0.1018 -0.0778 -0.0363 -0.0476 -0.0160 -0.0253;

-0.7915 -0.1018 -0.0737 -0.0945 -0.0955  0.0044  0.0467  0.0719];

T=[0 1;0 1;0 1;0 1;1 0;1 0;1 0;1 0;1 1;1 1;1 1;1 1];

P=P';

T=T';

net=newff(P,T,17,{'tansig','logsig'},'trainlm');

net.trainParam.epochs=50;

net.trainParam.goal=0.001;

net=train(net,P,T);

P_test=[-1.4736 -0.2845 -3.0724 -0.2108 -0.1904 -0.1467 -0.1696 -0.2001;

-1.6002 -0.2011 -0.1021 -0.1394 -0.1001 -0.1572 -0.1584 -0.2790;

-1.0314 -0.1521 -0.1101 -0.0801 -0.0347 -0.0482 -0.0158 -0.0301]';

Y=sim(net,P_test)这是新版本的newff

新版本是2008b

我在2008运行两个程序 结果相差很大!!!这是为什么那?应该相近才对啊!

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
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 二、   newffnewff调用语法对比 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、付费专栏及课程。

余额充值