0

When using caret with CV, imputation estimation /etc will happen in each fold as not to leak. I am trying to find whether this happens in the tidymodels workflow.

Logically I don't think so as you pipe a baked (already applied steps) into the vfold_cv... but I may br wrong.

I could build a workflow that creates folds first, but wondering if im missing something. Thanks

Talbert
  • 21
  • 3

1 Answers1

0

Finally found an example that represents this. Many examples show creating splits after preprocessing. However, if performing cv, always preprocess within your resamples.

https://tidymodels.github.io/tune/reference/tune_grid.html

Talbert
  • 21
  • 3