Skip to content

Commit

Permalink
fix: account for cluster rank in group labels
Browse files Browse the repository at this point in the history
  • Loading branch information
ncullen93 committed Mar 20, 2023
1 parent 5c9529b commit 8fb6509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/board.clustering/R/clustering_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ The <strong>Clustering Analysis</strong> module performs unsupervised clustering
if (k.est == 2) {
km <- kmeans(gx, centers = 2)
km.rnk <- rank(km$centers, ties.method = "random")
grp.labels <- c("low", "high")[]
grp.labels <- c("low", "high")[km.rnk]
grp <- grp.labels[km$cluster]
} else if (k.est == 3) {
km <- kmeans(gx, centers = 3)
Expand Down

0 comments on commit 8fb6509

Please sign in to comment.