MATLAB Answers

Specifying test set from a range of indices

3 views (last 30 days)
Baium on 24 Oct 2019
Edited: Baium on 24 Oct 2019
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


Sign in to comment.

Answers (0)

Sign in to answer this question.