similar to: Question about rpart decision trees (being used to predict customer churn)

Displaying 20 results from an estimated 9000 matches similar to: "Question about rpart decision trees (being used to predict customer churn)"

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 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
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
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
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 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] :
2012 May 15
2
rpart - predict terminal nodes for new observations
Dear useRs: Is there a way I could predict the terminal node associated with a new data entry in an rpart environment? In the example below, if I had a new data entry with an AM of 5, I would like to link it to the terminal node 2. My searches led to http://tolstoy.newcastle.edu.au/R/e4/help/08/07/17702.html but I do not seem to be able to operationalize Professor Ripley's suggestions. Many
2003 Mar 10
1
rpart returning only 1 node
Hi, This may actually be a theoretical question. When I tried to do the following: ########################################################## > colnames(rating.adclms) [1] "usage" "mileage" "sex" "excess" "ncd" [6] "primage" "minage" "drivers" "district" "cargroup" [11]
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
2007 May 25
1
Problem with rpart
I work on Windows, R version 2.4.1. I'm very new with R! I am trying to build a classification tree using rpart but, although the matrix has 108 variables, the program builds a tree with only one split using one variable! I know it is probable that only one variable is informative, but I think it's unlikely. I was wondering if someone can help me identify if I'm doing something
2003 Jun 17
1
User-defined functions in rpart
This question concerns rpart's facility for user-defined functions that accomplish splitting. I was interested in modifying the code so that in each terminal node, a linear regression is fit to the data. It seems that from the allowable inputs in the user-defined functions, that this may not be possible, since they have the form: function(y, wt, parms) (in the case of the
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
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
2010 Aug 13
1
decision tree finetune
My decision tree grows only with one split and based on what I see in E-Miner it should split on more variables. How can I adjust splitting criteria in R? Also is there way to indicate that some variables are binary, like variable Info_G is binary so in the results would be nice to see "2) Info_G=0" instead of "2) Info_G<0.5". Thank you in advance! And thanks for Eric who
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
2012 Aug 01
1
rpart package: why does predict.rpart require values for "unused" predictors?
After fitting and pruning an rpart model, it is often the case that one or more of the original predictors is not used by any of the splits of the final tree. It seems logical, therefore, that values for these "unused" predictors would not be needed for prediction. But when predict() is called on such models, all predictors seem to be required. Why is that, and can it be easily
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 21
1
rpart memory problem
Hi everyone, I have a problem using rpart (R 2.0.1 under Unix) Indeed, I have a large matrix (9271x7), my response variable is numeric and all my predictor variables are categorical (from 3 to 8 levels). Here is an example : > mydata[1:5,] distance group3 group4 group5 group6 group7 group8 pos_1 0.141836040224967 a c e a g g pos_501
2001 Aug 12
2
rpart 3.1.0 bug?
I just updated rpart to the latest version (3.1.0). There are a number of changes between this and previous versions, and some of the code I've been using with earlier versions (e.g. 3.0.2) no longer work. Here is a simple illustration of a problem I'm having with xpred.rpart. iris.test.rpart<-rpart(iris$Species~., data=iris[,1:4], parms=list(prior=c(0.5,0.25, 0.25))) + ) >
2002 Aug 29
3
2 questions
Hi all, I am using R1.5.0 under Unix, I have a couple of questions here. 1. My program is running out of memory. I am writing a program to grow a list of trees using rpart() on a subset of a large dataset(5807x693) with a different response for every tree. I saw that after each tree was constucted, 116 MB of data was being added to the Vcells. I have no idea what this data is. My dataset is