CORRECTION: You have one hidden layer with H = 9 hidden nodes. Do not use more hidden layers.
Design an I-H-O MLP for classification of O = c classes:
Use newpr (calls newff) or patternnet (calls feedforward net)
Input matrix x contains N I-dimensional column vectors
Target matrix t contains N O-dimensional unit column vectors with the row of the "1" indicating the class of the corresponding input vector.
Ntrn = 0.7*N % Default number of training examples
Ntrneq = Ntrn*O % Number of training equations
Nw = (I+1)*H +)H+1)*O % Number of unknown weights to estimate
H < < (Ntrneq-O)/(I+O+1) % Ntrneq > > Nw is desired
rng(0)
j=0
for h = 1:dH: Hmax
j=j+1
for i = 1:Ntrials
net = newpr(x,t,h);
[net tr ] = train(net,x,t);
% tr = tr % Important diagnostic info when needed
y = net(x);
classes = vec2ind(y);
fill this in
PctErr(i,j) = ...
end
end
etc
Hope this helps.
Thank you for formally accepting my answer.
Greg
