EVOLUTION-MANAGER
Edit File: compare.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Compares community structures using various metrics</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for compare {igraph}"><tr><td>compare {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Compares community structures using various metrics</h2> <h3>Description</h3> <p>This function assesses the distance between two community structures. </p> <h3>Usage</h3> <pre> compare( comm1, comm2, method = c("vi", "nmi", "split.join", "rand", "adjusted.rand") ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>comm1</code></td> <td> <p>A <code><a href="communities.html">communities</a></code> object containing a community structure; or a numeric vector, the membership vector of the first community structure. The membership vector should contain the community id of each vertex, the numbering of the communities starts with one.</p> </td></tr> <tr valign="top"><td><code>comm2</code></td> <td> <p>A <code><a href="communities.html">communities</a></code> object containing a community structure; or a numeric vector, the membership vector of the second community structure, in the same format as for the previous argument.</p> </td></tr> <tr valign="top"><td><code>method</code></td> <td> <p>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).</p> </td></tr> </table> <h3>Value</h3> <p>A real number. </p> <h3>Author(s)</h3> <p>Tamas Nepusz <a href="mailto:ntamas@gmail.com">ntamas@gmail.com</a> </p> <h3>References</h3> <p>Meila M: Comparing clusterings by the variation of information. In: Scholkopf B, Warmuth MK (eds.). <em>Learning Theory and Kernel Machines: 16th Annual Conference on Computational Learning Theory and 7th Kernel Workshop</em>, COLT/Kernel 2003, Washington, DC, USA. Lecture Notes in Computer Science, vol. 2777, Springer, 2003. ISBN: 978-3-540-40720-1. </p> <p>Danon L, Diaz-Guilera A, Duch J, Arenas A: Comparing community structure identification. <em>J Stat Mech</em> P09008, 2005. </p> <p>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. </p> <p>Rand WM: Objective criteria for the evaluation of clustering methods. <em>J Am Stat Assoc</em> 66(336):846-850, 1971. </p> <p>Hubert L and Arabie P: Comparing partitions. <em>Journal of Classification</em> 2:193-218, 1985. </p> <h3>See Also</h3> <p>See <code><a href="cluster_walktrap.html">cluster_walktrap</a></code>, <code><a href="cluster_spinglass.html">cluster_spinglass</a></code>, <code><a href="cluster_leading_eigen.html">cluster_leading_eigen</a></code>, <code><a href="cluster_edge_betweenness.html">cluster_edge_betweenness</a></code>, <code><a href="cluster_fast_greedy.html">cluster_fast_greedy</a></code>, <code><a href="cluster_label_prop.html">cluster_label_prop</a></code> <code><a href="cluster_louvain.html">cluster_louvain</a></code> <code><a href="cluster_leiden.html">cluster_leiden</a></code> for various community detection methods. </p> <h3>Examples</h3> <pre> g <- make_graph("Zachary") sg <- cluster_spinglass(g) le <- cluster_leading_eigen(g) compare(sg, le, method="rand") compare(membership(sg), membership(le)) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>