similar to: 1-SE rule in mvpart

Displaying 20 results from an estimated 400 matches similar to: "1-SE rule in mvpart"

2010 Feb 26
2
Error in mvpart example
Dear all, I'm getting an error in one of the stock examples in the 'mvpart' package. I tried: require(mvpart) data(spider) fit3 <- rpart(gdist(spider[,1:12],meth="bray",full=TRUE,sq=TRUE)~water+twigs+reft+herbs+moss+sand,spider,method="dist") #directly from ?rpart summary(fit3) ...which returned the following: Error in apply(formatg(yval, digits - 3), 1,
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
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
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 Mar 29
1
regression tree xerror
I am running some models (for the first time) using rpart and am getting results I don't know how to interpret. I'm using cross-validation to prune the tree and the results look like: Root node error: 172.71/292 = 0.59148 n= 292 CP nsplit rel error xerror xstd 1 0.124662 0 1.00000 1.00731 0.093701 2 0.064634 1 0.87534 1.08076 0.092337 3 0.057300 2
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
2008 Mar 01
1
model R^2 and partial R^2 values
Dear R-list members, I am doing a CART analysis in R using the rpart function in the rpart package: Phrag.rpart=rpart(PhragDiff~., data = Phrag, method="anova", xval=10). I used the xerror values in the CP table to prune the tree to 4 nsplits: CP nsplit rel error xerror xstd 1 0.098172 0 1.00000 1.02867 0.12768 2 0.055991 3 0.70548 1.00823 0.12911 3
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
2009 Mar 15
0
mvpart error - is.leaf
Hello, When trying to run mvpart either specifying my own parameters or using the defaults, I get the following error: Error in all(is.leaf) : unused argument(s) (c(FALSE, TRUE, FALSE, FALSE, TRUE, TRUE, TRUE)) As far as I can tell, is.leaf is part of the dendrogam package, so I'm assuming there's some problem with the graphical parameters. However running same formula and data
2010 May 11
1
how to extract the variables used in decision tree
HI, Dear R community, How to extract the variables actually used in tree construction? I want to extract these variables and combine other variable as my features in next step model building. > printcp(fit.dimer) Classification tree: rpart(formula = outcome ~ ., data = p_df, method = "class") Variables actually used in tree construction: [1] CT DP DY FC NE NW QT SK TA WC WD WG WW
2008 Jul 03
1
cross-validation in rpart
Hello list, I'm having a problem with custom functions in rpart, and before I tear my hair out trying to fix it, I want to make sure it's actually a problem. It seems that, when you write custom functions for rpart (init, split and eval) then rpart no longer cross-validates the resulting tree to return errors. A simple test is to use the usersplits.R function to get a simple, custom
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
2003 Apr 10
1
Classification problem - rpart
I am performing a binary classification using a classification tree. Ironically, the data themselves are 2483 tree (real biological ones) locations as described by a suite of environmental variables (slope, soil moisture, radiation load, etc). I want to separate them from an equal number of random points. Doing eda on the data shows that there is substantial difference between the tree and random
2013 Jan 27
2
rpart
Hi, When I look at the summary of an rpart object run on my data, I get 7 nodes but when I plot the rpart object, I get only 3 nodes. Should the number of nodes not match in the results of the 2 functions (summary and plot) or it is not always the same? Look forward to your reply, Carol -------------------------------------------- ?summary(rpart.res) Call: rpart(formula = mydata$class ~ ., data
2012 Dec 07
0
loop for calculating 1-se in rpart
Hi Listers I need to calculate and then plot a frequency histogram of the best tree calculated using the 1-se rule. I have included some code that has worked well for me in the past but it was only for selecting the minimum cross-validation error. I include the code for my model, some relevant output and the code for selecting and plotting the frequency histogram of minimum xerror. Here is the
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
2010 Jun 06
1
I need help in analyzing
I'm sory for my weak english. I need to analyze this subject : x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 y 0 0 1 0 0 1 0 0 1 0 czarne 1 1 0 0 0 0 1 0 0 0 rude 0 0 1 0 0 1 1 0 0 0 braz 0 0 1 0 1 0 1 0 0 0 blond 1 0 0 0 0 1 0 0 0 1 rude 1 1 0 0 0 0 0 0 0 1 blond 0 0 1 1 0 0 0 0 1 0 czarne 1 0 0 1 0 0 1 0 0 0 blond 0 0 1 0 0 1 1 0 0 0 blond 1 0 0 0 0 1 1 0 0 0 czarne 0 0 1 0 0 1 0 0 0 1 czarne 1 0 1 0 0 0
2010 Apr 02
0
(no subject)
> I'm using rpart function for creating regression trees. > now how to measure the fitness of regression tree??? > > thanks n Regards, > Vibha I read R-help as a digest so often come late to a discussion. Let me start by being the first to directly answer the question: > fit <- rpart(time ~ age +ph.ecog,lung) > summary(fit) Call: rpart(formula = time ~ age +
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: