Skip to contents

How alike two groupings of the same features are: 1 when they are the same, near 0 when they are unrelated (normalised mutual information). Each grouping is a tibble with a column feature and one column of group labels.

Usage

vp_compare_groupings(a, b, method = "nmi")

Arguments

a

A grouping: a tibble with a column feature and one column of group labels, such as the result of vp_communities().

b

Another grouping of the same features.

method

The measure of similarity, as in igraph::compare(): "nmi" (normalised mutual information), "vi", "split.join", "rand" or "adjusted.rand".

Value

A number: 1 for the same grouping, near 0 for unrelated ones.

Examples

band <- vp_generate(vp_example("miband3.uvl"), or_graph = TRUE)
vp_compare_groupings(
  vp_communities(band, seed = 1),
  vp_communities(band, seed = 2)
)
#> [1] 1