Tom D. Harray
2017-Jul-28 12:56 UTC
[R] R-Package for Recursive Partitioning without Classification or Regression
Hello, I have a question related to recursive partitioning, but I cannot find an answer, likely because I don't know how to properly word my Google search query. All recursive partitioning examples, which I can find, are used for either classification or regression trees like library(tree) data(iris) tree(Species ~ Sepal.Width + Petal.Width, data = iris) which implies building a model. However, I would like to split data like clustering similar to decision tree methods, because I have nothing to predict. My question is: Is there a package, which I can use to partition my data without classification or regression so that it resembles clustering methods? Thanks and regards, Dirk
Bert Gunter
2017-Jul-28 14:55 UTC
[R] R-Package for Recursive Partitioning without Classification or Regression
Tom: Recursive partitioning requires a response variable because splitting criteria are based on node purity/homogeneity (by various criteria) of the responses. So why did you not just search on "clustering" (e.g. at rseek.org)? And in particular, have you looked at the CRAN task view on clustering here: https://cran.r-project.org/web/views/Cluster.html If nothing there satisfies your needs, you may need to clarify your query. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Jul 28, 2017 at 5:56 AM, Tom D. Harray <tomdharray at gmail.com> wrote:> Hello, > > I have a question related to recursive partitioning, but I cannot find > an answer, likely because I don't know how to properly word my Google > search query. > > > All recursive partitioning examples, which I can find, are used for > either classification or regression trees like > > library(tree) > data(iris) > tree(Species ~ Sepal.Width + Petal.Width, data = iris) > > which implies building a model. However, I would like to split data > like clustering similar to decision tree methods, because I have > nothing to predict. > > > My question is: Is there a package, which I can use to partition my > data without classification or regression so that it resembles > clustering methods? > > > Thanks and regards, > > Dirk > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Achim Zeileis
2017-Jul-28 15:03 UTC
[R] R-Package for Recursive Partitioning without Classification or Regression
On Fri, 28 Jul 2017, Tom D. Harray wrote:> Hello, > > I have a question related to recursive partitioning, but I cannot find > an answer, likely because I don't know how to properly word my Google > search query.I think you are looking for "divisive hierarchical clustering" which is the more commonly used term for clustering based on recursive partitioning. The classical implementation for this would be diana() from the "cluster" package. The "Cluster" task view at https://CRAN.R-project.org/view=Cluster also lists "isopam" and http://search.r-project.org/cgi-bin/namazu.cgi?query=divisive+clustering&idxname=functions&idxname=views also gives a few further leads.> All recursive partitioning examples, which I can find, are used for > either classification or regression trees like > > library(tree) > data(iris) > tree(Species ~ Sepal.Width + Petal.Width, data = iris) > > which implies building a model. However, I would like to split data > like clustering similar to decision tree methods, because I have > nothing to predict.But do you want to split along observed variables or not? If not, then you're in a unsupervised clustering situation (see my comment above). But if you want to split along covariates, then this is supervised and you're possibly looking for a multivariate regression tree? Hope that helps, Z> My question is: Is there a package, which I can use to partition my > data without classification or regression so that it resembles > clustering methods? > > > Thanks and regards, > > Dirk > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
David L Carlson
2017-Jul-28 15:09 UTC
[R] R-Package for Recursive Partitioning without Classification or Regression
I think that diana() or mona() in package cluster are what you are looking for. The computational burdens of polythetic divisive clustering methods as they are called are substantial so the available methods use shortcuts that should provide good, but not necessarily optimal results. ------------------------------------- David L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -----Original Message----- From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Tom D. Harray Sent: Friday, July 28, 2017 7:56 AM To: r-help at r-project.org Subject: [R] R-Package for Recursive Partitioning without Classification or Regression Hello, I have a question related to recursive partitioning, but I cannot find an answer, likely because I don't know how to properly word my Google search query. All recursive partitioning examples, which I can find, are used for either classification or regression trees like library(tree) data(iris) tree(Species ~ Sepal.Width + Petal.Width, data = iris) which implies building a model. However, I would like to split data like clustering similar to decision tree methods, because I have nothing to predict. My question is: Is there a package, which I can use to partition my data without classification or regression so that it resembles clustering methods? Thanks and regards, Dirk ______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Michal Kubista
2017-Aug-01 09:37 UTC
[R] R-Package for Recursive Partitioning without Classification or Regression
Hello Tom, what you describe seems like using hierarchical clustering and plotting a dendrogram to me, even though only in the "visual" way, not in the math behind the algorithms. Are you looking for something like this? https://rpubs.com/gaston/dendrograms Just please note, that this is very far from rpart in term of how the algorithms work (already mentioned by Bert Gunter) Best, Michal 2017-07-28 14:56 GMT+02:00 Tom D. Harray <tomdharray at gmail.com>:> Hello, > > I have a question related to recursive partitioning, but I cannot find > an answer, likely because I don't know how to properly word my Google > search query. > > > All recursive partitioning examples, which I can find, are used for > either classification or regression trees like > > library(tree) > data(iris) > tree(Species ~ Sepal.Width + Petal.Width, data = iris) > > which implies building a model. However, I would like to split data > like clustering similar to decision tree methods, because I have > nothing to predict. > > > My question is: Is there a package, which I can use to partition my > data without classification or regression so that it resembles > clustering methods? > > > Thanks and regards, > > Dirk > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Possibly Parallel Threads
- R-Package for Recursive Partitioning without Classification or Regression
- cluster a distance(analogue)-object using agnes(cluster)
- a problem 'cor' function
- split data, but ensure each level of the factor is represented
- multiple plots per page using hist and pdf