similar to: rpart package

Displaying 20 results from an estimated 50000 matches similar to: "rpart package"

2010 Aug 13
1
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_G<0.5". Thank you in advance! And thanks for Eric who
2010 Aug 19
1
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.
2007 Feb 15
2
Does rpart package have some requirements on the original data set?
Hi, I am currently studying Decision Trees by using rpart package in R. I artificially created a data set which includes the dependant variable (y) and a few independent variables (x1, x2...). The dependant variable y only comprises 0 and 1. 90% of y are 1 and 10% of y are 0. When I apply rpart to it, there is no splitting at all. I am wondering whether this is because of the
2011 Nov 04
1
Decision tree model using rpart ( classification
Hi Experts, I am new to R, using decision tree model for getting segmentation rules. A) Using behavioural data (attributes defining customer behaviour, ( example balances, number of accounts etc.) 1. Clustering: Cluster behavioural data to suitable number of clusters 2. Decision Tree: Using rpart classification tree for generating rules for segmentation using cluster number(cluster id) as target
2009 Jul 26
3
Question about rpart decision trees (being used to predict customer churn)
Hi, I am using rpart decision trees to analyze customer churn. I am finding that the decision trees created are not effective because they are not able to recognize factors that influence churn. I have created an example situation below. What do I need to do to for rpart to build a tree with the variable experience? My guess is that this would happen if rpart used the loss matrix while creating
2006 Aug 09
2
How to draw the decision boundaries for LDA and Rpart object
Hello useR, Could you please tell me how to draw the decision boundaries in a scatterplot of the original data for a LDA or Rpart object. For example: > library(rpart) >fit.rpart <- rpart(as.factor(group.id)~., data=data.frame(Data) ) How can I draw the cutting lines on the orignial Data? Or is there any built in functions that can read the rpart object 'fit.rpart' to do
2011 Apr 08
4
Rpart decision tree
Dear useRs: I try to plot an rpart object but cannot get a nice tree structure plot. I am using plot.rpart and text.rpart (please see below) but the branches that connect the nodes overlap the text in the ellipses and rectangles. Is there a way to get a clean nice tree plot (as in the Rpart Mayo report)? I work under Windows and use R2.11.1 with rpart version 3.1-46. Thank you. Tudor ...
2008 Jan 29
2
rpart error when constructing a classification tree
I am trying to make a decision tree using rpart. The function runs very quickly considering the size of the data (1742, 163). When I call the summary command I get this: > summary(bookings.cart) Call: rpart(formula = totalRev ~ ., data = bookings, method = "class") n=1741 (1 observation deleted due to missingness) CP nsplit rel error 1 0 0 1 Error in yval[, 1] :
2012 Apr 03
1
rpart error message
Hi R-helpers, I am using rpart package for decision tree using R.We are invoking R environment through JRI from our java application.Hence, the result of R command is returned in REXP and we use geterrMessage() to retrieve the error. When we execute the following command, cnr_model<-rpart(as.factor(Species)~Sepal Length+Sepal Width+Petal Length, method="class",
2004 Mar 19
2
Why is rpart() so slow?
I've had rpart running on a problem now for a couple of *days*, but I'd expect a decision tree builder to run in minutes if not seconds. Why is rpart slow? Is there anything I can do to make it quicker?
2010 Oct 12
6
Rpart query
Hi, Being a novice this is my first usage of R. I am trying to use rpart for building a decision tree in R. And I have the following dataframe Outlook Temp Humidity Windy Class Sunny 75 70 Yes Play Sunny 80 90 Yes Don't Play Sunny 85 85 No Don't Play Sunny 72 95 No Don't Play Sunny 69 70 No Play Overcast 72 90 Yes Play Overcast 83 78 No Play Overcast 64 65 Yes Play Overcast 81 75
2004 Jun 11
1
Error when I try to build / plot a tree using rpart()
Hi, I am using the rpart package to build a classification tree. I did manage to build a tree with data on a previous project. However, when attampting to build a tree on a project I am working on, I seem to be getting the error shown below: > nhg3.rp <- rpart(profitresp ~., nhg3, method="class") > plot(nhg3.rp, branch=0.4, uniform=T); text(nhg3.rp, digits=3) Error in
2009 May 08
1
Get (feature, threshold) from Output of rpart() for Stump Tree
Hi, I have a question regarding how to get some partial information from the output of rpart, which could be used as the first argument to predict. For example, in my code, I try to learn a stump tree (decision tree of depth 2):    "fit        <- rpart(y~bx, weights = w/mean(w), control = cntrl)     print(fit)     btest[1,]  <- predict(fit, newdata = data.frame(bx)) " I found
2006 Oct 17
1
Some questions on Rpart algorithm
Hello: I am using rpart and would like more background on how the splits are made and how to interpret results - also how to properly use text(.rpart). I have looked through Venables and Ripley and through the rpart help and still have some questions. If there is a source (say, Breiman et al) on decision trees that would clear this all up, please let me know. The questions below pertain to a
2005 Sep 20
1
Interpretation of csplit from rpart.object
Dear members of R-list, I need to reproduce the rules of a decision tree. For that I need to use the csplit information from the rpart.object. But I cannot uderstand the information because from my example I get: > rpart.tree$csplit [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 3 3 1 3 3 3 [2,] 2 3 3 1 2 2 2 [3,] 1 3 3 1 3 3 3
2011 Aug 29
2
rpart: apply tree to new data to get "counts"
Hi, when I have made a decision tree with rpart, is it possible to "apply" this tree to a new set of data in order to find out the distribution of observations? Ideally I would like to plot my original tree, with the counts (at each node) of the new data. Reagards, Jay
2008 Sep 02
1
rpart: ID3 or C4.5?
Hello, My question is about the algorithm used behind decision tree package rpart. It is not clear in the help if the algorithm used is ID3 or C4.5. Someone has any idea? Regards. Sandro. -- View this message in context: http://www.nabble.com/rpart%3A-ID3-or-C4.5--tp19269303p19269303.html Sent from the R devel mailing list archive at Nabble.com.
2018 Aug 14
2
Xenial rpart package on CRAN built with wrong R version?
Hello, I just upgraded my Ubuntu Xenial system to R 3.5.1 (from 3.4.?) by changing the sources.list entry and doing an "apt-get dist-upgrade". Everything works except loading the rpart package in R: > library(rpart) Error: package or namespace load failed for ?rpart?: package ?rpart? was installed by an R version with different internals; it needs to be reinstalled for use with
2012 Jan 08
2
rpart question
We are trying to make a decision tree using rpart and we are continually running into the following error: > fit_rpart=rpart(ENROLL_YN~MINORITY,method="class") > summary(fit_rpart) Call: rpart(formula = ENROLL_YN ~ MINORITY, method = "class") n= 5725 CP nsplit rel error 1 0 0 1 Error in yval[, 1] : incorrect number of dimensions ENROLL_YN is a
2011 Dec 31
1
Cross-validation error with tune and with rpart
Hello list, I'm trying to generate classifiers for a certain task using several methods, one of them being decision trees. The doubts come when I want to estimate the cross-validation error of the generated tree: tree <- rpart(y~., data=data.frame(xsel, y), cp=0.00001) ptree <- prune(tree, cp=tree$cptable[which.min(tree$cptable[,"xerror"]),"CP"]) ptree$cptable