<span style="font-size:18px;">[filename, pathname] = uigetfile('17_1_P.xls');
file=[pathname filename];
x=xlsread(file);
p=[x(:,1),x(:,2),x(:,3),x(:,4),x(:,5),x(:,6);]'
t= x(:,7)',
[filename, pathname] = uigetfile('17_1_Ptest.xls');
file=[pathname filename];
x=xlsread(file);
ptest=[x(:,1),x(:,2),x(:,3),x(:,4),x(:,5),x(:,6);]'
ttest=x(:,7)'
%net=newff(minmax(p),[9,1],{'logsig','purelin'},'trainlm'),
net=newelm(minmax(p),[25,1],{'logsig','purelin'}),
net.trainParam.show = 200,
net.trainParam.epoch = 3000,
net.trainParam.goal= 1e-2,
[net,tr]=train(net,p,t);
% spread = 0.5;
% net = newrbe(p,t,spread);
rtest = sim(net, p)
rdelta = rtest-t
result_test = sim(net, ptest)
delta = result_test-ttest
result = [ttest' result_test' delta'];
</span>
Elman神经网络的实例(预测结果,函数回归)
最新推荐文章于 2023-10-26 23:03:17 发布