How to take training data from different indexes in a matrix in nprtool ?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rohit Chandra
am 14 Sep. 2014
Kommentiert: Rohit Chandra
am 14 Sep. 2014
Hi,
I am trying to do classification using nprtool, for a problem I need to divide my data from specific indexes for training and testing. For example - From 1372 samples, I need 1:272 and 546:1372 to be my training set and rest as validation and test sets. I am using 'divideInd', how can I accomplish such a division of data ?
net.divideFcn = 'divideind';
net.divideMode = 'sample';
net.divideParam.trainInd = 1:272 + 546:1372;
net.divideParam.valInd = 273:409;
net.divideParam.testInd = 410:545;
net.trainFcn = 'trainscg';
0 Kommentare
Akzeptierte Antwort
Greg Heath
am 14 Sep. 2014
net.divideParam.trainInd = [1:272, 546:1372];
Hope this helps
Thank you for formally accepting my answer
Greg
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Define Shallow Neural Network Architectures finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!