- 1、本文档共11页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
BP网络实现函数逼近
% 函数逼近
% BP逼近
% 正弦函数
p=[-1:.05:1];
t=sin(pi*p);
plot(p,t,-)
title(要逼近的非线性函数)
xlabel(时间)
ylabel(非线性函数)
%建立网络
net=newff(minmax(p),[n,1],{tansig purelin},trainlm)
??? Undefined function or variable n.
net=newff(minmax(p),[10,1],{tansig purelin},trainlm)
net =
Neural Network object:
architecture:
numInputs: 1
numLayers: 2
biasConnect: [1; 1]
inputConnect: [1; 0]
layerConnect: [0 0; 1 0]
outputConnect: [0 1]
targetConnect: [0 1]
numOutputs: 1 (read-only)
numTargets: 1 (read-only)
numInputDelays: 0 (read-only)
numLayerDelays: 0 (read-only)
subobject structures:
inputs: {1x1 cell} of inputs
layers: {2x1 cell} of layers
outputs: {1x2 cell} containing 1 output
targets: {1x2 cell} containing 1 target
biases: {2x1 cell} containing 2 biases
inputWeights: {2x1 cell} containing 1 input weight
layerWeights: {2x2 cell} containing 1 layer weight
functions:
adaptFcn: trains
gradientFcn: calcjx
initFcn: initlay
performFcn: mse
trainFcn: trainlm
parameters:
adaptParam: .passes
gradientParam: (none)
initParam: (none)
performParam: (none)
trainParam: .epochs, .goal, .max_fail, .mem_reduc,
.min_grad, .mu, .mu_dec, .mu_inc,
.mu_max, .show, .time
weight and bias values:
IW: {2x1 cell} containing 1 input weight matrix
LW: {2x2 cell} containing 1 layer weight matrix
b: {2x1 cell} containing 2 bias vectors
other:
userdata: (user information)
y1=sim(net,p)
y1 =
Columns 1 through 3
-2.639884443340668 -3.003073712383436 -3.194033204190848
Columns 4 through 6
-3.334757182601289 -3.594283021881933 -3.952800035494339
Columns 7 through 9
-4.173755066624227 -4.229926693495091 -4.177140178354165
Columns 10 through 12
文档评论(0)