문제

I want to use Random forests for attribute reduction. One problem I have in my data is that I don't have discrete class - only continuous, which indicates how example differs from 'normal'. This class attribute is a kind of distance from zero to infinity. Is there any way to use Random forest for such data?

도움이 되었습니까?

해결책

That should be no problem -- RF will just switch to regression mode. Use randomForest function from the randomForest package.
To get object similarity with proximity=TRUE argument, like:

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

To get node-purity (Gini-index like) attribute importance:

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

To get mean MSE increase (accuracy-decrease like) attribute importance:

randomForest(Sepal.Length~.,data=iris,importance=TRUE)$importance[,"%IncMSE"]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top