Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

calcARI

Calculate adjusted Rand index


Description

Computes adjusted Rand index for liger clustering and external clustering. The Rand index ranges from 0 to 1, with 0 indicating no agreement between clusterings and 1 indicating perfect agreement.

Usage

calcARI(object, clusters.compare, verbose = TRUE)

Arguments

object

liger object. Should run quantileAlignSNF before calling.

clusters.compare

Clustering with which to compare (named vector).

verbose

Print messages (TRUE by default)

Value

Adjusted Rand index value.

Examples

## Not run: 
# ligerex (liger object), factorization complete
ligerex <- quantile_norm(ligerex)
# toy clusters
cluster1 <- sample(c('type1', 'type2', 'type3'), ncol(ligerex@raw.data[[1]]), replace = TRUE)
names(cluster1) <- colnames(ligerex@raw.data[[1]])
cluster2 <- sample(c('type4', 'type5', 'type6'), ncol(ligerex@raw.data[[2]]), replace = TRUE)
names(cluster2) <- colnames(ligerex@raw.data[[2]])
# get ARI for first clustering
ari1 <- calcARI(ligerex, cluster1)
# get ARI for second clustering
ari2 <- calcARI(ligerex, cluster2)

## End(Not run)

rliger

Linked Inference of Genomic Experimental Relationships

v1.0.0
GPL-3
Authors
Joshua Welch [aut, ctb], Chao Gao [aut, ctb, cre], Jialin Liu [aut, ctb], Joshua Sodicoff [aut, ctb], Velina Kozareva [aut, ctb], Evan Macosko [aut, ctb], Paul Hoffman [ctb], Ilya Korsunsky [ctb], Robert Lee [ctb]
Initial release
2021-04-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.