如何在所有算法中同时在Caret in R中找到algo类型(回归,分类)?

时间:2015-06-08 15:59:24

标签: r machine-learning classification regression r-caret

如何一次性查找所有型号的型号类型?如果我知道算法名称,我知道如何访问此信息,例如:

library('Caret')
tail(name(getModelInfo()))
[1] "widekernelpls" "WM"            "wsrf"          "xgbLinear"     "xgbTree"      
[6] "xyf"

getModelInfo()$xyf$type
[1] "Classification" "Regression"    

如何在一个地方看到所有算法的$类型?

1 个答案:

答案 0 :(得分:1)

查看帮助页?models。此外,heresome个链接too

此外:

> is_class <- unlist(lapply(mods, function(x) any(x$type == "Classification")))
> class_mods <- names(is_class)[is_class]
> head(class_mods)
[1] "ada"         "AdaBag"      "AdaBoost.M1" "amdai"       "avNNet"     
[6] "bag"