[R] RandomForest-question about split point and GetTree function

Adam Sanders adamsanders11 at gmail.com
Fri May 6 17:46:56 CEST 2016


I am looking at results of a random forest. In the documentation, it says
the following for categorical variables:

"For categorical predictors, the splitting point is represented by an
integer, whose binary expansion gives the identities of the categories that
goes to left or right. For example, if a predictor has four categories, and
the split point is 13. The binary expansion of 13 is (1, 0, 1, 1) (because
13 = 1 ∗ 2 0 + 0 ∗ 2 1 + 1 ∗ 2 2 + 1 ∗ 2 3 ), so cases with categories 1,
3, or 4 in this predictor get sent to the left, and the rest to the right. "

I am unsure how to interpret this when the splitting point is 0. I was
thinking it means all categories would be to the right. Is this correct?

	[[alternative HTML version deleted]]



More information about the R-help mailing list