Hi,
The work around this is to use printRandomForests function in Rattle
package. It outputs the forest in the form of rules.
For ex:
#Load libraries
library(rattle)
library(randomForest)
#Load sample data
data(iris)
#Build a forest
iris.rf <- randomForest(Species ~ ., data=iris,
importance=TRUE
Hi,
I'm trying to extract the rules from every tree in the random forest model
that I've created. I've used randomForest2Rules function from "rattle"
package however I get an error "Error in if (var.class == "character" |
var.class == "factor") { :
argument is of length zero"
Sample code:
libr
2 matches
Mail list logo