Displaying 20 results from an estimated 4000 matches similar to: "RPART error"
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
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*`,
2007 Jan 03
1
User defined split function in Rpart
Dear all,
 I'm trying to manage with user defined split function in rpart
(file rpart\tests\usersplits.R in 
http://cran.r-project.org/src/contrib/rpart_3.1-34.tar.gz - see bottom of 
the email).
Suppose to have the following data.frame (note that x's values are already 
sorted)
> D
y x
1 7 0.428
2 3 0.876
3 1 1.467
4 6 1.492
5 3 1.703
6 4 2.406
7 8 2.628
8 6 2.879
9 5 3.025
10 3 3.494
2008 Jul 31
1
predict rpart: new data has new level
Hi.  I uses rpart to build a regression tree.  Y is continuous. Now, I try
   to predict on a new set of data.  In the new set of data, one of my x (call
   Incoterm, a factor) has a new level.
   I  wonder  why the  error  below appears as the guide says "For factor
   predictors, if an observation contains a level not used to grow the tree, it
   is left at the deepest possible node and
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
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
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
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
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
2008 Feb 26
1
predict.rpart question
Dear All,
I have a question regarding predict.rpart. I use
rpart to build classification and regression trees and I deal with data with
relatively large number of input variables (predictors). For example, I build an
rpart model like this
rpartModel <- rpart(Y ~ X, method="class",
minsplit =1, minbucket=nMinBucket,cp=nCp);
and get predictors used in building the model like
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.
>
2006 Apr 07
1
rpart.predict error--subscript out of bounds
Hi,
I am using rpart to do leave one out cross validation, but met some problem,
Data is a data frame, the first column is the subject id, the second column is the group id, and the rest columns are numerical variables,
> Data[1:5,1:10]
  sub.id group.id X3262.345 X3277.402 X3369.036 X3439.895 X3886.935 X3939.054 X3953.777 X3970.352
1  32613  HAM_TSP  417.7082  430.4895  619.4776  720.8246
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] :
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. *
2001 Jul 02
1
text.rpart: Unwanted NA labels on terminal nodes (PR#1009)
Brian
The following (which is new to rw1030) occurs with both
Windows 98 & Windows ME.  I have not tested behaviour
under Unix or Linux, but I expect it is no different.
text.rpart() prints unwanted NAs (presumably in the
splitting criterion position) on terminal nodes.
          Criterion <- factor(paste("Leaf", 1:5))
          Node <- factor(1:5)
         
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
2002 Feb 13
0
tree size in rpart()
Dear all,
I know in rpart(), one can control the tree size (i.e. number of
terminal nodes) through rpart.control(), e.g. minsplit, minbucket,
maxdepth etc.  But is there any more direct way to specify the number of
terminal nodes when rpart() does the recursive partitioning?  Your help
is highly appreciated!
Regards,
-Ji
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