kmeansProbaPost: Calculate conditional probabilities of cluster membership for...

Description Usage Arguments Value Examples

View source: R/general-functions.R

Description

Calculate conditional probabilities of cluster membership for K-means clustering

Usage

1

Arguments

clusters

Cluster labels arising from K-means clustering

tcounts

Transformed counts clustered using K-means

Value

Conditional probabilities of cluster membership for each observation in each cluster

Examples

1
2
3
4
5
6
7
## 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)

andreamrau/coseq documentation built on July 25, 2021, 10:17 a.m.