当我尝试使用Ctree_Control时,未使用的参数出现了一些错误。
MyTree2 <- ctree(Class ~.,
control=ctree_control(teststat = c("quadratic", "maximum"),
splitstat = c("quadratic", "maximum"),
mincriterion = 0.9999),
data = train_data)
ctree_control(teststat = c(“ quadratic”,“ maximum”),splitstat => c(“ quadratic”,:中的错误: 未使用的参数(splitstat = c(“ quadratic”,“ maximum”))
MyTree2 <- ctree(Class ~.,
control=ctree_control(teststat = c("quadratic", "maximum"),
splitstat = c("quadratic", "maximum"),
mincriterion = 0.9999),
data = train_data)
ctree_control(teststat = c(“ quadratic”,“ maximum”),splitstat => c(“ quadratic”,:中的错误: 未使用的参数(splitstat = c(“ quadratic”,“ maximum”))
MyTree2 <- ctree(Class ~.,
control=ctree_control(teststat = c("quadratic", "maximum"),
splitstat = c("quadratic", "maximum"),
mincriterion = 0.9999),
data = train_data)
ctree_control(teststat = c(“ quadratic”,“ maximum”),splitstat => c(“ quadratic”,:中的错误: 未使用的参数(splitstat = c(“ quadratic”,“ maximum”))
答案 0 :(得分:0)
如果您仅使用“ party” 包,则ctree_control函数的某些参数(例如 splitstat )将不起作用。如果要使用单个树(相对于森林),则建议使用“ partykit” 软件包,因为它包含对ctree()的重新实现的改进。
install.packages("partykit")
library(partykit)
MyTree2 <- ctree(Class ~.,
control=ctree_control(teststat = c("quadratic", "maximum"),
splitstat = c("quadratic", "maximum"),
mincriterion = 0.9999),
data = train_data)