Demo entry 5784145

11

   

Submitted by kevin on Jul 15, 2016 at 13:48
Language: Matlab. Code size: 861 Bytes.

clc;
clear;
p=[0.43227 0.40524 0.40207 0.39893 0.39581 0.39272 0.38965 0.38661 0.38359];
t=[0.43227 0.42249 0.42609 0.31955 0.40194 0.41731	0.40584	0.38718 0.37424]; 
net=newff(minmax(p),[3,1],{'tansig','purelin'},'trainlm');
net.trainParam.goal=0.00001;
net.trainParam.show=200;
net.trainParam.min_grad=1e-20;
net.trainParam.epochs=1000;
[net,tr]=train(net,p,t);
y2=sim(net,[0.43227 0.40524 0.40207 0.39893 0.39581 0.39272 0.38965 0.38661 0.38359 0.38059 0.37761 0.37466]);
n=9;
figure;
plot(0:n+2,y2,'-.','linewidth',2)
axis([0 n+2 0 1])
hold on;
plot(0:n-1,t,'*')
set(gca,'XTick',[0:n+2]);
set(gca,'XTicklabel',{'12月下','1月上','1月中','1月下','2月下','3月上','3月中','3月下','4月上','4月中','4月下','5月上'})
legend('预测比例','实际比例')
xlabel('时间段')
ylabel('比例')
title('IT在总的招聘情况')
%plot(0:1:8,y2)
%title('训练后网络的输出结果');
%xlabel('时间');
%ylabel('仿真输出');

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).