similar to: Single node in tree

Displaying 20 results from an estimated 20000 matches similar to: "Single node in tree"

2006 Jul 18
1
Classification error rate increased by bagging - any ideas?
Hi, I'm analysing some anthropometric data on fifty odd skull bases. We know the gender of each skull, and we are trying to develop a predictor to identify the sex of unknown skulls. Rpart with cross-validation produces two models - one of which predicts gender for Males well, and Females poorly, and the other does the opposite (Females well, and Males poorly). In both cases the error
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
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
2010 Dec 14
1
rpart - how to estimate the “meaningful” predictors for an outcome (in classification trees)
Hi dear R-help memebers, When building a CART model (specifically classification tree) using rpart, it is sometimes obvious that there are variables (X's) that are meaningful for predicting some of the outcome (y) variables - while other predictors are relevant for other outcome variables (y's only). *How can it be estimated, which explanatory variable is "used" for which of
2003 Feb 12
1
rpart v. lda classification.
I've been groping my way through a classification/discrimination problem, from a consulting client. There are 26 observations, with 4 possible categories and 24 (!!!) potential predictor variables. I tried using lda() on the first 7 predictor variables and got 24 of the 26 observations correctly classified. (Training and testing both on the complete data set --- just to get started.) I
2007 Feb 02
2
Regression trees with an ordinal response variable
Hi, I am working on a regression tree in Rpart that uses a continuous response variable that is ordered. I read a previous response by Pfr. Ripley to a inquiry regarding the ability of rpart to handle ordinal responses in 2003. At that time rpart was unable to implement an algorithm to handle ordinal responses. Has there been any effort to rectify this in recent years? Thanks! Stacey On
2002 Jan 07
1
is then an equivalent of partition.tree for rpart?
partition.tree plots in 2d the partition of a classification tree produced by the function tree (assuming the data frame from which it was computed has two continuous predictors). I get an error when I feed a tree produced by rpart to partition.tree (since trees produced by rpart are superclasses of those produced by tree). Is there an equivalent of partition.tree for objects of class rpart?
2010 May 14
4
Categorical Predictors for SVM (e1071)
Dear all, I have a question about using categorical predictors for SVM, using "svm" from library(e1071). If I have multiple categorical predictors, should they just be included as factors? Take a simple artificial data example: x1<-rnorm(500) x2<-rnorm(500) #Categorical Predictor 1, with 5 levels x3<-as.factor(rep(c(1,2,3,4,5),c(50,150,130,70,100))) #Catgegorical Predictor
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
2003 Aug 15
0
partition.tree() version for rpart ?
The "tree" package has a nice function partition.tree() for drawing the (1D or) 2D partition in the case of only (one or) two predictors {See the examples in help(partition.tree)}. {and so does S-plus (not in a separate package though)}. It seems to me that there's no function with similar functionality available for rpart. Am I mistaken? Has anyone worked on this? One possible
2009 Aug 03
1
min frequencies of categorical predictor variables in GLM
Hi, Suppose a binomial GLM with both continuous as well as categorical predictors (sometimes referred to as GLM-ANCOVA, if I remember correctly). For the categorical predictors = indicator variables, is then there a suggested minimum frequency of each level ? Would such a rule/ recommendation be dependent on the y-side too ? Example: N is quite large, a bit > 100. Observed however are
2009 Sep 08
2
Very basic question regarding plot.Design...
Hello ALL! I have a problem to plot factor (lets say gender) as a line, or at least both line and point, from ols model: ols1 <- ols(Y ~ gender, data=dat, x=T, y=T) plot(ols1, gender=NA, xlab="gender", ylab="Y", ylim=c(5,30), conf.int=FALSE) If I convert gender into discrete numeric predictor, and use forceLines=TRUE, plot is not nice and true, since it shows values
2009 Dec 07
2
problem in labeling the nodes of tree drawn by rpart
Hi all, I used rpart to fit a model, where the covariates in the model are categorical variables. Then I plotted the tree (mytree) and used the command "text" to add labels to the tree. In the nodes of the tree, the values of the covariates are represented with a, b or c. Is there a way to show the real value(s) of the variable in the nodes instead of a, b or c ? I found that the
2016 Apr 15
0
Decision Tree and Random Forrest
Since you only have 3 predictors, each categorical with a small number of categories, you can use expand.grid to make a data.frame containing all possible combinations and give that the predict method for your model to get all possible predictions. Something like the following untested code. newdata <- expand.grid( Humidity = levels(Humidity), #(High, Medium,Low)
2005 Feb 18
2
gbm
Hi, there: I am always experiencing the scalability of some R packages. This time, I am trying gbm to do adaboosting on my project. Initially I tried to grow trees by using rpart on a dataset with 200 variables and 30,000 observations. Now, I am thinking if I can apply adaboosting on it. I am wondering if here is anyone who did a similar thing before and can provide some sample codes. Also any
2006 Jul 17
1
Getting rid of for loops
Hello R-users! I have a style question. I know that for loops are somewhat frowned upon in R, and I was trying to figure out a nice way to do something without using loops, but figured that i could get it done quickly using them. I am now looking to see what kind of tricks I can use to make this code a bit more aesthetically appealing to other R users (and learn something about R along the
2008 Jun 17
0
Rpart description of tree groups
I'm making a few functions to generate latex files describing rpart objects that are then \input-ed into a larger document. So far, the functions I have generate paragraphs containing enumerations of the predictors in pruned trees and the number of formed groups. Its easy enough to recover these. For instance, R> print ( tree ) n= 878 node), split, n, loss, yval, (yprob) *
2009 Jan 07
0
fixed effect significance_NB mixed models_further pursuit
7 Jan 09 Hello, I am using R version 2.7.0 in a Windows XP context. I am also using the glmm.admb package (created by Dave Fournier, Hans Skaug, and Anders Nielson) to run mixed-effects negative binomial models. To the best of my knowledge and ability, I have searched and studied the R-help, R-sig-mixed models, and ADMB NBMM for R (through Otter Research Ltd) list servs; R help
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
2009 Apr 20
1
Random Forests: Predictor importance for Regression Trees
Hello! I think I am relatively clear on how predictor importance (the first one) is calculated by Random Forests for a Classification tree: Importance of predictor P1 when the response variable is categorical: 1. For out-of-bag (oob) cases, randomly permute their values on predictor P1 and then put them down the tree 2. For a given tree, subtract the number of votes for the correct class in the