0

I am using caret::train to train my model. I am using ranger method to train my model. Ranger have a lot of parameter but in caret tuneGrid only 3 parameters are exposed to tune. I want to tune more parameters other than these 3

tr <- caret::trainControl(method = 'cv',number = 10,search = 'grid')

grd <- expand.grid(mtry = 3,splitrule = 'gini',min.node.size = 3,num.tree = 1000)

mdl <- caret::train(x = iris[,-ncol(iris)],y = iris[,ncol(iris)],method = 'ranger',trControl = tr,tuneGrid = grd)

Error: The tuning parameter grid should have columns mtry, splitrule, min.node.size
Progman
  • 16,827
  • 6
  • 33
  • 48
  • I trust this might help: https://stackoverflow.com/questions/48334929/r-using-ranger-with-caret-tunegrid-argument/48335341#48335341 – missuse Oct 25 '20 at 20:01
  • I introduced the same direct way of providing parameters in my answer... – polkas Oct 25 '20 at 22:33

0 Answers0