Re: [R] Classification Tree Prediction Error

2020-08-25 Thread John Smith
As Bert advised correctly, this is not an R programming question. There is some misunderstanding on how training//test data work together in predictions. Suppose your test data has only one class. Therefore, you can get the following rate by betting on the majority class every time, again using dat

Re: [R] Classification Tree Prediction Error

2020-08-25 Thread Xu Jun
Thank you for your comment! This tree function is from the tree package. Although it might be a pure statistical question, it could be related to how the tree function is used. I will explore the site that you suggested. But if there is anyone who can figure it out off the top of their head, I'd ve

Re: [R] Classification Tree Prediction Error

2020-08-24 Thread Bert Gunter
Purely statistical questions -- as opposed to R programming queries -- are generally off topic here. Here is where they are on topic: https://stats.stackexchange.com/ Suggestion: when you post, do include the package name where you get tree() from, as there might be more than one with this functi

[R] Classification Tree Prediction Error

2020-08-24 Thread Xu Jun
Dear all R experts, I have a question about using cross-validation to assess results estimated from a classification tree model. I annotated what each line does in the R code chunk below. Basically, I split the data, named usedta, into 70% vs. 30%, with the training set having 70% and the test set

[R] Classification tree - Uniform vertical spacing of the nodes

2012-03-06 Thread Nathalia Machado
Hello everyone! I'm working with Decision tree and I have doubt about one of the arguments of "plot.rpart" function: When we use "uniform=F", the vertical spacing of nodes will be proportional to the error in the fit. But, I want to build a scale next my classif tree to show it. So, how could I

Re: [R] R: classification tree model!

2010-08-03 Thread Tal Galili
People who speak only English and Hebrew (like myself), can't help you. Consider reposting in English. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatis

[R] R: classification tree model!

2010-08-03 Thread aline uwimana
# Classification Tree with rpart library(rpart) # grow tree fit <- rpart(y~ x1 + x2+ x3 + x4+ x5,method="class", data=data) printcp(fit) # display the results plotcp(fit) # visualize cross-validation results summary(fit) # detailed summary of splits # plot tree plot(fit, uniform=TRUE,main="Clas

[R] classification tree

2010-04-27 Thread Sabariah Saharan
Hi, I've a problem with growing a classification tree. I have 26427 observations and divided into 4 groups. A=17866 B=6873 C=1556 D=132 The problems is when I want to plot the tree, the result appear there is no splitnodes for the tree. What should I do now? Is there any ideas how to build a