Displaying 13 results from an estimated 13 matches for "plotcp".
Did you mean:
plotci
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]]
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 corrected by adding ylim to the list of formal argument and
w...
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 erro...
2001 Sep 14
0
rpart or Postscript problem?
I've run into another postscript/rpart problem unrelated to the issues I've
mentioned in a previous query.
I'm using 1.3.1 on a Win2K box.
>plotcp(some.rpart.object)
draws a very nice plot on the windows graphic device. If I save this as a
postscript file, either by opening a postscript device before calling
plotcp, or by saving the graphics window as a postscript file, the
resulting file is not properly interpreted by Adobe Illustrator...
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>
2010 May 03
1
rpart, cross-validation errors question
...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,
method="class", data=kyphosis)
printcp(fit) # display the results
plotcp(fit) # visualize cross-validation results
Thank you,
Claudia
[[alternative HTML version deleted]]
2008 Dec 17
1
pruning trees using rpart
Hi,
I am using the packages tree and rpart to build a classification tree to
predict a 0/1 outcome. The package rpart has the advantage that the function
plotcp gives a visual representation of the cross-validation results with a
horizontal line indicating the 1 standard error rule, i.e. the
recommendation to select the most parsimonious model (the smallest tree)
whose error is not more than one standard error above the error of the best
model.
However, i...
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
2006 Nov 02
1
Question on cross-validation in rpart
Hi R folks,
I am using R version 2.2.1 for Unix. I am exploring the rpart function,
in particular the rpart.control parameter. I have tried using different
values for xval (0, 1, 10, 20) leaving other parameters constant but I
receive the same tree after each run. Is the10 fold cross-validation
default still running every time? I would expect the trees to change at
least a little when I
2010 Apr 19
0
help in output file
HI, Dear R-community,
I AM using the following codes to grow tree and plot tree:
# Classification Tree with rpart
library(rpart)
pdf(file="/home/cdu/changbin/dimer_tree.pdf")
# grow tree
fit.dimer <- rpart(outcome ~ ., method="class", data=p.dimer[,2:402])
plotcp(fit.dimer) # visualize cross-validation results
# plot tree
plot(fit.dimer, uniform=TRUE, main="Classification Tree for AA.dimer")
text(fit.dimer, use.n=TRUE, all=TRUE, cex=.8)
dev.off()
But when I open in the pdf file, I found the right side of tree is not shown
up, also part of the...
2010 Mar 24
0
how to solve error in precict( ) while using with rpart?
Hello,
I am working with rpart function but geting some error in prediction.
the same code works fine with iris dataset.
but applying other dataset it doesn't work.
sample code is given for reference.
> acc_model<-rpart(V1~V2+V3+V4+V5+V6+V7+V8, data=accEx.train)
> plotcp(acc_model)
>
acc_find_cp<-(acc_model$cptable)[,"CP"][which.min(acc_model$cptable[,"xerror"])]
> acc_prune_model<-prune(acc_model,acc_find_cp)
> acc_predict_tree<-predict(acc_prune_model,newdata=accEx.test,
type="class")
Error in predict.rpart(acc_prun...
2000 Mar 27
1
Behavior different inside function?
...- read.table(file=dsn, header=T)
rownames(ds) <- ds$unit
nmavgres <- ds$mavgres * 1000
nravgres <- ds$ravgres * 1000
ds.mrpt <- rpart(formula=fm1, data=ds, control=rpart.control(minbucket=20))
plot(prune(ds.mrpt, cp=0.018))
text(prune(ds.mrpt, cp=0.018), digits=2)
wait()
plotcp(ds.mrpt)
wait()
post.rpart(prune(ds.mrpt, cp=0.018),
title=c(tit, paste("SES Quartile", sesnum, sep=" ",
collapse=NULL)), pretty=0,
filename=psn, horizontal=F, height=9, digits=3, pointsize=10)
}
doit("fspci", 1, "Parent Involvement...
2010 Mar 24
0
R-help ordinal regression
...rpart function but geting some error in
> prediction.
> the same code works fine with iris dataset.
>
> but applying other dataset it doesn't work.
> sample code is given for reference.
>
> > acc_model<-rpart(V1~V2+V3+V4+V5+V6+V7+V8,
> data=accEx.train)
> > plotcp(acc_model)
> >
> acc_find_cp<-(acc_model$cptable)[,"CP"][which.min(acc_model$cptable[,"xerror"])]
> > acc_prune_model<-prune(acc_model,acc_find_cp)
> >
> acc_predict_tree<-predict(acc_prune_model,newdata=accEx.test,
> type="class")
&...