similar to: Couple of Questions about Classification trees

Displaying 20 results from an estimated 1000 matches similar to: "Couple of Questions about Classification trees"

2008 Feb 24
1
what missed ----- CART
Hi all, Can anyone who is familar with CART tell me what I missed in my tree code? library (MASS) myfit <- tree (y ~ x1 + x2 + x3 + x4 ) # tree.screens () # useless plot(myfit); text (myfit, all= TRUE, cex=0.5, pretty=0) # tile.tree (myfit, fgl$type) # useless # close.screen (all= TRUE) # useless My current tree plot resulted from above code shows as:
2012 Mar 13
1
Error " subscript out of bounds"
Hello, R-users,   I have a datafile with 37313 records and each record has 5 different measurements on the same variables. The format looks like this: treeID, VIG0, VIG1, VIG2, VIG3, VIG4 I was trying to convert the one row record to 5 rows record with format like this (treeID, MEASUREMENT, VIGOR). My code like this:   treeMeas<-matrix(data=0,nrow=(length(tree1$indivTree)*5), ncol=3)
2005 Aug 14
1
How to add decision trees into a list?
Hi, I am somewhat new to R so this question may be foolish, but is it possible to add decision trees into a list, array or vector in R? I am trying to build a collection (ensemble) of decision trees. Every time a new instance arrive I need to get the prediction of each decision tree. I have tried to add a decision tree into a variable but without luck. Is a special package needed perhaps? This
2011 Jul 06
1
question about getting things out of an lapply
Dear R-help subscribers, I have a quite stupid question about using lapply. I have the following function: create.gradient <- function(i){ colorgrad01<-color.scale(seq(0,1,by=0.01), extremes=c("red","blue")) tree1$edge[i,1] -> x tree1$edge[i,2] -> y print(x) print(y) all2[x] -> z all2[y] -> z2 round(z, digits = 2) -> z round(z2, digits = 2) -> z2
2004 Jul 19
2
problem with read.table
Hello R-users, I apologize for my question but I'm a newbie. I want to read a file which columns separator is "\t". At the end of each row there is a "\n" to go to the following line. The three first lines are remarks lines and the fourth contains columns titles ( variables names, ids, dates, calculated values, observed values...) . I do: read.table("myFile",
2009 Apr 01
1
Request: Optimum value of cost complexity parameter "k" in "tree" package
Dear R community I have a question regarding the value of cost complexity parameter "k" used in "tree" package for pruning purpose. Any help in finding the optimum value of "k" is requested. Please give some suggestion in this regard. In the example below i used k=0 but i don't know why? But if i use k=NULL, then it will not plot the resultant tree.
2012 Apr 13
1
Coding columns for survival analysis
Hello Folks, I have 5 columns for thousands of tree records that record whether that tree was alive or dead. I want to recode the columns such that the cell reads "found" when a live tree is first observed, "alive" for when a tree is found alive and is not just found, and "mort" when it was previously alive but is now dead. Given the following: > tree_live
2007 Jan 29
3
comparing random forests and classification trees
Hi, I have done an analysis using 'rpart' to construct a Classification Tree. I am wanting to retain the output in tree form so that it is easily interpretable. However, I am wanting to compare the 'accuracy' of the tree to a Random Forest to estimate how much predictive ability is lost by using one simple tree. My understanding is that the error automatically displayed by the two
2008 Sep 14
1
Problem with misclass function on tree classification
I am working through Tom Minka's lectures on Data Mining and am now on Day 32. The following is the link: http://alumni.media.mit.edu/~tpminka/courses/36-350.2001/lectures/day32/ In order to use the functions cited I followed the instructions as follows: Installed tree package from CRAN mirror (Ca-1) Downloaded and sourced the file "tree.r" Downloaded the function
2001 Jul 19
2
classification tree out put
Hello, I'm attempting to classify data using tree(). summary(tree()) indicates that I have a very good classification rate. What I'd like to know is which tokens in the data set are correctly classified and which are not. Is there a method for associating the classification with the token? I've been reading Chambers and Hastie (1992) chapter 9 on tree-based models, but find no
2005 Oct 14
1
Predicting classification error from rpart
Hi, I think I'm missing something very obvious, but I am missing it, so I would be very grateful for help. I'm using rpart to analyse data on skull base morphology, essentially predicting sex from one or several skull base measurements. The sex of the people whose skulls are being studied is known, and lives as a factor (M,F) in the data. I want to get back predictions of gender, and
2009 Nov 25
2
Unique observations
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091125/62ecd9aa/attachment-0001.pl>
2004 Mar 13
4
nnet classification accuracy vs. other models
I was wandering if anybody ever tried to compare the classification accuracy of nnet to other (rpart, tree, bagging) models. From what I know, there is no reason to expect a significant difference in classification accuracy between these models, yet in my particular case I get about 10% error rate for tree, rpart and bagging model and 80% error rate for nnet, applied to the same data. Thanks.
2004 Aug 21
3
sweave and post "rpart"
Hi, have anybody positive experience how it is possible get the post output from a rpart-object in a large sweave file or is only the less nicely plot function instead of post possible??? \begin{figure}[htbp] \begin{center} <<fig=true,eps=T>>= post(dtreeEB, title="Tree",digits=getOption("digits") - 0,use.n=TRUE) @ \caption{Tree1} \end{center}
2007 Mar 12
1
knncat question
I use knncat to make a predictive model and get misclass rate > knncat.m<-knncat(training.new,k=c(10,20),classcol=5) > knncat.m Training set misclass rate: 36.88% then I try to calculate prediction accuracy by the following: > pr.knncat.train <- predict (knncat.m,training.new,training.new,train.classcol=5,newdata.classcol=5) > tb.knncat.train <-table (pr.knncat.train,
2017 Nov 03
2
[PATCH] diff: avoid potential null pointer dereference on error
If visit_guest() fails, then it returns a null pointer; later on, free_tree() is called unconditionally on the variables, thus dereferencing null pointers. Thus guard the free_tree() invocations. --- diff/diff.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/diff/diff.c b/diff/diff.c index 5851a1c9c..1f1ab6933 100644 --- a/diff/diff.c +++ b/diff/diff.c @@ -389,8
2011 Sep 02
2
misclassification rate
Hi users I'm student who is struggling with basic R programming. Would you please help me with this problem. "My english is bad" I hope that my question is clear: I have a matrix in wich there are two colmns( yp, yt) Yp: predicted values from my model. yt: true values ( my dependante variable y is a categorical;3 modalities (0,1,2) I don't know how to procede to calculate the
2005 May 12
1
modifications to text.tree function
Hi. I have to make some minor modifications to the text.tree function - I don't like the way it prints the split labels (they are too long in my case and overlap). I tried to make s simple modification to the text.tree function so that it will limit the number of significant digits in tree labels, but could not - the original function uses some undocumented "treeco" function, which
2005 Jun 23
1
errorest
Hi, I am using errorest function from ipred package. I am hoping to perform "bootstrap 0.632+" and "bootstrap leave one out". According to the manual page for errorest, i use the following command: ce632[i]<-errorest(ytrain ~., data=mydata, model=lda, estimator=c("boot","632plus"), predict=mypredict.lda)$error It didn't work. I then tried the
2010 Apr 30
1
how is xerror calculated in rpart?
Hi, I've searched online, in a few books, and in the archives, but haven't seen this. I believe that xerror is scaled to rel error on the first split. After fitting an rpart object, is it possible with a little math to determine the percentage of true classifications represented by a xerror value? -seth -- View this message in context: