I do not understand the mtry
parameter of rfcv()
of randomForest
package in R:
rfcv(trainx, trainy, cv.fold=5, scale = "log", step = 0.5,
mtry = function(p) max(1, floor(sqrt(p))), recursive = FALSE, ...)
The randomForest
package explains mtry
as follows:
A function of number of remaining predictor variables to use as the
mtry
parameter in therandomForest
call.
For my understanding, if beginning 64 variables, then the mtry
used in the randomForest
call is 8; the next one is 32 variables because of step = 0.5
, then mtry
is 5. I wonder if my understanding is right or wrong?