| compare {igraph} | R Documentation |
Compares community structures using various metrics
Description
This function assesses the distance between two community structures.
Usage
compare(
comm1,
comm2,
method = c("vi", "nmi", "split.join", "rand", "adjusted.rand")
)
Arguments
comm1 |
A |
comm2 |
A |
method |
Character scalar, the comparison method to use. Possible values: ‘vi’ is the variation of information (VI) metric of Meila (2003), ‘nmi’ is the normalized mutual information measure proposed by Danon et al. (2005), ‘split.join’ is the split-join distance of can Dongen (2000), ‘rand’ is the Rand index of Rand (1971), ‘adjusted.rand’ is the adjusted Rand index by Hubert and Arabie (1985). |
Value
A real number.
Author(s)
Tamas Nepusz ntamas@gmail.com
References
Meila M: Comparing clusterings by the variation of information. In: Scholkopf B, Warmuth MK (eds.). Learning Theory and Kernel Machines: 16th Annual Conference on Computational Learning Theory and 7th Kernel Workshop, COLT/Kernel 2003, Washington, DC, USA. Lecture Notes in Computer Science, vol. 2777, Springer, 2003. ISBN: 978-3-540-40720-1.
Danon L, Diaz-Guilera A, Duch J, Arenas A: Comparing community structure identification. J Stat Mech P09008, 2005.
van Dongen S: Performance criteria for graph clustering and Markov cluster experiments. Technical Report INS-R0012, National Research Institute for Mathematics and Computer Science in the Netherlands, Amsterdam, May 2000.
Rand WM: Objective criteria for the evaluation of clustering methods. J Am Stat Assoc 66(336):846-850, 1971.
Hubert L and Arabie P: Comparing partitions. Journal of Classification 2:193-218, 1985.
See Also
Community detection
as_membership(),
cluster_edge_betweenness(),
cluster_fast_greedy(),
cluster_fluid_communities(),
cluster_infomap(),
cluster_label_prop(),
cluster_leading_eigen(),
cluster_leiden(),
cluster_louvain(),
cluster_optimal(),
cluster_spinglass(),
cluster_walktrap(),
groups(),
make_clusters(),
membership(),
modularity.igraph(),
plot_dendrogram(),
split_join_distance(),
voronoi_cells()
Examples
g <- make_graph("Zachary")
sg <- cluster_spinglass(g)
le <- cluster_leading_eigen(g)
compare(sg, le, method = "rand")
compare(membership(sg), membership(le))