r - Random forest output interpretation -



r - Random forest output interpretation -

i have run random forest info , got output in form of matrix. rules applied classify?

p.s. want profile of client output, e.g. person new york, works in technology industry, etc.

how can interpret results random forest?

looking @ rules applied each individual tree

assuming utilize randomforest bundle how access fitted trees in forest.

library(randomforest) data(iris) rf <- randomforest(species ~ ., iris) gettree(rf, 1)

this show output of tree #1 of 500:

left girl right girl split var split point status prediction 1 2 3 3 2.50 1 0 2 0 0 0 0.00 -1 1 3 4 5 4 1.65 1 0 4 6 7 4 1.35 1 0 5 8 9 3 4.85 1 0 6 0 0 0 0.00 -1 2 ...

you start reading @ first line describes root split. root split based on variable 3, i.e. if petal.length <= 2.50 go on left girl node (line 2) , if petal.length > 2.50 go on right girl node (line 3). if status of line -1, on line 2, means have reached leaf , create prediction, in case class 1, i.e. setosa.

it written in manual have @ ?randomforest , ?gettree more details.

looking @ variable importance across whole forest

have @ ?importance , ?varimpplot. gives single score per variable aggregated across whole forest.

> importance(rf) meandecreasegini sepal.length 10.03537 sepal.width 2.31812 petal.length 43.82057 petal.width 43.10046

r profiling output random-forest

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -