|
|
how to train the network for stock data
Posted:
Nov 27, 2012 11:58 PM
|
|
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.
|
|