[R] Ranger could not work with caret

Neha gupta neh@@bo|ogn@90 @end|ng |rom gm@||@com
Tue Jun 28 00:38:12 CEST 2022


I cannot run the "ranger" model with caret. I am only using the farff and
caret libraries and the following code:

boot <- trainControl(method = "cv", number=10)

c1 <-train(act_effort ~ ., data = tr,
              method = "ranger",
               tuneLength = 5,
              metric = "MAE",
              preProc = c("center", "scale", "nzv"),
              trControl = boot)

The error I get is the repeating of the following message until I interrupt
it.

Error: mtry can not be larger than number of variables in data. Ranger will
EXIT now.

	[[alternative HTML version deleted]]



More information about the R-help mailing list