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")
resampling$instantiate(task,
  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?

Gisli

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: https://github.com/tidymodels/rsample/issues/158.

kv.
Hlynur

Thanks paisan :slight_smile:

1 Like

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

1 Like