Displaying 20 results from an estimated 3000 matches similar to: "Does rpart package have some requirements on the original data set?"
2009 Mar 27
1
ROCR package finding maximum accuracy and optimal cutoff point
If we use the ROCR package to find the accuracy of a classifier
pred <- prediction(svm.pred, testset[,2])
perf.acc <- performance(pred,"acc")
Do we?find the maximum accuracy?as follows?(is there a simplier way?):
> max(perf.acc at x.values[[1]])
Then to find the cutoff point that maximizes the accuracy?do we do the
following?(is there a simpler way):
> cutoff.list <-
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]]
2010 Oct 12
2
repeating an analysis
Hi All,
I have to say upfront that I am a complete neophyte when it comes to
programming. Nevertheless I enjoy the challenge of using R because of its
incredible statistical resources.
My problem is this .........I am running a regression tree analysis using
"rpart" and I need to run the calculation repeatedly (say n=50 times) to
obtain a distribution of results from which I will pick
2003 Dec 19
1
Question re labels in r-part (continuation of a thread from a while back)
Hello again
I have modeled a tree using rpart, with the DV being a log
transformation of the variable I am really interested in (I transformed
the DV due to extreme skewness). By default, text.rpart labels the
nodes with the value of yval, which in this case is not what I want; I'd
like the labels to be on the original metric, but label in text.rpart
requires a "column name of
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
2007 Dec 10
1
Multiple Reponse CART Analysis
Dear R friends-
I'm attempting to generate a regression tree with one gradient predictor and multiple responses, trying to test if change in size (turtle.data$Clength) acts as a single predictor of ten multiple diet taxa abundances (prey.data) Neither rpart or mvpart seem to allow me to do multiple responses. (Or if they can, I'm not using the functions properly.)
> library(rpart)
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",
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
2011 Feb 03
1
problem with parLapply from snow
Hi,
The following function use to work, but now it doesn't giving the error
"> CallSnow(, 100)
Using snow package, asking for 2 nodes
2 slaves are spawned successfully. 0 failed.
Error in checkForRemoteErrors(val) :
2 nodes produced errors; first error: no applicable method for 'lapply' applied to an object of class "list"
".
Where this is 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 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
2010 May 26
1
how to Store loop output from a function
HI, Dear R community,
I am writing the following function to create one data set(*tree.pred*) and
one vector(*valid.out*) from loops. Later, I want to use the data set from
this loop to plot curves. I have tried return, list, but I can not use the
*tree.pred* data and *valid.out* vector.
auc.tree<- function(msplit,mbucket) {
* tree.pred<-data.frame()
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)
2007 May 21
1
Graphically show population density for a specific geographic area using R
Hi,
we all know that R is powerful in dealing with graphics.
I am now trying to use R to show some geographic attributes for a
specific geographic area on a graph. For example, if I would like to
generate a graph showing the population densities (in terms of the
intensity of colors) for Illinois State by zip codes. I did some
research; and it seems that package "maptools" is
2008 Feb 29
1
controlling for number of elements in each node of the tree in mvpart
Still about the mvpart.
Is there any way I can control for the number of elements in each node
in the function mvpart? Specifically, how can I ask partition to
ignore node with elements less than 10?
Thanks!
-Shu
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
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
2007 Feb 27
3
rpart minimum sample size
Is there an optimal / minimum sample size for attempting to construct a
classification tree using /rpart/?
I have 27 seagrass disturbance sites (boat groundings) that have been
monitored for a number of years. The monitoring protocol for each site
is identical. From the monitoring data, I am able to determine the
level of recovery that each site has experienced. Recovery is our
2007 Feb 18
3
User defined split function in rpart
Dear R community,
I am trying to write my own user defined split function for rpart. I read
the example in the tests directory and I understand the general idea of the
how to implement user defined splitting functions. However, I am having
troubles with addressing the data frame used in calling rpart in my split
functions.
For example, in the evaluation function that is called once per node,
2009 Aug 03
2
Truncating based on attribute range and serial no
COnsider the following:
Age<-c(48, 57, 56, 76, 76, 66, 70, 14, 7, 3, 62, 62, 30, 10, 7, 53, 44,
29, 46, 47, 15, 13, 84, 77, 26)
SerialNo<-c(001147, 005979, 005979, 006128, 006128, 007004, 007004, 007004,
007004, 007004, 007438, 007438,009402,009402, 009402, 012693, 012693,
012693, 014063,014063, 014063, 014063, 014811, 014811,016570)
TestSet<-cbind(Age,SerialNo)