Caret在决策树中的变量重要性

时间:2016-12-06 02:32:42

标签: r r-caret

我的决策树如下

Act_rf <- train(Activity ~ Country + Threat + Target.Section + Author, data = CT1, method = "ranger",trControl = myCont)

然后尝试通过使用varImp(Act_rf)来获取我的变量重要性,但后来我得到了以下错误。这是为什么?我该如何解决呢。

 ranger variable importance

only 20 most important variables shown (out of 665)

 Overall
374     NaN
370     NaN
247     NaN
574     NaN
316     NaN
149     NaN
593     NaN
420     NaN
386     NaN
104     NaN
462     NaN
288     NaN
32      NaN
342     NaN
552     NaN
90      NaN
292     NaN
512     NaN
322     NaN
52      NaN
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In FUN(newX[, i], ...) : no non-missing arguments to max; returning -Inf
2: In FUN(newX[, i], ...) : no non-missing arguments to max; returning -Inf
3: In FUN(newX[, i], ...) : no non-missing arguments to max; returning -Inf
...

0 个答案:

没有答案