divideind
Purpose
Divide vectors into three sets using specified indices
Syntax
[trainV,valV,testV,trainInd,valInd,testInd] =
divideind(allV,trainInd,valInd,testInd)
Description
divideind is used to separate input and target vectors into three sets: training, validation, and testing. It takes the following inputs,
allV
|
R x Q matrix of Q R-element vectors
|
trainInd
|
Training indices
|
valInd
|
Validation indices
|
testInd
|
Test indices
|
and returns
trainV
|
Training vectors
|
valV
|
Validation vectors
|
testV
|
Test vectors
|
trainInd
|
Training indices (unchanged)
|
valInd
|
Validation indices (unchanged)
|
testInd
|
Test indices (unchanged)
|
Examples
p = rands(3,1000);
trainInd = [(1:100) (301:800)];
valInd = [(101:200) (801:900)];
testInd = [(201:300) (901:1000)];
[trainP,valP,testV] = divideind(p,trainInd,valInd,testInd);
Network Use
Here are the network properties that define which data division function to use, and what its parameters are, when train is called.
See Also
divideblock, divideint, dividerand
| | Provide feedback about this page |
 | divideblock | | divideint |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit