[R] decision tree display
I am using plot and text commands to display the decision tree I built, here is the code: plot(fit, compress=TRUE) text(fit, use.n=TRUE) but the the result of this code is not readable. Text doesn't get fully displayed (missing on the margines and overlapping in the middle). Where can I get info on how to adjust the tree display and text size display? Please help. Thank you! Olga [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] decision tree finetune
My decision tree grows only with one split and based on what I see in E-Miner it should split on more variables. How can I adjust splitting criteria in R? Also is there way to indicate that some variables are binary, like variable Info_G is binary so in the results would be nice to see 2) Info_G=0 instead of 2) Info_G0.5. Thank you in advance! And thanks for Eric who helped with my previous question about starting rpart. Olga fit - rpart(Retention ~ Info_G+AOPD+Mail+Xref_Umbr+Ins_Age+Discount+Xref_A + Con6 + + Con5 +Con4 + + Con3 + Con2 + + Con1 , data=Home,control=rpart.control(minsplit=5)) fit n= 48407 node), split, n, deviance, yval * denotes terminal node 1) root 48407 4730.642 0.8902225 2) Info_G 0.5 14280 1999.293 0.8316527 * 3) Info_G=0.5 34127 2661.865 0.9147303 * [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] decision tree finetune
I figured it out myself, here it is: control=rpart.control(cp=.001)) Thank you! On Fri, Aug 13, 2010 at 12:58 PM, Olga Shaganova olga.sha...@gmail.comwrote: My decision tree grows only with one split and based on what I see in E-Miner it should split on more variables. How can I adjust splitting criteria in R? Also is there way to indicate that some variables are binary, like variable Info_G is binary so in the results would be nice to see 2) Info_G=0 instead of 2) Info_G0.5. Thank you in advance! And thanks for Eric who helped with my previous question about starting rpart. Olga fit - rpart(Retention ~ Info_G+AOPD+Mail+Xref_Umbr+Ins_Age+Discount+Xref_A + Con6 + + Con5 +Con4 + + Con3 + Con2 + + Con1 , data=Home,control=rpart.control(minsplit=5)) fit n= 48407 node), split, n, deviance, yval * denotes terminal node 1) root 48407 4730.642 0.8902225 2) Info_G 0.5 14280 1999.293 0.8316527 * 3) Info_G=0.5 34127 2661.865 0.9147303 * [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] rpart package
Hi, I am a brand new user and may be my question is too simple. I have R on our (not Unix) server. I am trying to build a decision tree and the error message says couldn't find function rpart. Does it mean I have to ask our server guy to install an additional package? Thank you, Olga [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.