[R] Ranger could not work with caret

Neha gupta neh@@bo|ogn@90 @end|ng |rom gm@||@com
Thu Jun 30 20:32:05 CEST 2022


I posted it for the second time as I didn't get any response from group
members. I am not sure if some problem is with the question.



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