How do I create CV foldes manually in tidymodels?

I am trying to figure out how I can manually define CV folds with rsample.

In mlr3 I can do this:

resampling = rsmp("custom")
  train = list(c(1:10, 51:60, 101:110)),
  test = list(c(11:20, 61:70, 111:120))

So I am looking for something similar in rsample, how is it possible to do this?


Hi Gísli,

rsample does currently not support manually defining splits or folds as in the example you posted, but there is a (slight?) possibility that this might become a feature in the future, see here:


Thanks paisan :slight_smile:

1 Like

I managed to do what I needed to do with group_vfold_cv.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.