Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Neural network
Replies: 1   Last Post: Mar 9, 2013 2:39 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Greg Heath

Posts: 5,964
Registered: 12/7/04
Re: Neural network
Posted: Mar 9, 2013 2:39 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Murugan Solaiyappan" wrote in message <khbcnn$pih$1@newscl01ah.mathworks.com>...
> 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.


For N I-dimensional inputs and N corresponding O-dimensional output targets, your matrices must have the dimensions

[ I N ] = size(inputs)

[ O N ] = size(targets)

Perhaps you need to transpose.

Hope this helps.

Greg



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.