check_kmeans_clustering: Compare kmeans clustering with ground truth clusters

Description Usage Arguments Value Examples

Description

Perform kmeans clustering and then calculates several external and internal clustering indecies. Parameters of kmeans clustering: iter.max = 1e+09; nstart = 1000.

Usage

1
check_kmeans_clustering(w, n.dim, n.clusters, labs.known)

Arguments

w

Transformed distance matrix (transformed before by transformation() function)

n.dim

Number of dimensions of w to use for kmeans clustering

n.clusters

Expected number of clusters required by kmeans

labs.known

Ground truth clustering labels (known from the experiment)

Value

List of clustering indecies and clutering labels:

ari

Adjusted Rand Index

rand

Rand Index

jaccard

Jaccard Index

dunn

Dunn Index

davies_bouldin

Davies Bouldin Index

silhouette

Silhouette Index

labs

Clustering labels of the cells

labs.known

Known (from experiment) clustering labels of the cells

Examples

1
2
3
labs.known <- as.numeric(colnames(quake))
w <- transformation(as.matrix(1 - cor(quake, method = "spearman")), "spectral")
check_kmeans_clustering(w, 4, 5, labs.known)

wikiselev/clustools documentation built on May 4, 2019, 5:25 a.m.