Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Tree (hierarchical clustering, dendrogram) of clusters #3680

Closed
mstrazar opened this issue Mar 15, 2019 · 5 comments
Closed

[ENH] Tree (hierarchical clustering, dendrogram) of clusters #3680

mstrazar opened this issue Mar 15, 2019 · 5 comments

Comments

@mstrazar
Copy link
Contributor

It is unfeasible to compute hierarchical clustering with datasets of more than a few thousand data points. Instead, a tree between the clusters is useful. Use cluster centroid (mean point) or other linkage options from Scipy to compute linkages.

Tree between 17 clusters:
tree.pdf

@lanzagar
Copy link
Contributor

I agree with everything written: HC is unfeasible for large data, tree of clusters can be useful, cluster centroids can be used for this (provided by kmeans).
What exactly is the issue here?

One issue I have with this approach is that when the original data contains categorical variables, the centroids have a different domain (kmeans continuizes the data). But for numerical data (e.g. gene expression) this is not a problem.

@mstrazar
Copy link
Contributor Author

It's more an enhancement than an issue. Certain clustering algorithms do not output cluster centroids, but only categorical labels. Hierarchical clustering would not even need to operate on centroids, but use the appropriate linkage method to aggregate distances between provided clusters. Categorical variables can be continuized too.

@lanzagar
Copy link
Contributor

I see - so instead of using k-means you would like to use predefined clusters (categorical var in data), which can be a result of (any) clustering or otherwise given.
And in this case we currently don't have a good option to get the centroids, which can be used in hierarchical clustering.

In that case, the solution would be to have a Pivot table, which can compute averages (or other aggregates) to obtain the centroids of selected groups.
This is becoming a recurring issue :) We ended up with a similar conclusion many times in the past few months. +1 for Pivot tables, we just need to come up with a good widget proposal.

@ajdapretnar
Copy link
Contributor

Ahem, #3823. 😁 Would this help? @mstrazar If so, this would be a nice thing to add to the docs.

@janezd
Copy link
Contributor

janezd commented Nov 29, 2019

Closed due to inactivity. Probably partially solved by Pivot widget.

@janezd janezd closed this as completed Nov 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants