简体   繁体   English

在R中使用插入符号包来改变重要性

[英]variable importance using caret package in R

I'm using the caret package in R to run both random forest and xgboost models. 我在R中使用插入符号包来运行随机森林模型和xgboost模型。 And I want to get the variable importance of all 65 variables. 我想了解所有65个变量的变量重要性。 I've tried varimp() function, and it could give me variable importance of the top 20 variables. 我已经尝试过varimp()函数,它可以使我对前20个变量的变量的重要性。 Is there any way or options that I could have them for all 65 variables? 我是否可以为所有65个变量使用这些方法或选项?

Thank you!!! 谢谢!!!

It computes them all. 它全部计算。 If you are printing or plotting, there is an argument called top that let's you control how many that are shown. 如果要打印或绘图,则有一个名为top的参数,可让您控制显示的数量。 The argument coming out of varImp has them all. 来自varImp的参数已包含所有内容。 I could give more details if you show a small reproducible example. 如果您显示了一个可复制的小例子,我可以提供更多详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM