如何查看递归特征消除(RFE)生成的每个模型的预测变量?
我使用 RFE(递归特征消除)方法从 39 个变量中找到最佳模型。我使用了以下代码:
set.seed(10)
ctrl <- rfeControl(functions = caretFuncs, method = "repeatedcv",repeats = 5,number= 5,allowParallel = TRUE)
RF_39 <- rfe(X, Y,sizes = c(1:39),method ='rf',rfeControl = ctrl,tuneGrid = data.frame(mtry=6))
最好的模型是使用 36 个变量构建的。 如果我想查看这 36 个变量,我可以使用 预测器(RF_39)
或 RF_39$optVariable
函数。
但是,我需要查看用于制作其他模型而不是最佳模型的变量。 例如,用于制造型号 12 的变量是什么? 如何查看RFE方法制作的特定模型的变量? 感谢您的帮助。
I have used RFE (Recursive Feature Elimination) method to find the best model out of 39 variables. I used the following codes:
set.seed(10)
ctrl <- rfeControl(functions = caretFuncs, method = "repeatedcv",repeats = 5,number= 5,allowParallel = TRUE)
RF_39 <- rfe(X, Y,sizes = c(1:39),method ='rf',rfeControl = ctrl,tuneGrid = data.frame(mtry=6))
The best model is made using 36 variables.
If I want to see those 36 variables I can usepredictors(RF_39)
or RF_39$optVariable
functions.
However, I need to see the variables used for making the other models rather than the best model.
For example, what are the variables used for making model number 12?
How can I see the variables of a specific model made by RFE method?
Thanks for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论