我想使用随机森林来减少归因。我的数据中有一个问题是我没有离散类 - 仅连续,这表明示例与“正常”有何不同。此类属性是从零到无穷大的距离。有什么方法可以将随机森林用于此类数据?

有帮助吗?

解决方案

这应该没问题 - RF将切换到回归模式。采用 randomForest 来自 randomForest 包裹。
获得对象相似性 proximity=TRUE 论点,例如:

randomForest(Sepal.Length~.,data=iris,proximity=TRUE)$proximity

要获得node-purity(gini index like)属性重要性:

randomForest(Sepal.Length~.,data=iris)$importance[,"IncNodePurity"]

为了获得平均MSE增加(准确性消除)属性重要性:

randomForest(Sepal.Length~.,data=iris,importance=TRUE)$importance[,"%IncMSE"]
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top