For CART model, caret seems to only provide tunning of complexity parameter. Is there way to tune other parameters such as minbucket?
答案 0 :(得分:3)
传递给分类或回归例程的参数包含在dots参数中。
如果要包含minbucket
,control
内应包含参数train
。
例如:
library("caret")
train(Kyphosis ~ Age + Number + Start, data = kyphosis,
method = "rpart",
tuneGrid = data.frame(cp = c(0.01, 0.05)),
control = rpart.control(minsplit = 10, minbucket = 5))
如果你想调整minbucket
,你必须手动完成。