Matlab神经网络预测

1. data = xlsread('xlsPath');

2.  p = aa(3770:5170,1:5);
>> p=p';
>> [inputn, inputps] = mapminmax(p,0,1);
>> t=aa(3771:5171,1:5);
>> t=t';
>> [outputn, outputps] = mapminmax(t,0,1);
>> net=newff(minmax(inputn),[61,5],{'tansig','logsig'},'trainlm');

3.net.trainParam.epochs=100; 
net.trainParam.lr=0.1;  
net.trainParam.goal=0.01;
>> net=train(net,inputn,outputn);
>> t_data = aa(5172,1:5);

4.t_data = t_data';
>>  t_data = mapminmax('apply',t_data,inputps);
>> out=sim(net,t_data)

5.out= mapminmax('reverse',out, outputps)


你可能感兴趣的:(matlab)