[R] Re-evaluating the tree in the random forest
Martin Lam
tmlammail at yahoo.com
Thu Sep 8 19:50:30 CEST 2005
Dear mailinglist members,
I was wondering if there was a way to re-evaluate the
instances of a tree (in the forest) again after I have
manually changed a splitpoint (or split variable) of a
decision node. Here's an illustration:
library("randomForest")
forest.rf <- randomForest(formula = Species ~ ., data
= iris, do.trace = TRUE, ntree = 3, mtry = 2,
norm.votes = FALSE)
# I am going to change the splitpoint of the root node
of the first tree to 1
forest.rf$forest$xbestsplit[1,]
forest.rf$forest$xbestsplit[1,1] <- 1
forest.rf$forest$xbestsplit[1,]
Because I've changed the splitpoint, some instances in
the leafs are not supposed where they should be. Is
there a way to reappoint them to the correct leaf?
I was also wondering how I should interpret the output
of do.trace:
ntree OOB 1 2 3
1: 3.70% 0.00% 6.25% 5.88%
2: 3.49% 0.00% 3.85% 7.14%
3: 3.57% 0.00% 5.56% 5.26%
What's OOB and what does the percentages mean?
Thanks in advance,
Martin
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
More information about the R-help
mailing list