I'm trying to conduct recursive feature elimination (RFE) referring to Ch19.7 of the book "Applied Predictive Modeling" by Max Kuhn.
In the book, it uses 5 repeated 10-fold cv for RFE.
To do this, it split data set by creating indexes for training data using:
caret::createMultiFolds(y, times = 5, k = 10)
and then it uses
caret::rfe() function under control of
caret::rfeControl(method = "repeatedcv", repeat = 5, ...) to do the RFE.
It seems that it is 10-fold cv because of k = 10 in
createMultiFolds() and 5 times repetition because of repeat = 5 in
The problem is that I cannot fully understand why this is 5 repeated 10-fold cv.
createMultiFolds(), 50 groups of indexes are sampled like:
Fold1.Rep1: [data type] [dimension] [contents] Fold2.Rep1 ~~ ... Fold10.Rep1 ~~ Fold1.Rep2 ~~ Fold2.Rep2 ~~ ... Fold10.Rep5 ~~
rfe() is run with
rfeControl(method = "repeatedcv", repeats = 5, ...), it iterates RFE algorithm 5 times over the entire 50 groups (the indexes in each group are unchanged after they created by
But, I can't understand why it repeats 5 times for the same training data. I believe that it's sufficient to use only the 10 groups with "Rep1" to do the 10-fold cv with 5 times repetition.
Why does it need all the 50 groups? and Why "repeat = 5" for