similar to: user-written splits in rpart

Displaying 20 results from an estimated 6000 matches similar to: "user-written splits in rpart"

2011 May 19
1
Specifying Splits WhenUusing rpart
I am using the package rpart to explore various classification structures. The call looks like: seekhi1<-rpart(pvol~spec+a1+psize+eppres+numpt+icds+bivalcrt+stents+ppshare+ nhosp+nyrs,data=dat,method="class", control=rpart.control(minsplit=30,xval=10)) The output is 1) root 198 87 1 (0.5606061 0.4393939) 2) psize=1,2 122 43 1 (0.6475410 0.3524590)
2004 Sep 06
1
rpart problem
Dear all, I am having some trouble with getting the rpart function to work as expected. I am trying to use rpart to combine levels of a factor to reduce the number of levels of that factor. In exploring the code I have noticed that it is possible for chisq.test to return a statistically significant result whilst the rpart method returns only the root node (i.e. no split is made). The following
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
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
2001 Jul 12
2
rpart puzzle
I've been using the package rpart with R 1.3.0 for Windows to produce simple classification trees for some measurement data from paleontological specimens. Both the rpart documentation and the output confirm that the program produces splits on continuous data that leave "holes" in the data. It is probably of little practical importance, but is there a reason why the binary
2001 Aug 02
1
Missing value in Rpart
Hi, all Our understanding of how classification trees in Rpart treat missing is that if the variable is ordinal(continous), Rpart, by default, imputes a value for missing. How do we do the classification tree and tell Rpart not to impute. That is, what command is used to turn off the imputation. Also, if we do get true missing, how does classification tree analysis in Rpart treat missing when
2004 Mar 19
2
Why is rpart() so slow?
I've had rpart running on a problem now for a couple of *days*, but I'd expect a decision tree builder to run in minutes if not seconds. Why is rpart slow? Is there anything I can do to make it quicker?
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
2012 Jul 06
2
Plotting rpart trees with long list of class members
I have a class with 732 members, so using rpart.plot is giving me a tiny plot in the middle of the window. Is there a good way to modify the plot, or replace the long list with something like "group1"? -- View this message in context: http://r.789695.n4.nabble.com/Plotting-rpart-trees-with-long-list-of-class-members-tp4635671.html Sent from the R help mailing list archive at
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
2013 Jan 27
2
rpart
Hi, When I look at the summary of an rpart object run on my data, I get 7 nodes but when I plot the rpart object, I get only 3 nodes. Should the number of nodes not match in the results of the 2 functions (summary and plot) or it is not always the same? Look forward to your reply, Carol -------------------------------------------- ?summary(rpart.res) Call: rpart(formula = mydata$class ~ ., data
2008 Jul 03
1
cross-validation in rpart
Hello list, I'm having a problem with custom functions in rpart, and before I tear my hair out trying to fix it, I want to make sure it's actually a problem. It seems that, when you write custom functions for rpart (init, split and eval) then rpart no longer cross-validates the resulting tree to return errors. A simple test is to use the usersplits.R function to get a simple, custom
2011 Jan 24
1
How to measure/rank ?variable importance when using rpart?
--- included message ---- Thus, my question is: *What common measures exists for ranking/measuring variable importance of participating variables in a CART model? And how can this be computed using R (for example, when using the rpart package)* ---end ---- Consider the following printout from rpart summary(rpart(time ~ age + ph.ecog + pat.karno, data=lung)) Node number 1: 228 observations,
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
2003 Jan 21
1
rpart help
Hello. I am not sure if you can help me or not but I have a dataset with N ~ 4000 with binary response and p ~ 0.08, regardless of how many or how few variables I offer I get the following message: 'Error in rpart(formula, method="class"): No splits could be created Dumped.' If I run tree with the same dataset (no missing data) in S I get results. Is there a problem with large
2006 Sep 25
2
rpart
Dear r-help-list: If I use the rpart method like cfit<-rpart(y~.,data=data,...), what kind of tree is stored in cfit? Is it right that this tree is not pruned at all, that it is the full tree? If so, it's up to me to choose a subtree by using the printcp method. In the technical report from Atkinson and Therneau "An Introduction to recursive partitioning using the rpart
2004 May 04
1
rpart question
Wondered about the best way to control for input variables that have a large number of levels in 'rpart' models. I understand the algorithm searches through all possible splits (2^(k-1) for k levels) and so variables with more levels are more prone to be good spliters... so I'm looking for ways to compensate and adjust for this complexity. For example, if two variables produce
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
2008 Mar 06
1
Rpart and bagging - how is it done?
Hi there. I was wondering if somebody knows how to perform a bagging procedure on a classification tree without running the classifier with weights. Let me first explain why I need this and then give some details of what I have found out so far. I am thinking about implementing the bagging procedure in Matlab. Matlab has a simple classification tree function (in their Statistics toolbox) but
2010 Oct 12
6
Rpart query
Hi, Being a novice this is my first usage of R. I am trying to use rpart for building a decision tree in R. And I have the following dataframe Outlook Temp Humidity Windy Class Sunny 75 70 Yes Play Sunny 80 90 Yes Don't Play Sunny 85 85 No Don't Play Sunny 72 95 No Don't Play Sunny 69 70 No Play Overcast 72 90 Yes Play Overcast 83 78 No Play Overcast 64 65 Yes Play Overcast 81 75