`LocalImp` 参数在 randomForests 包中究竟做了什么?

What exactly does the `LocalImp` parameter do in randomForests package?

谁能用相对简单的英语解释 randomForest 包中参数 localImp 的作用?

randomForest 文档将此参数描述为:

should casewise importance measure be computed? (Setting this to TRUE will override importance.)

它还声明它产生:

a p by n matrix containing the casewise importance measures, the [i,j] element of which is the importance of i-th variable on the j-th case. NULL if localImp=FALSE

谁能准确解释这意味着什么,或者指出一篇论文的方向,他们详细讨论了这个参数。

谢谢

Localimp(局部重要性)设置每个变量在特定个体分类中的重要性(localImp=TRUE)这样你就可以看到每个特征对每一行输出的影响程度。

您可以阅读: Understanding variable importances in forests of randomized trees

还有 Random forest guide

randomForest 包或多或少是 Leo Breiman 和 Adel Cutler 编写的 Fortran 代码的包装器。 Breiman 是加州大学伯克利分校的统计学教授,他们在他去世后保留了他的网站。

这是一个了不起的资源:
https://www.stat.berkeley.edu/~breiman/RandomForests/

在此站点中,他们在分类页面上提到了以下内容:

For each case, consider all the trees for which it is oob. Subtract the percentage of votes for the correct class in the variable-m-permuted oob data from the percentage of votes for the correct class in the untouched oob data. This is the local importance score for variable m for this case.

因此,对于观察 i,采用所有未在 i 上训练的树,因为它未在 bootstrap 中被选中。现在,考虑变量 m。为每棵不包含 i 的树的遗漏 (oob) 观察值排列 m 的值。计算这些树的平均袋外精度。在不改变变量 m 的值的情况下,还可以计算这些树的袋外精度。从非置换 oob 精度中减去置换 m 精度的平均值给出 (i,m) 局部重要性度量。