Specifying test set from a range of indices

1 次查看(过去 30 天)
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by