【发布时间】:2018-05-03 13:45:11
【问题描述】:
我发布这个是因为这个帖子feture selection in caret 已经解决了我的问题,并且我有 2 个关于插入符号包中的功能选择功能的问题
当我在我的基因表达矩阵allsamplecombat 上运行下面的代码时,y= 中定义了 5 个类:
control <- rfeControl(functions=rfFuncs, method="cv", number=10)
results <- rfe(t(allsamplecombat[filter,]), y = factor(info$clust), sizes=c(300,400,500,600,700,800,1000,1200), rfeControl=control)
我得到了这样的输出
所以,我想知道我是否可以为每个类提取顶级特征,因为predictors(results) 只是给我结果特征,而没有指出每个类的重要性。
我的第二个问题是,当我尝试将 rfeControl functions 更改为 treebagFuncs 并运行 'parRF` 方法时
control <- rfeControl(functions=treebagFuncs, method="cv", number=5)
results <- rfe(t(allsamplecombat[filter,]), y = factor(info$clust), sizes=c(400,500,600,700,800), rfeControl=control, method="parRF")
我收到Error in { : task 1 failed - "subscript out of bounds" 错误。
我的代码有什么问题?
【问题讨论】:
标签: r classification r-caret