pix*_*xel 4 statistics r machine-learning feature-selection random-forest
我想使用随机森林来减少属性.我的数据中存在的一个问题是我没有离散类 - 仅连续,这表示示例与"正常"的不同之处.此类属性是从零到无穷大的一种距离.有没有办法使用随机森林这样的数据?
这应该没问题 - RF只会切换到回归模式.使用包中的randomForest功能randomForest.
要使proximity=TRUE参数与对象相似,例如:
randomForest(Sepal.Length~.,data=iris,proximity=TRUE)$proximity
Run Code Online (Sandbox Code Playgroud)
要获得节点纯度(类似Gini索引)属性重要性:
randomForest(Sepal.Length~.,data=iris)$importance[,"IncNodePurity"]
Run Code Online (Sandbox Code Playgroud)
为了获得平均MSE增加(精确度降低)属性重要性:
randomForest(Sepal.Length~.,data=iris,importance=TRUE)$importance[,"%IncMSE"]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1883 次 |
| 最近记录: |