新版matlab中神经网络训练函数newff的使用方法

新版 Matlab 中神经网络训练函数 Newff 的使用方法一、 介绍新版 newffSyntax net = newff(P,T,[S1 S2.S(N-l)],{TF1 TF2.TFNl}, BTF,BLF,PF,IPF,OPF,DDF)Descriptionnewff(P,T,[S1 S2.S(N-l)],{TF1 TF2.TFNl}, BTF,BLF,PF,IPF,OPF,DDF) takes several argumentsP R x Q1 matrix of Q1 sample R-element vectorsT SN x Q2 matrix of Q2 sample SN-element target vectorsSi Size of ith layer, for N-1 layers, default = [ ].(Output layer size SN is determined from T.)TFi Transfer function of ith layer. (Default = tansig forhidden layers and purelin for output layer.)BTF Backpropagation network training function (default = trainlm )BLF Backpropagation weight/bias learning function (default = learngdm )IPF Row cell array of processing functions. (Default = { fixunknowns , removeconstantrows , mapminmax })OPF Row cell array of output processing functions. (Default = { removeconstantrows , mapminmax })DDF Data divison function (default = dividerand )ExamplesHere is a problem consisting of s 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(P,T,5);The network is simulated and its output plotted against the targets. Y = sim(net,P);plot(P,T,P,Y, o )The network is trained for 50 epochs. Again the network s output is plotted. net.trainParam.epochs = 50;net = train(net,P,T);Y = sim(net,P);plot(P,T,P,Y, o )二、 新版 newff 与旧版 newff 调用语法对比Example1比如输入 (6*1000) ,输出 output 为( 4*1000) ,那么旧版定义:net=newff(minmax(),[14,4],{ tansig , purelin }, trainlm );新版定义:net=newff(,output,14,{ tansig , purelin }, trainlm );Example2比如输入 (6*1000) ,输出 output 为( 4*1000) ,那么旧版定义:net=newff(minmax(),[49,14,4],{ tansig , tansig , tansig }, traingdx );新版定义:net=newff(,output, [49,14], { tansig , tansig , tansig }, traingdx );三、 旧版 newff 使用方法在新版本中使用提示:旧版本定义的 newff 虽也能在新版本中使用,但会有警告,警告如下:Warning: NEWFF used in an obsolete way. > In obs_use at 18In newff>create_network at 127In newff at 102See help for NEWFF to update calls to the new argument list.四、 新版 newff 与旧版 newff 使用的训练效果对比旧版本:旧用法训练次数多,但精度高新版本:新用法训练次数少,但精度可能达不到要求造成上述原因是:程序里面的权值、阈值的初始值是随机赋值的,所以每次运行的结果都会不一样,有好有坏。你可以把预测效果不错的网络的权值和阈值作为初始值。具体可以查看 net.iw{1,1}、net.lw{2,1}、net.b{1}、net.b{2}的值。现在给一个完整的例子%% 清空环境变量clcclear%% 训练数据预测数据data=importdata( test.txt );%从 1 到 768 间随机排序k=rand(1,768);[m,n]=sort(k);%输入输出数据=data(:,1:8);output =data(:,9);%随机提取 500 个样本为训练样本,268 个样本为预测样本_train=(n(1:500),:) ;output_train=output(n(1:500),:) ;_test=(n(501:768),:) ;output_test=output(n(501:768),:) ;%输入数据归一化[n,ps]=mapminmax(_train);%% BP 网络训练% %初始化网络结构net=newff(n,output_train,10);net.trainParam.epochs=1000;net.trainParam.lr=0.1;net.trainParam.goal=0.0000004;%% 网络训练net=train(net,n,output_train);%% BP 网络预测%预测数据归一化n_test=mapminmax( apply ,_test,ps);%网络预测输出BPoutput=sim(net,n_test);%% 结果分析%根据网络输出找出数据属于哪类BPoutput(find(BPoutput=0.5))=1;%% 结果分析%画出预测种类和实际种类的分类图figure(1)plo

matlab里newff,新版matlab中神经网络训练函数newff的使用方法相关推荐

  1. matlab newff,新版Matlab中神经网络训练函数Newff的使用方法.doc

    新版Matlab中神经网络训练函数Newff的使用方法 介绍新版newff Syntax net = newff(P,T,[S1 S2...S(N-l)],{TF1 TF2...TFNl}, BTF, ...

  2. 新版matlab newff,[转载]新版Matlab中神经网络训练函数Newff的使用方法

    新版Matlab中神经网络训练函数Newff的使用方法 一. 介绍新版newff Syntax · net = newff(P,T,[S1 S2...S(N-l)],{TF1 TF2...TFNl}, ...

  3. Matlab newff 训练时间,新版Matlab中神经网络训练函数Newff的使用方法

    新版Matlab中神经网络训练函数Newff的使用方法 一. 介绍新版newff Syntax · net = newff(P,T,[S1 S2...S(N-l)],{TF1 TF2...TFNl}, ...

  4. 新版Matlab中神经网络训练函数Newff的使用方法

    一.   介绍新版newff Syntax ·         net = newff(P,T,[S1 S2...S(N-l)],{TF1 TF2...TFNl}, BTF,BLF,PF,IPF,OP ...

  5. MATLAB中神经网络train函数使用说明

    MATLAB中神经网络train( )函数使用说明 函数的语法格式如下: [net, tr]=train(net, P, T, Pi, Ai): train( )函数用于训练创建好的感知器网络,事实上 ...

  6. bp神经网络训练函数选择,BP神经网络训练过程

    BP神经网络的训练集需要大样本吗?一般样本个数为多少? BP神经网络的训练集需要大样本吗?一般样本个数为多少? BP神经网络样本数有什么影响学习神经网络这段时间,有一个疑问,BP神经网络中训练的次数指 ...

  7. JavaScript 循环中调用异步函数的三种方法,及为什么 forEach 无法工作的分析

    JavaScript 循环中调用异步函数的三种方法,及为什么 forEach 无法工作的分析 业务分析 初版的问题 解决方案 传统的 for 循环 不使用 for 循环的解决方案 分析 forEach ...

  8. Button中command后面函数添加参数解决方法

    Button中command后面函数添加参数解决方法 参考文章: (1)Button中command后面函数添加参数解决方法 (2)https://www.cnblogs.com/smart-ziha ...

  9. [转]SAP ABAP中使用Read_Text函数读取项目文本的方法

    SAP ABAP中使用Read_Text函数读取项目文本的方法 使用Read_Text函数来读取文本内容.需要找到相关参数. 下面以采购订单为例: 双击文本,进入文本编辑器. 转到->表头. 显 ...

最新文章

  1. Java进程占用内存超高分析
  2. python分析b站_Python爬取并分析B站最热排行榜,我发现了这些秘密
  3. C语言程序设计教学探讨,C语言程序设计多媒体教学探讨
  4. 封神-性能容量分析报告
  5. Vue项目实战01: vue里父传子 传事件(easy)
  6. vs visual studio 2015安装后的几个问题
  7. 迷你世界无人驾驶地铁火车_出口伊斯坦布尔地铁列车“云下线”
  8. 济南市区块链产业创新发展行动计划对外公布
  9. 用ffmpeg转多音轨的mkv文件
  10. 免费在线 Logo生成器
  11. 组合体视图的画图步骤_工程制图 组合体
  12. java flip_GitHub - bowen903/ViewFlipAnimator: 一种超简单纯Java实现的卡片翻转效果
  13. 301转向代码大合集
  14. [MSSQL2005]再看CTE
  15. 计算机桌面怎么设置时钟,怎么用DesktopDigitalClock设置电脑桌面时钟
  16. RBF(径向基)网络
  17. UI设计师这些面试技巧你知道吗?
  18. Yandex企业邮箱注册
  19. 如何更好的建设标准化数字化智慧工地?
  20. HOI - PaStaNet: Toward Human Activity Knowledge Engine

热门文章

  1. 师范计算机专业前景,师范数学专业就业前景
  2. 适合程序员的耳机_有没有适合程序员打代码时用的耳机推荐?
  3. 高宽比例计算方法及等比高宽修改计算方法
  4. JAVA实现PDF和EXCEL生成和数据动态插入以及导出
  5. 版权登记和商标注册的区别
  6. 7-56 365次方
  7. Java共享充电宝地图应用_基于jsp的共享充电宝-JavaEE实现共享充电宝 - java项目源码...
  8. 快速开发php接口服务推荐框架
  9. 在电脑bios设置里开启虚拟化
  10. 关于在python中安装turtle出现的一些问题