Displaying 20 results from an estimated 10000 matches similar to: "is then an equivalent of partition.tree for rpart?"
2002 Jan 13
1
changing the ordering of leaves in a dendrogram
I'd like to change the way plot.hclust displays an hclust object. Here's
a description of how it's done now, from the R documentation of hclust:
In hierarchical cluster displays, a decision is needed at each merge
to specify which subtree should go on the left and which on the right.
Since, for n observations there are n-1 merges, there are 2^{(n-1)}
possible
2002 Mar 05
1
no labels when plotting dendrograms
I'd like to be able to cut dendrograms at a height I specify
and then plot the resulting subtrees. I wanted to use the
dendrogram object for this purpose because there doesn't seem
to be a canned way to cut a hclust object and get a list of
hclust objects, but there is a function (cut) that does that
for dendrograms. The problem I'm having is that when I plot
a dendrogram, I
2003 Aug 15
0
partition.tree() version for rpart ?
The "tree" package has a nice function partition.tree() for
drawing the (1D or) 2D partition in the case of only (one or)
two predictors {See the examples in help(partition.tree)}.
{and so does S-plus (not in a separate package though)}.
It seems to me that there's no function with similar functionality
available for rpart. Am I mistaken? Has anyone worked on this?
One possible
2011 Apr 08
4
Rpart decision tree
Dear useRs:
I try to plot an rpart object but cannot get a nice tree structure plot. I
am using plot.rpart and text.rpart (please see below) but the branches that
connect the nodes overlap the text in the ellipses and rectangles. Is there
a way to get a clean nice tree plot (as in the Rpart Mayo report)? I work
under Windows and use R2.11.1 with rpart version 3.1-46.
Thank you.
Tudor
...
2008 Jan 29
2
rpart error when constructing a classification tree
I am trying to make a decision tree using rpart. The function runs very
quickly considering the size of the data (1742, 163). When I call the
summary command I get this:
> summary(bookings.cart)
Call:
rpart(formula = totalRev ~ ., data = bookings, method = "class")
n=1741 (1 observation deleted due to missingness)
CP nsplit rel error
1 0 0 1
Error in yval[, 1] :
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
2011 Nov 04
1
Decision tree model using rpart ( classification
Hi Experts,
I am new to R, using decision tree model for getting segmentation rules.
A) Using behavioural data (attributes defining customer behaviour, ( example
balances, number of accounts etc.)
1. Clustering: Cluster behavioural data to suitable number of clusters
2. Decision Tree: Using rpart classification tree for generating rules for
segmentation using cluster number(cluster id) as target
2009 Dec 14
1
RPART - printing full splitting rule number on tree plot
Dear R-users
I am using RPART package to get regression trees. However having trouble getting the text function to put the full splitting rule number on the plot, instead to puts it in scientific notation. When a covariate has 1e4 or greater number of digits then the splitting rule number displayed on the plot is in scientific notation. But print.rpart displays the splitting rules in full.
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
2005 May 04
1
Difference between "tree" and "rpart"
In the help for rpart it says, "This differs from the tree function
mainly in its handling of surrogate variables." And it says that an
rpart object is a superset of a tree object. Both cite Brieman et al.
1984. Both call external code which looks like martian poetry to me.
I've seen posts in the archives where BDR, and other knowledgeable
folks, have said that rpart() is to be
2007 Dec 19
1
library(rpart) or library(tree)
Hi,
I have a problem with library (rpart) (and/or library(tree)).
I use a data.frame with variables
"pnV22" (observation: 1, 0 or yes, no)
"JTemp" (mean temperature)
"SNied" (summer rain)
I used function "rpart" to build a model:
library(rpart)
attach(data.frame)
result <- rpart(pnV22 ~ JTemp + SNied)
I got the following tree:
n=55518 (50
2004 Nov 10
1
Does something like partition.rpart() exist?
I'd like to create a bidimensional presentation of a classification tree
built using the rpart() function. I've seen that a partition.tree()
function exists for the tree() function. Does a similar function exist
for the rpart() function?
Thanks a lot Simone Vantini
2009 May 08
1
Get (feature, threshold) from Output of rpart() for Stump Tree
Hi,
I have a question regarding how to get some partial information
from the output of rpart, which could be used as the first argument to
predict. For example, in my code, I try to learn a stump tree (decision
tree of depth 2):
"fit <- rpart(y~bx, weights = w/mean(w), control = cntrl)
print(fit)
btest[1,] <- predict(fit, newdata = data.frame(bx)) "
I found
2010 Dec 14
1
rpart - how to estimate the “meaningful” predictors for an outcome (in classification trees)
Hi dear R-help memebers,
When building a CART model (specifically classification tree) using rpart,
it is sometimes obvious that there are variables (X's) that are meaningful
for predicting some of the outcome (y) variables - while other predictors
are relevant for other outcome variables (y's only).
*How can it be estimated, which explanatory variable is "used" for which of
2011 Sep 07
2
rpart/tree issue
I am trying to create a classification tree using either tree or rpart
but when it comes to plotting the results the formatting I get is
different than what I see in all the tutorials. What I would like to
see is the XX/XX format but all I get is a weird decimal value. I was
also wondering how you know which is yes and which is no in each leaf of
the tree? Is yes always on the left?
2004 Apr 29
1
RPART drawing the tree
Hello,
I am using the RPART library to find patterns in HIV mutations regarding
drug-resistancy.
My data consists of aminoacid at certain locations and two classes resistant
and susceptible.
The classification and pruning work fine with Rpart. however there is a
problem with displaying the data as a tree in the display window.
in the display window the data contain only levels at the splits
2006 May 15
1
analysis of binomial data with rpart/tree
Hi all,
I am using the rpart library to construct wildlife distribution models.
As many of the sites that we have sampled have been sampled over many
years, we would like to evaluate binomial responses (number of years
that the species was present vs. number of years it was absent at a
particular site). Does anybody know if the rpart function can evaluate
binomial responses? If not, are there
2007 Sep 10
1
using bootstrap for tree selection step in rpart
Hi
I was wondering if someone could help me with an rpart problem. I can see
that cross-validation is the default for tree selection in rpart -- has a
bootstrap method been implemented anywhere? I think this is a different
thing to 'bagging' or 'boosting' -- I still want 'one' tree at the end, I
just would like it chosen using a bootstrap method. Any ideas???
Thanks
2011 Aug 29
2
rpart: apply tree to new data to get "counts"
Hi,
when I have made a decision tree with rpart, is it possible to "apply"
this tree to a new set of data in order to find out the distribution
of observations? Ideally I would like to plot my original tree, with
the counts (at each node) of the new data.
Reagards,
Jay
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]]