Specifying test set from a range of indices

1 view (last 30 days)
Baium
Baium on 24 Oct 2019
Edited: Baium on 24 Oct 2019
Hello,
I am trying to constrain the test indices for cross-validation to be coming from a specific range of a vector's length.
There are 8532 observations and 3 classes. For the training set, the entire vector is eligible for 10-fold validation. However, the test set should consist of indices ranging from 1:5400. I thought divideind would work, but it doesn't do what I need. I have also tried crossvalind, and two separate cvpartition calls for the training and testing test respectively, but then it becomes challenging to combine these two together.
How can I combine this approach into a single cvpartition object instead of manually using randperm or other index randomization methods for 10-fold validation?
Many thanks

Answers (0)

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!