similar to: rpart

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

2005 Jan 25
3
multi-class classification using rpart
Hi, I am trying to make a multi-class classification tree by using rpart. I used MASS package'd data: fgl to test and it works well. However, when I used my small-sampled data as below, the program seems to take forever. I am not sure if it is due to slowness or there is something wrong with my codes or data manipulation. Please be advised ! The data is described as the output from str()
2005 Jan 06
1
multiple trees
Hi, there: I made a function to do k-fold cross-validation as below. Basically whenever I call cv(test) for example, an error message like: 20Fold 1 Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ please help. My test dataset has 142 variables, the last one is a categorical response variable. also, i am not sure how to save
2011 Jun 13
1
In rpart, how is "improve" calculated? (in the "class" case)
Hi all, I apologies in advance if I am missing something very simple here, but since I failed at resolving this myself, I'm sending this question to the list. I would appreciate any help in understanding how the rpart function is (exactly) computing the "improve" (which is given in fit$split), and how it differs when using the split='information' vs split='gini'
2002 Mar 29
1
memory error with rpart()
Dear all, I have a 100 iteration loop. Within each loop, there are some calls to rpart() like: ctl <- rpart.control(maxcompete=0, maxsurrogate=0, maxdepth=10) temp <- rpart(y~., x, w=wt, method="class", parms=list(split="gini"), control=ctl) res <- log(predict.rpart(temp, type="prob")) newres <- log(predict.rpart(temp, newdata=newx,
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",
2005 Jan 25
0
Collapsing solution to the question discussed above: Re: multi-class classification using rpart
You could break your 3 class problem into several (2 or 3) 2 class problems, and then use Andy's suggestion (see the CART book). There are several ways to break the problem into 2 class problems, and several ways to combine the resulting classifiers. Tom Dietterich, Jerry Friedman, Trevor Hastie and Rob Tibshirani, among others, have articles on the question, in places like Annals of
2005 Aug 26
1
Help in Compliling user -defined functions in Rpart
I have been trying to write my own user defined function in Rpart.I imitated the anova splitting rule which is given as an example.In the work I am doing ,I am calculating the concentration index(ci) ,which is in between -1 and +1.So my deviance is given by abs(ci)*(1-abs(ci)).Now when I run rpart incorporating this user defined function i get the following error message: Error in
2007 Jul 08
1
rpart weight prior
Hi! Could you please explain the difference between "prior" and "weight" in rpart? It seems to be the same. But in this case why including a weight option in the latest versions? For an unbalanced sampling what is the best to use : weight, prior or the both together? Thanks a lot. Aur?lie Davranche.
2002 Jan 25
0
rpart subsets
A few weeks back I posted that the subset feature of rpart was not working when predicting a categorical variable. I was able to figure out a simple solution to the problem that I hope can be included in future editions of rpart. I also include a fix for another related problem. The basic problem is that when predicting a categorical using a subset, the subset may not have all the categories
2011 Jun 21
0
How does rpart computes "improve" for split="information"?? (which seems to be different then the "gini" case)
Hello dear R-help members, I would appreciate any help in understanding how the rpart function computes the "improve" (which is given in fit$split) when using the split='information' parameter. Thanks to Professor Atkinson help, I was able to find how this is done in the case that split='gini'. By following the explanation here:
2002 Jan 28
0
rpart subset fix
(Apparently, I posted this to the wrong place. I am hopefully posting this is the correct place now. If not, please advise.) A few weeks back I posted that the subset feature of rpart was not working when predicting a categorical variable. I was able to figure out a simple solution to the problem that I hope can be included in future editions of rpart. I also include a fix for another related
2001 Aug 12
2
rpart 3.1.0 bug?
I just updated rpart to the latest version (3.1.0). There are a number of changes between this and previous versions, and some of the code I've been using with earlier versions (e.g. 3.0.2) no longer work. Here is a simple illustration of a problem I'm having with xpred.rpart. iris.test.rpart<-rpart(iris$Species~., data=iris[,1:4], parms=list(prior=c(0.5,0.25, 0.25))) + ) >
2009 May 21
1
Rpart - best split selection for class method and Gini splitting index
Dear R-users, I'm working with the Rpart package and trying to understand how the procedure select the best split in the case the method "class" and the splitting index "Gini" are used. In particular I'd like to have look to the source code that works out the best split for un unordered predictor. Does anyone can suggest me which functions in the sources I should
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
2004 Jun 04
1
rpart
Hello everyone, I'm a newbie to R and to CART so I hope my questions don't seem too stupid. 1.) My first question concerns the rpart() method. Which method does rpart use in order to get the best split - entropy impurity, Bayes error (min. error) or Gini index? Is there a way to make it use the entropy impurity? The second and third question concern the output of the printcp() function.
2011 Jan 24
1
How to measure/rank ?variable importance when using rpart?
--- included message ---- Thus, my question is: *What common measures exists for ranking/measuring variable importance of participating variables in a CART model? And how can this be computed using R (for example, when using the rpart package)* ---end ---- Consider the following printout from rpart summary(rpart(time ~ age + ph.ecog + pat.karno, data=lung)) Node number 1: 228 observations,
2009 Apr 30
1
unexpected behavior of rpart 3.1-43, loss matrix
Hi, I just noticed that rpart behaves unexpectecly, when performing classification learning and specifying a loss matrix. if the response variable y is a factor and if not all levels of the factor occur in the observations, rpart exits with an error: > df=data.frame(attr=1:5,class=factor(c(2,3,1,5,3),levels=1:6)) > rpart(class~attr,df,parms=list(loss=matrix(0,6,6))) Error in
1999 Dec 23
1
rpart on Alpha under OSF
Running on an Alpha machine which reports (uname -a) OSF1 bsdx01.bs.ehu.es V4.0 878 alpha and using the binary distribution put together by Albrecht Gebhardt (in http://cran.at.r-project.org/bin/osf/osf4.0/tar/alpha_ev5/) I obtain core dumps whenever I try to use package rpart. I have R REMOVE'd the rpart package, downloaded the source rpart_1.0-7.tar from CRAN and
2004 Jul 16
3
rpart and TREE, can be the same?
Hi, all, I am wondering if it is possible to set parameters of 'rpart' and 'tree' such that they will produce the exact same tree? Thanks. Auston Wei Statistical Analyst Department of Biostatistics and Applied Mathematics The University of Texas MD Anderson Cancer Center Tel: 713-563-4281 Email: wwei@mdanderson.org [[alternative HTML version deleted]]
2003 Sep 29
1
CP for rpart
Hi All, I have some questions on using library rpart. Given my data below, the plotcp gives me increasing 'xerrors' across different cp's with huge xstd (plot attached). What causes the problem or it's not a problem at all? I am thinking 'xerror's should be decreasing when 'cp' gets smaller. Also what the 'xstd' really tells us? If the error bars for