If the factor variable is Climate, with 4 possible values: Tropical, Arid, Temperate, Snow, and a node in my rpart
tree is labeled as "Climate:ab", what is the split?
相关问题
- R - Quantstart: Testing Strategy on Multiple Equit
- Using predict with svyglm
- Reshape matrix by rows
- Extract P-Values from Dunnett Test into a Table by
- split data frame into two by column value [duplica
相关文章
- How to convert summary output to a data frame?
- How to plot smoother curves in R
- Paste all possible diagonals of an n*n matrix or d
- ess-rdired: I get this error “no ESS process is as
- How to use doMC under Windows or alternative paral
- dyLimit for limited time in Dygraphs
- Saving state of Shiny app to be restored later
- How to insert pictures into each individual bar in
I assume you use standard way to plot tree which is
As you can read in help to
text.rpart
, argumentpretty
on default factor variables are presented as letters, soa
meanslevels(Climate)[1]
and it means that on left node are observation withClimate==levels(Climate)[1]
and on right the others.You could print levels directly using
but I recommend using
draw.tree
from maptree package:I used fake data to do plots: