MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by Subha
on 8 Mar 2013

Sir, How to implement cross validation methods such as k fold and leave one out with back propogation network... i have tried with SVm works good.. but dont know how to merge k fold with bpn... .. thanks

*No products are associated with this question.*

Answer by Tom Lane
on 12 Mar 2013

Accepted answer

I am not a nnet expert, but I am under the impression that your inputs should have one column per observation (rather than one row as in the Statistics Toolbox). If that is the case you may need to use "train" and "test" to index into columns rather than rows. Also, I believe traingd wants training set target values as its third input, not X data for the test set.

Answer by laplace laplace
on 25 Jun 2013

how did you apply the crossvalind command to column vectors??

laplace laplace
on 25 Jun 2013

generaly if your data have a dimension how do you apply the crossvalind command?

## 1 Comment

## Subha (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/66440#comment_135663

where, data is 16 x 54 and target is 1x54 i'm getting error as, ??? Index exceeds matrix dimensions. and

??? Error using ==> network.subsref at 83 Reference to non-existent field 'lr'.

Error in ==> traingd at 141 lr = net.trainParam.lr; ..

i've made few trials too like setting the target as 3x54 matrix but dono how to proceed with this... really in a confused state..