i got 3x1 matrices that i wanna classify in to two groups using k fold crossvalidation method.
Indices = crossvalind('Kfold',inputs , 5); for i=1:5 test = (Indices == i); train = ~test; for n = 1:5 net = patternnet(inputs,targets,h); %test train net.divideFcn = 'dividetrain'; net.trainParam.goal = MSEgoal; net.trainParam.min_grad = MinGrad; [net,tr] = train(net,inputs,targets); % test train bestepoch = tr.best_epoch; R2(n,h) = 1 - tr.perf(bestepoch)/MSEtrn00; end
the above code is really wrong can someone correct it? its urgent
No products are associated with this question.