Displaying 20 results from an estimated 7000 matches similar to: "rpart: apply tree to new data to get "counts""
2009 Feb 23
1
why results from regression tree (rpart) are totally inconsistent with ordinary regression
Hi,
In my analysis of impacts of insecticide-treated bednets on malaria, I
look at the relationship between malaria incidence and mosquito
behaviors. The condensed data set is copied here. Ordinary regression
(lm) shows that Incidence was negatively related to Mortality. This
makes sense because the latter reflected the strength of killing
mosquitoes by insecticide-treated nets. Since the
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?
2011 Jul 04
3
modification of cross-validations in rpart
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/20110704/68ecf4d2/attachment.pl>
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
2011 Aug 25
2
rpart: plot without scientific notation
While I'm very pleased with the results I get with rpart and
rpart.plot, I would like to change the scientific notation of the
dependent variable in the plots into integers. Right now all my 5 or
more digit numbers are displayed using scientific notation.
I managed to find this:
http://tolstoy.newcastle.edu.au/R/e8/help/09/12/8423.html
but I do not fully understand what to change, and to
2009 Feb 25
1
problems with arrangement of figures by layout function
Hi,
I want to have histograms behind the regression tree figure.
Since 7 leafs resulted from the tree model (rpart), it would be nice to
have correspondent histograms below the tree figure. After a little
study, I could generate the correspondent histogram for each leaf, but
can't figure out how to arrange them in the right place. I tried
something like
2009 Feb 03
5
Large file size while persisting rpart model to disk
I am using rpart to build a model for later predictions. To save the
prediction across restarts and share the data across nodes I have been
using "save" to persist the result of rpart to a file and "load" it
later. But the saved size was becoming unusually large (even with
binary, compressed mode). The size was also proportional to the amount
of data that was used to create the
2011 Aug 08
1
Classification trees problem.
Hello Everyone,
I'm doing a Classification trees with categorical explanatory variables using library rpart and I would like to do a prediction for some data imputs. I don't know where's a function or how can I do it?. Is there someone can help ?? ¿. Here's the code that I'm using.
library(rpart)
fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis)
plot(fit)
2012 Mar 04
1
rpart package, text function, and round of class counts
I run the following code:
library(rpart)
data(kyphosis)
fit <- rpart(Kyphosis ~ ., data=kyphosis)
plot(fit)
text(fit, use.n=TRUE)
The text labels represent the count of each class at the leaf node.
Unfortunately, the numbers are rounded and in scientific notation rather
than the exact number of examples sorted by that node in each class.
The plot is supposed to look like
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 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]]
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
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 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
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
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
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
2002 Oct 24
2
Tree construction in Rpart
Hi,
I have one question:
Does the rpart tree construction have a depth limith for the tree?
Thanks a lot
Hugo
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject
2006 Nov 24
1
Splitting criterion in tree and rpart
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20061124/6ac3d11f/attachment.pl