|
|
Neural network
Posted:
Mar 7, 2013 7:52 PM
|
|
Dear Matlab friends,
I am trying to work with the following code (availabe in matlab help) in neural network ,
load house_dataset; net = newff(houseInputs,houseTargets,20); net=train(net,houseInputs,houseTargets);
It works perfectly, the same code modified as follows for my data set,
load st_inputs.dat; load st_targets.dat; inputs=st_inputs(1:1237,1); targets=st_targets(1:1237,1);
net = newfit(inputs,targets,20); net=train(net,inputs,targets);
it produce the following error
??? Error using ==> plus Matrix dimensions must agree.
Error in ==> calcperf2 at 163 N{i,ts} = N{i,ts} + Z{k};
Error in ==> trainlm at 253 [perf,El,trainV.Y,Ac,N,Zb,Zi,Zl] = calcperf2(net,X,trainV.Pd,trainV.Tl,trainV.Ai,Q,TS);
Error in ==> network.train at 216 [net,tr] = feval(net.trainFcn,net,tr,trainV,valV,testV);
Error in ==> netfit_stock at 10 net=train(net,stockinputs,stocktargets);
and also i am using newff instead of newfit. This line also produce the same error. I can't understand this error. Please help me.
|
|