similar to: Complexity parameter in rpart

Displaying 20 results from an estimated 4000 matches similar to: "Complexity parameter in rpart"

2012 Mar 04
1
rpart package, text function, and round of class counts
I run the following code: library(rpart) data(kyphosis) fit <- rpart(Kyphosis ~ ., data=kyphosis) plot(fit) text(fit, use.n=TRUE) The text labels represent the count of each class at the leaf node. Unfortunately, the numbers are rounded and in scientific notation rather than the exact number of examples sorted by that node in each class. The plot is supposed to look like
2010 May 03
1
rpart, cross-validation errors question
I ran this code (several times) from the Quick-R web page ( http://www.statmethods.net/advstats/cart.html) but my cross-validation errors increase instead of decrease (same thing happens with an unrelated data set). Why does this happen? Am I doing something wrong? # Classification Tree with rpart library(rpart) # grow tree fit <- rpart(Kyphosis ~ Age + Number + Start,
2011 Sep 08
1
"rpart" or "tree" function issue
I am trying to create a classification tree using either tree or rpart functions but when it comes to plotting the results the formatting I get is different than what I see in all the tutorials (like http://www.youtube.com/watch?v=9XNhqO1bu0A or http://www.youtube.com/watch?v=m3mLNpeke0I&feature=related or http://www.statmethods.net/advstats/cart.html "tree for kyphosis"). I am
2016 Apr 13
0
Decision Tree and Random Forrest
Tjats great that you are familiar and thanks for responding. Have you ever done what I am referring to? I have alteady spent time going through links and tutorials about decision trees and random forrests and have even used them both before. Mike On Apr 13, 2016 5:32 PM, "Sarah Goslee" <sarah.goslee at gmail.com> wrote: It sounds like you want classification or regression trees.
2016 Apr 14
3
Decision Tree and Random Forrest
I still need the output to match my requiremnt in my original post. With decision rules "clusters" and probability attached to them. The examples are sort of similar. You just provided links to general info about trees. Sent from my Verizon, Samsung Galaxy smartphone<div> </div><div> </div><!-- originalMessage --><div>-------- Original message
2008 Mar 06
2
Principle component analysis function
Dear All, In a package, I want to use PCA function. The structure I used follow this page: http://www.statmethods.net/advstats/factor.html. fit<-principle(mydata, nfactors=9, rotation=TRUE) or: result<-PCA(mydata) But I don't known why R language in my computer noticed: "not found principle", "not found PCA". I download and installed
2010 Apr 21
1
Can I compare two clusters without using their distance-matrix (dist()) ?
Hello all, I would like to compare the similarity of two cluster solutions using a validation criteria (such as Hubert's gamma coefficient, the Dunn index the corrected rand index and so on) I see (from here:http://www.statmethods.net/advstats/cluster.html) that the function cluster.stats() in the fpc package provides a mechanism for comparing 2 cluster solutions - *BUT* - it requires me to
2013 Jul 02
1
Recursive partitioning on censored data
I am interested in applying a "classification tree" analysis where the response variable is a censored variable (survival data). I've discovered the package 'party' through this page: http://www.statmethods.net/advstats/cart.html. However, as my sample is not very big I would like to apply 'bootstrap' and use 'random forests', but with my censored response
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)
2016 Apr 15
1
Decision Tree and Random Forrest
I need the output to have groups and the probability any given record in that group then has of being in the response class. Just like my email in the beginning i need the output that looks like if A and if B and if C then %77 it will be D. The examples you provided are just simply not similar. They are different and would take interpretation to get what i need. On Apr 14, 2016 1:26 AM,
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 Nov 26
0
cluster analysis error - mclust package
I am following instructions online for cluster analysis using the mclust package, and keep getting errors. http://www.statmethods.net/advstats/cluster.html These are the instructions (there is no sample dataset unfortunately): # Model Based Clustering library(mclust) fit <- Mclust(mydata) plot(fit, mydata) # plot results print(fit) # display the best model This is what I did and the error I
2011 Dec 05
0
Partitioning Around Mediods then rpart to follow
Yes, that seems like a sensible idea to me. Terry Therneau On Sat, 2011-12-03 at 12:00 +0100, r-help-request at r-project.org wrote: > The problem: There are no a priori groupings to run a classification > on > > My solution: > > This is a non-R code question, so I appreciate any thoughts. I have > used pam in the cluster package proceeded by sillohouette to find the
2003 Apr 12
5
rpart vs. randomForest
Greetings. I'm trying to determine whether to use rpart or randomForest for a classification tree. Has anybody tested efficacy formally? I've run both and the confusion matrix for rf beats rpart. I've looking at the rf help page and am unable to figure out how to extract the tree. But more than that I'm looking for a more comprehensive user's guide for randomForest including
2007 Mar 30
2
Minimum valid number of observations for rpart
Hi, I wonder if anyone knows a study dealing with the minimum valid number of observations when using CART?. On top of that, when using RandomForest, is it possible to obtained a interpretable tree model as the graphical output of the analysis, just like in "rpart"? Thanks a lot in advance Javier Lozano Universidad de Le?n Spain
2017 Aug 16
1
Bias-corrected percentile confidence intervals
Hi folks, I'm trying to estimate bias-corrected percentile (BCP) confidence intervals on a vector from a simple for loop used for resampling. I am attempting to follow steps in Manly, B. 1998. Randomization, bootstrap and monte carlo methods in biology. 2nd edition., p. 48. PDF of the approach/steps should be available here: https://wyocoopunit.box.com/s/9vm4vgmbx5h7um809bvg6u7wr392v6i9 If
2008 Oct 07
4
R and computer heat
Hi, I noticed the temperature of my laptop rises sharply during execution of a long R script that generates several hundred plots, all of them saved to files. No screen output. Temps reached above 90 Celsius degrees in the box and above 80 C deg in the processor. The machine turns on cooler at maximum speed and exhaled air is really hot. Tried similar operations (batch graphic and music
2013 Jul 26
1
variación en los resultados de k medias (Alfredo Alvarez)
Buen día, no sé si estoy utilizando bien la lista, es la primera vez. Si lo hago mal me corrigen por favor. Sobre tu comentario Pedro, muchas gracias. Lo qeu entiendo con tu sugerencia de set.seed es qeu de esa forma fijas los resultados, pero no estoy seguro si otra agrupación funcione mejor. Es decir me interesa un método de agrupación que genere la "mejor" agrupación y como los
2010 Jun 29
1
Model validation and penalization with rms package
I?ve been using Frank Harrell?s rms package to do bootstrap model validation. Is it the case that the optimum penalization may still give a model which is substantially overfitted? I calculated corrected R^2, optimism in R^2, and corrected slope for various penalties for a simple example: x1 <- rnorm(45) x2 <- rnorm(45) x3 <- rnorm(45) y <- x1 + 2*x2 + rnorm(45,0,3) ols0 <- ols(y
2006 Jan 04
2
Looking for packages to do Feature Selection and Classification
Hi All, Sorry if this is a repost (a quick browse didn't give me the answer). I wonder if there are packages that can do the feature selection and classification at the same time. For instance, I am using SVM to classify my samples, but it's easy to get overfitted if using all of the features. Thus, it is necessary to select "good" features to build an optimum hyperplane (?).