Displaying 20 results from an estimated 6000 matches similar to: "bug in rpart?"
2008 Oct 27
0
Displaying number of Y/N affected by tree in rule form RE: R question/request on rules from rpart
Hi Prof. Williams,
thanks for your suggestion. The updated code is below.
It turns out it was a matter of displaying the second column in
yval to get the number of N and subtracting it from the n column in the
frame to get the number of Y remaining in a binary example.
once this is added now the function returns the rules along with
Y and N count affected by the resulting rule.
I am ccing
2005 Mar 15
0
need help with plot.rpart and text.rpart
Hi,
I am new to R and need help with rpart. I am trying to create a
classification tree using rpart. In order to plot the reults I use the
plot function and the text function to label the plot of the tree
dendrogram with text. The documentation of text.rpart says : "For the
"class" method, label="yval" results in the factor levels being used,
"yprob" results
2011 Jan 26
1
Inconsistencies in the rpart.object help file?
Hello all,
I'm was going through the help for
?rpart.object
And noticed some inconsistencies, Some might be a mistake in the help file
and some might be my misunderstanding.
The help in the section:
value -> frame (first paragraph), states that:
> yval, the fitted value of the response at each node, *and splits, a two
> column matrix of left and right split labels for each node. *
2005 May 25
0
Error with user defined split function in rpart (PR#7895)
Full_Name: Bill Wheeler
Version: 2.0.1
OS: Windows 2000
Submission from: (NULL) (67.130.36.229)
The program to reproduce the error is below. I am calling rpart with a
user-defined split function for a binary response variable and one continuous
independent variable. The split function works for some datasets but not
others.
The error is:
Error in "$<-.data.frame"(`*tmp*`,
2002 Jan 25
0
rpart subsets
A few weeks back I posted that the subset feature of rpart was not working
when predicting a categorical variable. I was able to figure out a simple
solution to the problem that I hope can be included in future editions of
rpart. I also include a fix for another related problem.
The basic problem is that when predicting a categorical using a subset, the
subset may not have all the categories
2002 Jan 28
0
rpart subset fix
(Apparently, I posted this to the wrong place. I am hopefully posting this
is the correct place now. If not, please advise.)
A few weeks back I posted that the subset feature of rpart was not working
when predicting a categorical variable. I was able to figure out a simple
solution to the problem that I hope can be included in future editions of
rpart. I also include a fix for another related
2012 Jan 08
2
rpart question
We are trying to make a decision tree using rpart and we are continually
running into the following error:
> fit_rpart=rpart(ENROLL_YN~MINORITY,method="class")
> summary(fit_rpart)
Call:
rpart(formula = ENROLL_YN ~ MINORITY, method = "class")
n= 5725
CP nsplit rel error
1 0 0 1
Error in yval[, 1] : incorrect number of dimensions
ENROLL_YN is a
2002 Aug 28
0
user defined function in rpart
Hi,
I am trying to use the rpart library with my own set of functions on a
survival object. I get an immeadiate segmentation fault when i try
calling rpart with my list of functions. I get the same problem with the
logrank example from Therneau,s S-rpart library though their anova
example works. Should I report this as a bug, as even if my functions
are structured improperly, that should lead to
2005 Sep 24
1
rpart Error in yval[, 1] : incorrect number of dimensions
I tried using rpart, as below, and got this error message "rpart Error in yval[, 1] : incorrect number of dimensions". Thinking it might somehow be related to the large number of missing values, I tried using complete data, but with the same result. Does anyone know what may be going on, and how to fix it? I have traced two similar error messages in the Archive, but following the
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
2007 Feb 20
1
text.rpart for the "class" method doesn't act on label="yprob"
Hello All,
Am I misreading the documentation?
The text.rpart documentation says:
"label a column name of x$frame; values of this will label the nodes. For
the "class" method, label="yval" results in the factor levels being
used, "yprob" results in the probability of the winning factor level being
used, and ?specific yval level? results in the probability of
2002 Mar 13
0
rpart error with 0-frequency factor levels (with partial fix) (PR#1378)
(I'm sending to r-bugs because rpart is one of the recommended packages and
is always installed. I'm also sending it directly to Dr. Ripley, as the
maintainer.)
rpart working as a classifier does not work (produces no splits) when the
class indicator has no instances of one of the factor levels, as long as the
factor level is not the final level. I have at least a partial fix, which I
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
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",
2007 Jun 15
2
method of rpart when response variable is binary?
Dear all,
I would like to model the relationship between y and x. y is binary
variable, and x is a count variable which may be possion-distribution.
I think it is better to divide x into intervals and change it to a
factor before calling glm(y~x,data=dat,family=binomail).
I try to use rpart. As y is binary, I use "class" method and get the
following result.
>
2005 Dec 07
0
Are minbucket and minsplit rpart options working as expected?
Dear r-list:
I am using rpart to build a tree on a dataset. First I obtain a perhaps too
large tree:
> arbol.bsvg.02 <- rpart(formula, data = bsvg, subset=grp.entr,
control=rpart.control(cp=0.001))
> arbol.bsvg.02
n= 100000
node), split, n, loss, yval, (yprob)
* denotes terminal node
1) root 100000 6657 0 (0.93343000 0.06657000)
2) meses_antiguedad_svg>=10.5 73899 3658
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] :
2010 Aug 31
0
rpart - interpretation of results of tree on survival data
Hi All,
I am fitting a tree to censored survival data using the rpart package and
wanted to better understand the results.
I am trying to interpret the output from the tree. I am interested in
understanding what "yval" is for a survival tree. I see in the output of
summary, the phrase "estimated rate". The estimated rate is 1 for the entire
tree, and more of less for each
2010 Dec 13
2
rpart.object help
Hi,
Suppose i have generated an object using the following :
fit <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis)
And when i print fit, i get the following :
n= 81
node), split, n, loss, yval, (yprob)
* denotes terminal node
1) root 81 17 absent (0.7901235 0.2098765)
2) Start>=8.5 62 6 absent (0.9032258 0.0967742)
4) Start>=14.5 29 0 absent (1.0000000
2009 Jul 26
3
Question about rpart decision trees (being used to predict customer churn)
Hi,
I am using rpart decision trees to analyze customer churn. I am finding that
the decision trees created are not effective because they are not able to
recognize factors that influence churn. I have created an example situation
below. What do I need to do to for rpart to build a tree with the variable
experience? My guess is that this would happen if rpart used the loss matrix
while creating