kmeansProbaPost {coseq} | R Documentation |
Calculate conditional probabilities of cluster membership for K-means clustering
kmeansProbaPost(clusters, tcounts)
clusters |
Cluster labels arising from K-means clustering |
tcounts |
Transformed counts clustered using K-means |
Conditional probabilities of cluster membership for each observation in each cluster
## Example of K-means taken from ?kmeans help page x <- rbind(matrix(rnorm(100, sd = 0.3), ncol = 2), matrix(rnorm(100, mean = 1, sd = 0.3), ncol = 2)) colnames(x) <- c("x", "y") cl <- kmeans(x, 5) probaPost <- kmeansProbaPost(cl$cluster, x) head(probaPost)