Displaying 20 results from an estimated 4000 matches similar to: "Question on cross-validation in rpart"
2012 Feb 17
1
Different cp values in rpart() using plotcp() and printcp()
hi,
I have a question regarding cp values in rpart(). When I use plotcp() I get
a figure with cp values on the x-axsis, but then I use printcp() the cp
values in that list are different from the values in the figure by
plotcp(). Does someone know why?
Silje
[[alternative HTML version deleted]]
2010 May 03
1
rpart, cross-validation errors question
I ran this code (several times) from the Quick-R web page (
http://www.statmethods.net/advstats/cart.html) but my cross-validation
errors increase instead of decrease (same thing happens with an unrelated
data set).
Why does this happen?
Am I doing something wrong?
# Classification Tree with rpart
library(rpart)
# grow tree
fit <- rpart(Kyphosis ~ Age + Number + Start,
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
2010 Oct 12
2
repeating an analysis
Hi All,
I have to say upfront that I am a complete neophyte when it comes to
programming. Nevertheless I enjoy the challenge of using R because of its
incredible statistical resources.
My problem is this .........I am running a regression tree analysis using
"rpart" and I need to run the calculation repeatedly (say n=50 times) to
obtain a distribution of results from which I will pick
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
2010 Aug 03
1
R: classification tree model!
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20100803/9fb28807/attachment.pl>
2009 Jun 09
3
rpart - the xval argument in rpart.control and in xpred.rpart
Dear R users,
I'm working with the rpart package and want to evaluate the performance of
user defined split functions.
I have some problems in understanding the meaning of the xval argument in
the two functions rpart.control and xpred.rpart. In the former it is defined
as the number of cross-validations while in the latter it is defined as the
number of cross-validation groups. If I am
2001 Nov 14
3
rpart:plotcp doesn't allow ylim argument (PR#1171)
Full_Name: Gregory R. Warnes
Version: R 1.3.1
OS: Solaris 2.8
Submission from: (NULL) (192.77.198.200)
rpart library version 3.1-2
Error message:
> plotcp(fit.thirds.1,ylim=c(0.7,1.5));
Error in plot.default(ns, xerror, axes = FALSE, xlab = "cp", ylab = "X-val
Relative Error", :
formal argument "ylim" matched by multiple actual arguments
>
This can be
2011 Mar 19
2
cross-validation in rpart
I am trying to find out what type of sampling scheme is used to select the 10
subsets in 10-fold cross-validation process used in rpart to choose the best
tree. Is it simple random sampling? Is there any documentation available on
this?
Thanks, Penny.
--
View this message in context: http://r.789695.n4.nabble.com/cross-validation-in-rpart-tp3389329p3389329.html
Sent from the R help mailing list
2010 Mar 12
1
using xval in mvpart to specify cross validation groups
Dear R's
I'm trying to use specific rather than random cross-validation groups
in mvpart.
The man page says:
xval Number of cross-validations or vector defining cross-validation groups.
And I found this reply to the list by Terry Therneau from 2006
The rpart function allows one to give the cross-validation groups explicitly.
So if the number of observations was 10, you could use
2009 May 12
1
questions on rpart (tree changes when rearrange the order of covariates?!)
Greetings,
I am using rpart for classification with "class" method. The test data is
the Indian diabetes data from package mlbench.
I fitted a classification tree firstly using the original data, and then
exchanged the order of Body mass and Plasma glucose which are the
strongest/important variables in the growing phase. The second tree is a
little different from the first one. The
2009 May 22
1
bug in rpart?
Greetings,
I checked the Indian diabetes data again and get one tree for the data with
reordered columns and another tree for the original data. I compared these
two trees, the split points for these two trees are exactly the same but the
fitted classes are not the same for some cases. And the misclassification
errors are different too. I know how CART deal with ties --- even we are
using the
2003 Jul 17
1
Rpart question - labeling nodes with something not in x$frame
I have a tree created with
tr.hh.logcas <- rpart(log(YCASSX + 1)~AGE+DRUGUSEY+SEX+OBSXNUM +WINDLE,
xval = 10)
I would like to label the nodes with YCASSX rather than log(YCASSX +
1). But the help file for text in library rpart says that you can only
use labels that are part of x$frame, which YCASSX is not.
Is there a way to do what I want?
Thanks in advance
Peter
Peter L. Flom, PhD
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",
2010 Mar 05
1
I can't find "rpart" help (linux)
Hi
I have installed rpart in my Linux (PLD) but I don't know how I may find
help conect this package?
Here is my instalaction:
> install.packages("rpart",dependencies=TRUE)
--- Please select a CRAN mirror for use in this session ---
trying URL 'http://r.meteo.uni.wroc.pl/src/contrib/rpart_3.1-46.tar.gz'
Content type 'application/x-gzip' length 136572 bytes (133
2006 Dec 28
3
CV by rpart/mvpart
Dear R-list,
I am using the rpart/mvpart-package for selecting a right-sized regression tree by 10-fold cross-validation. My question: Is there a possibility to find out for every observation in which of the ten folds it is lying? I want to use the same folds for validating another regression method (moving averages) in order to choose the better one.
Thanks a lot,
Pedro
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
2005 Oct 14
1
Predicting classification error from rpart
Hi,
I think I'm missing something very obvious, but I am missing it, so I
would be very grateful for help. I'm using rpart to analyse data on
skull base morphology, essentially predicting sex from one or several
skull base measurements. The sex of the people whose skulls are being
studied is known, and lives as a factor (M,F) in the data. I want to
get back predictions of gender, and
2007 Feb 26
2
survival analysis using rpart
Hello,
I use rpart to predict survival time and have a problem in interpreting the
output of ?estimated rate?. Here is an example of what I do:
> stagec <-
> read.table("http://www.stanford.edu/class/stats202/DATA/stagec.data",
> col.names=c("pgtime", "pgstat", "age","eet", "g2", "grade", "gleason",
>
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.