David Marimont
2002-Jan-07 23:39 UTC
[R] 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? Actually, what I'd really like is one that worked for any number of continuous predictors, but let me choose which two to plot. Thanks. David Marimont NXP Data Analysis, Inc. http://www.nxpdata.com P.S. All terminology is approximate. Corrections welcome. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Prof Brian Ripley
2002-Jan-08 07:32 UTC
[R] is then an equivalent of partition.tree for rpart?
On Mon, 7 Jan 2002, David Marimont wrote:> 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 ofThey are not a superclass. The help page is I think out of date on this. There used to be a function as.tree, but that has gone I see.> partition.tree for objects of class rpart? Actually, what I'd really like is one that > worked for any number of continuous predictors, but let me choose which two to plot. Thanks.That's not really possible. You can't plot the partition in a 2D space unless only two vars are involved, and partition.tree checks that out.> David Marimont > NXP Data Analysis, Inc. > http://www.nxpdata.com > > P.S. All terminology is approximate. Corrections welcome. > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._