'Does the caret package for R properly implement repeated CV when passed a multifold object to trainControl's index option?
I'm hoping the answer to this question is a quick "yes" or "no" but I cannot find it explicitly in the caret
documentation or elsewhere online.
I want to perform repeated CV, but there are some models which don't lend themselves easily to the caret framework (LighGBM, custom-compiled XGBoost for GPU, keras/tensorflow). My thought now is to predefine the folds and manually create the repeated CV for the non-conforming packages. I'm using 10x5 repeated CV. If I pass the fold object into a train
call's index
variable, but pass the method as repeatedcv
and the necessary repeat
value, will caret
know not to treat the folds as 50 separate cross validations but average across each five blocks Rep for each of the ten folds?
If yes; great, and then I can build my own loops for the other packages. If not, I would appreciate guidance on if there is any way to still use the train
or rfe
schema within caret
with pre-defined multi-folds.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|