How to define my TestRows,Testinput and Testoutput?
Show older comments
Hi, I don't know why my TestRows,Testinput and Testoutput are all empty matrix? Can help me explain?
[x, minx, maxx] = premnmx ([900:70:1600; 150:45:600; 200:50:700]); [y, miny, maxy] = premnmx ([0:0.1:1]);
Input = x'; Output = y'; trainn = 11; Train = randperm (size (Input, 1))'; TrainRows = Train (1:trainn); Traininput = Input (TrainRows,:); Trainoutput = Output (TrainRows,:); TestRows = Train (trainn+1:end); Testinput = Input (TestRows,:); Testoutput = Output (TestRows,:); a = Traininput'; b = Trainoutput'; g = Testinput'; h = Testoutput'; net = newff(minmax(a),[11,1],{'tansig','purelin'},'trainbr'); net = init(net); net.trainParam.show = 100; net.trainParam.epochs = 5000; net.trainParam.goal = 0; [net,tr] = train(net,a,b);
c = sim (net,a); d = sim (net,g);
1 Comment
per isakson
on 12 Dec 2013
Edited: per isakson
on 12 Dec 2013
The button [{}Code] could make your code readable!
Obsolete Functions: premnmx as of R2006a according to the release notes.
Answers (0)
Categories
Find more on Reinforcement Learning in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!