Displaying 20 results from an estimated 110 matches similar to: "Are minbucket and minsplit rpart options working as expected?"
2011 Dec 27
0
Using minsplit and unequal weights in rpart
Dear r-help mailing list,
Is there a way to incorporate weights into the minsplit criteria in rpart,
when the weights are uneven? I could not find a way for the minsplit
threshold to take the weights into account, and when the weights are uneven
it becomes an issue, as the following example shows.
My current workaround is to expand the data into one in which each row is
an observation, but that
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()
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)
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
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
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 Feb 03
0
mboost: how to implement cost-sensitive boosting family
mboost contains a blackboost method to build tree-based boosting models. I tried to write my own "cost-sensitive" ada family. But obviously my understanding to implement ngradient, loss, and offset functions is not right. I would greatly appreciate if anyone can help me out, or show me how to write a cost-sensitive family, thanks!
Follows are some families I wrote
ngradient <-
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
2012 Apr 24
0
mvpart versus SPSS
I have a question relating to mvpart, which I hope you can answer.
We recently conducted a study using TBR. In our first study, we used
"regular" TBR in SPSS to model 1 dependent variable. Note we have a
relatively small data-set of 100 cases. In SPSS, we used a minimum change of
improvement smaller than 0.000001 as a stopping rule. Also, we chose the 1SE
"rule", set 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
2012 Jan 19
1
ctree question
Hello. I have used the "party" package to generate a regression tree as
follows:
>origdata<-read.csv("origdata.csv")
>ctrl<-ctree_control(mincriterion=0.99,maxdepth=10,minbucket=10)
>test.ct<-ctree(Y~X1+X2+X3,data=origdata,control=ctrl)
The above works fine. Orig data was my training data. I now have a test
data file (testdata), and
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
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
2011 Feb 10
2
R 2.12.1 Windows 32bit and 64bit - are numerical differences expected?
Should one expect minor numerical differences between 64bit and 32bit R on
Windows? Hunting around the lists I've not been able to find a definitive
answer yet. Seems plausible using different precision arithmetic, but waned
to confirm from those who might know for sure.
BACKGROUND
A colleague was trying to replicate some modelling results (from a soon to
be published book) using rpart, ada,
2011 May 20
0
RPART error
Hi,
I have been working generating decision tree analyses on large numbers of
simulation datasets using the RPART function.? With some datasets, RPART is
returning an error of "Error in yval[, 1] : incorrect number of dimensions".?
There seem to be certain types of splits that cause it to break and return this
message.?
I?am able to isolate the record at which this error message
2000 Mar 27
1
Behavior different inside function?
I'm stumped with this. When I execute the lines in the function singly, they
run fine, but when I run the function, I get this error on the read.table()
line:
Error in count.fields(file, sep, quote, skip) :
can't open file fspci1.dat
Can anyone tell my why this should be so? Here is the program:
library(rpart)
wait <- function(str="Press a key when ready...")
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
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*`,
2017 Feb 17
2
Modelos con datos normalizaddos
Buenas,
Estoy creando unos modelos donde necesito normalizar los datos antes de crear el modelo. Estoy haciendo árboles de clasifciacion, pero me surge la duda de saber como tengo que hacer, pues cuando muestro el arbol me sale con lo svalores normalizados, pero me gustaria uqe el arbol diera ya directamente las conclusiones con los datos no normalizados.
Lo que hago yo ahora es desnormalizar
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