Skip to content

Inconsistent attribution of individuals to clusters #120

@aloboa

Description

@aloboa

Given

hc <- hclust(dist(USArrests[c(1, 6, 13, 20, 23), ]), "ave")
dend <- as.dendrogram(hc)
plot(dend)

I think the following difference should be considered as a bug:

a <- cutree(dend, h=50)
b <- cutree(dend, h=50, order_clusters_as_data = FALSE)
table(a)
a
1 2 3 
3 1 1 

table(b)
b
1 2 3 
1 1 3 

One thing is changing the order of the labels in the vector, and another one is changing the cluster to which a given element has
been classified. In this example, Minnesota should be in the same cluster in both cases, and the number of individuals within each cluster should be the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions