similar to: User defined split function in Rpart

Displaying 20 results from an estimated 10000 matches similar to: "User defined split function in Rpart"

2007 Jan 03
1
User defined split function in Rpart
Dear all, I'm trying to manage with user defined split function in rpart (file rpart\tests\usersplits.R in http://cran.r-project.org/src/contrib/rpart_3.1-34.tar.gz - see bottom of the email). Suppose to have the following data.frame (note that x's values are already sorted) > D y x 1 7 0.428 2 3 0.876 3 1 1.467 4 6 1.492 5 3 1.703 6 4 2.406 7 8 2.628 8 6 2.879 9 5 3.025 10 3 3.494
2005 May 25
0
Error with user defined split function in rpart (PR#7895)
Full_Name: Bill Wheeler Version: 2.0.1 OS: Windows 2000 Submission from: (NULL) (67.130.36.229) The program to reproduce the error is below. I am calling rpart with a user-defined split function for a binary response variable and one continuous independent variable. The split function works for some datasets but not others. The error is: Error in "$<-.data.frame"(`*tmp*`,
2009 May 14
0
Rpart - user defined split functions
Dear all, I'm writing my own method to be used in Rpart by defining the list of functions named init, split and eval. I'm following the example given in the file 'tests/usersplits.R' in the sources. By now I'm able to define the split function (and it works correctly in the tree construction) while I have some problems with the init and the eval function. The task I'm
2009 May 26
0
cross-validation in rpart
Dear R users, I know cross-validation does not work in rpart with user defined split functions. As Terry Therneau suggested, one can use the xpred.rpart function and then summarize the matrix of the predicted values into a single "goodness" value. I need only a confirmation: set for example xval=10, if I correctly understood a single column of the matrix obatined by xpred.rpart gives
2002 Aug 28
0
user defined function in rpart
Hi, I am trying to use the rpart library with my own set of functions on a survival object. I get an immeadiate segmentation fault when i try calling rpart with my list of functions. I get the same problem with the logrank example from Therneau,s S-rpart library though their anova example works. Should I report this as a bug, as even if my functions are structured improperly, that should lead to
2010 Apr 11
0
plotting rpart objects, text.rpart, fancy option
I have created plots of rpart objects with the fancy option for text.rpart ("fancy" creates ellipses and rectangles and labels branches with splitting criteria). The ellipses and rectangles are supposed to "interrupt" the tree lines (as seen in Therneau and Atkinson 1997, page 48, Fig. 18, http://www.mayo.edu/hsr/techrpt/61.pdf), but they do not, even when I use Therneau and
2014 Aug 18
0
patch for rpart
On 08/14/2014 05:00 AM, r-devel-request at r-project.org wrote: > Dear list > > > For my work, it would be helpful if rpart worked seamlessly with an > empty model: > > library(rpart); rpart(formula=y~0, data=data.frame(y=factor(1:10))) > > Currently, an unrelated error (originating from na.rpart) is thrown. > > At some point in the near future, I'd like to
2001 Jul 26
0
tree and rpart
There have been various messages about packages tree and rpart whilst I have been travelling, and I have now prepared updates. tree ==== Tree is one of the oldest packages on CRAN (Feb 2000 apart from adding the maintainer field), and I had been hoping that it would fade away in favour of rpart. 1) sys.parent needed to be replaced by parent.frame in all but the most recent R (post 1.3.0).
2011 Jan 11
0
Some questions concerning survival tree analysis using the rpart module
All the documentation that I have on survival splitting is found in the technical report you mention. However, there is both a short form and a long form of this on our web site, did you get the larger one (52 pages)? I admit it is not a lot. There are no other split algorithms implimented for survival data. It would be possible to add your own. Attached is a slightly updated version of the
2011 Mar 07
0
Re transaction list transformation to use rpart.
> However the as.data.frame(a) transforms the matrix into a numeric > data.frame so when I implement the rpart algorithm it automatically > returns a regression classification tree. Look at help(rpart). The program uses the type of the y variable to GUESS at what you want for the "method" argument. It often guesses wrong. Simply add method="class" as an
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:
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,
2011 Dec 05
0
Partitioning Around Mediods then rpart to follow
Yes, that seems like a sensible idea to me. Terry Therneau On Sat, 2011-12-03 at 12:00 +0100, r-help-request at r-project.org wrote: > The problem: There are no a priori groupings to run a classification > on > > My solution: > > This is a non-R code question, so I appreciate any thoughts. I have > used pam in the cluster package proceeded by sillohouette to find the
2010 Apr 30
1
how is xerror calculated in rpart?
Hi, I've searched online, in a few books, and in the archives, but haven't seen this. I believe that xerror is scaled to rel error on the first split. After fitting an rpart object, is it possible with a little math to determine the percentage of true classifications represented by a xerror value? -seth -- View this message in context:
2004 Feb 17
0
New package -- mvpart
The package mvpart is now available. mvpart includes partitioning based on (1) multivariate numeric responses and (2) dissimilarity matrices. The package mvpart is a modification of rpart -- -- authors of original: Terry M Therneau and Beth Atkinson <atkinson at mayo.edu>, and R port of rpart Brian Ripley <ripley at stats.ox.ac.uk>. Includes some modified routines from vegan --
2004 Feb 17
0
New package -- mvpart
The package mvpart is now available. mvpart includes partitioning based on (1) multivariate numeric responses and (2) dissimilarity matrices. The package mvpart is a modification of rpart -- -- authors of original: Terry M Therneau and Beth Atkinson <atkinson at mayo.edu>, and R port of rpart Brian Ripley <ripley at stats.ox.ac.uk>. Includes some modified routines from vegan --
2005 May 18
0
User defined split function in rpart
In the function rpart, users can define their own split function by creating functions init, eval, and split. For method='anova', I have examples of these functions. I would like to create these functions for the case method='class'. Does anyone know how the init, eval, and split functions would be written? Thank you. Bill
2006 Sep 25
2
rpart
Dear r-help-list: If I use the rpart method like cfit<-rpart(y~.,data=data,...), what kind of tree is stored in cfit? Is it right that this tree is not pruned at all, that it is the full tree? If so, it's up to me to choose a subtree by using the printcp method. In the technical report from Atkinson and Therneau "An Introduction to recursive partitioning using the rpart
2007 Feb 18
3
User defined split function in rpart
Dear R community, I am trying to write my own user defined split function for rpart. I read the example in the tests directory and I understand the general idea of the how to implement user defined splitting functions. However, I am having troubles with addressing the data frame used in calling rpart in my split functions. For example, in the evaluation function that is called once per node,
2003 Jun 17
1
User-defined functions in rpart
This question concerns rpart's facility for user-defined functions that accomplish splitting. I was interested in modifying the code so that in each terminal node, a linear regression is fit to the data. It seems that from the allowable inputs in the user-defined functions, that this may not be possible, since they have the form: function(y, wt, parms) (in the case of the