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: how to train the network for stock data
Replies: 3   Last Post: Dec 13, 2012 10:06 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Murugan Solaiyappan

Posts: 27
Registered: 12/4/10
how to train the network for stock data
Posted: Nov 27, 2012 11:58 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Dear matlab friends,
Greetings to all.

I have trouble with train the stock data.
here my code is,

load ti_out_t.data;
P=ti_out_t(1:189,1:12);
T=ti_out_t(1:189,13:24);
[pn,minp,maxp,tn,mint,maxt]=premnmx(P',T');
net=newff(minmax(pn),[24 1],{'tansig','tansig'},'traingdm');
net.trainParam.epochs=75;
net.trainParam.lr=0.3;
net.trainParam.mc=0.6;
net=train(net,pn,tn);


ti_out_t.data contains 271 rows and 24 columns.
P is input data and t is output data.

When I execute the above code in matlab, the following error displayed,

??? Error using ==> network.train at 145
Targets are incorrectly sized for network.
Matrix must have 1 rows.

Error in ==> nn_taiwan_12input at 9
net=train(net,pn,tn);

I can't understand the error,

Please any one of you help me my dear friends.



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.