EVOLUTION-MANAGER
Edit File: betweenness.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: Vertex and edge betweenness centrality</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 estimate_betweenness {igraph}"><tr><td>estimate_betweenness {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Vertex and edge betweenness centrality</h2> <h3>Description</h3> <p>The vertex and edge betweenness are (roughly) defined by the number of geodesics (shortest paths) going through a vertex or an edge. </p> <h3>Usage</h3> <pre> estimate_betweenness( graph, vids = V(graph), directed = TRUE, cutoff, weights = NULL, nobigint = TRUE ) betweenness( graph, v = V(graph), directed = TRUE, weights = NULL, nobigint = TRUE, normalized = FALSE, cutoff = -1 ) edge_betweenness( graph, e = E(graph), directed = TRUE, weights = NULL, cutoff = -1 ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The graph to analyze.</p> </td></tr> <tr valign="top"><td><code>vids</code></td> <td> <p>The vertices for which the vertex betweenness estimation will be calculated.</p> </td></tr> <tr valign="top"><td><code>directed</code></td> <td> <p>Logical, whether directed paths should be considered while determining the shortest paths.</p> </td></tr> <tr valign="top"><td><code>cutoff</code></td> <td> <p>The maximum path length to consider when calculating the betweenness. If zero or negative then there is no such limit.</p> </td></tr> <tr valign="top"><td><code>weights</code></td> <td> <p>Optional positive weight vector for calculating weighted betweenness. If the graph has a <code>weight</code> edge attribute, then this is used by default. Weights are used to calculate weighted shortest paths, so they are interpreted as distances.</p> </td></tr> <tr valign="top"><td><code>nobigint</code></td> <td> <p>Logical scalar, whether to use big integers during the calculation. Deprecated since igraph 1.3 and will be removed in igraph 1.4.</p> </td></tr> <tr valign="top"><td><code>v</code></td> <td> <p>The vertices for which the vertex betweenness will be calculated.</p> </td></tr> <tr valign="top"><td><code>normalized</code></td> <td> <p>Logical scalar, whether to normalize the betweenness scores. If <code>TRUE</code>, then the results are normalized by the number of ordered or unordered vertex pairs in directed and undirected graphs, respectively. In an undirected graph, </p> <p style="text-align: center;"><i>Bnorm=2*B/((n-1)*(n-2)),</i></p> <p> where <i>Bnorm</i> is the normalized, <i>B</i> the raw betweenness, and <i>n</i> is the number of vertices in the graph.</p> </td></tr> <tr valign="top"><td><code>e</code></td> <td> <p>The edges for which the edge betweenness will be calculated.</p> </td></tr> </table> <h3>Details</h3> <p>The vertex betweenness of vertex <code>v</code> is defined by </p> <p style="text-align: center;"><i>sum( g_ivj / g_ij, i!=j,i!=v,j!=v)</i></p> <p>The edge betweenness of edge <code>e</code> is defined by </p> <p style="text-align: center;"><i>sum( g_iej / g_ij, i!=j).</i></p> <p><code>betweenness</code> calculates vertex betweenness, <code>edge_betweenness</code> calculates edge betweenness. </p> <p>Here <i>g_ij</i> is the total number of shortest paths between vertices <i>i</i> and <i>j</i> while <i>g_{ivj}</i> is the number of those shortest paths which pass though vertex <i>v</i>. </p> <p>Both functions allow you to consider only paths of length <code>cutoff</code> or smaller; this can be run for larger graphs, as the running time is not quadratic (if <code>cutoff</code> is small). If <code>cutoff</code> is zero or negative, then the function calculates the exact betweenness scores. Using zero as a cutoff is <em>deprecated</em> and future versions (from 1.4.0) will treat zero cutoff literally (i.e. no paths considered at all). If you want no cutoff, use a negative number. </p> <p><code>estimate_betweenness</code> and <code>estimate_edge_betweenness</code> are aliases for <code>betweenness</code> and <code>edge_betweenness</code>, with a different argument order, for sake of compatibility with older versions of igraph. </p> <p>For calculating the betweenness a similar algorithm to the one proposed by Brandes (see References) is used. </p> <h3>Value</h3> <p>A numeric vector with the betweenness score for each vertex in <code>v</code> for <code>betweenness</code>. </p> <p>A numeric vector with the edge betweenness score for each edge in <code>e</code> for <code>edge_betweenness</code>. </p> <h3>Note</h3> <p><code>edge_betweenness</code> might give false values for graphs with multiple edges. </p> <h3>Author(s)</h3> <p>Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>References</h3> <p>Freeman, L.C. (1979). Centrality in Social Networks I: Conceptual Clarification. <em>Social Networks</em>, 1, 215-239. </p> <p>Ulrik Brandes, A Faster Algorithm for Betweenness Centrality. <em>Journal of Mathematical Sociology</em> 25(2):163-177, 2001. </p> <h3>See Also</h3> <p><code><a href="closeness.html">closeness</a></code>, <code><a href="degree.html">degree</a></code>, <code><a href="harmonic_centrality.html">harmonic_centrality</a></code> </p> <h3>Examples</h3> <pre> g <- sample_gnp(10, 3/10) betweenness(g) edge_betweenness(g) </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>