EVOLUTION-MANAGER
Edit File: page_rank.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: The Page Rank algorithm</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 page_rank {igraph}"><tr><td>page_rank {igraph}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>The Page Rank algorithm</h2> <h3>Description</h3> <p>Calculates the Google PageRank for the specified vertices. </p> <h3>Usage</h3> <pre> page_rank( graph, algo = c("prpack", "arpack"), vids = V(graph), directed = TRUE, damping = 0.85, personalized = NULL, weights = NULL, options = NULL ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>graph</code></td> <td> <p>The graph object.</p> </td></tr> <tr valign="top"><td><code>algo</code></td> <td> <p>Character scalar, which implementation to use to carry out the calculation. The default is <code>"prpack"</code>, which uses the PRPACK library (<a href="https://github.com/dgleich/prpack">https://github.com/dgleich/prpack</a>). This is a new implementation in igraph version 0.7, and the suggested one, as it is the most stable and the fastest for all but small graphs. <code>"arpack"</code> uses the ARPACK library, the default implementation from igraph version 0.5 until version 0.7.</p> </td></tr> <tr valign="top"><td><code>vids</code></td> <td> <p>The vertices of interest.</p> </td></tr> <tr valign="top"><td><code>directed</code></td> <td> <p>Logical, if true directed paths will be considered for directed graphs. It is ignored for undirected graphs.</p> </td></tr> <tr valign="top"><td><code>damping</code></td> <td> <p>The damping factor (‘d’ in the original paper).</p> </td></tr> <tr valign="top"><td><code>personalized</code></td> <td> <p>Optional vector giving a probability distribution to calculate personalized PageRank. For personalized PageRank, the probability of jumping to a node when abandoning the random walk is not uniform, but it is given by this vector. The vector should contains an entry for each vertex and it will be rescaled to sum up to one.</p> </td></tr> <tr valign="top"><td><code>weights</code></td> <td> <p>A numerical vector or <code>NULL</code>. This argument can be used to give edge weights for calculating the weighted PageRank of vertices. If this is <code>NULL</code> and the graph has a <code>weight</code> edge attribute then that is used. If <code>weights</code> is a numerical vector then it used, even if the graph has a <code>weights</code> edge attribute. If this is <code>NA</code>, then no edge weights are used (even if the graph has a <code>weight</code> edge attribute. This function interprets edge weights as connection strengths. In the random surfer model, an edge with a larger weight is more likely to be selected by the surfer.</p> </td></tr> <tr valign="top"><td><code>options</code></td> <td> <p>A named list, to override some ARPACK options. See <code><a href="arpack.html">arpack</a></code> for details. This argument is ignored if the PRPACK implementation is used.</p> </td></tr> </table> <h3>Details</h3> <p>For the explanation of the PageRank algorithm, see the following webpage: <a href="http://infolab.stanford.edu/~backrub/google.html">http://infolab.stanford.edu/~backrub/google.html</a>, or the following reference: </p> <p>Sergey Brin and Larry Page: The Anatomy of a Large-Scale Hypertextual Web Search Engine. Proceedings of the 7th World-Wide Web Conference, Brisbane, Australia, April 1998. </p> <p>The <code>page_rank</code> function can use either the PRPACK library or ARPACK (see <code><a href="arpack.html">arpack</a></code>) to perform the calculation. </p> <p>Please note that the PageRank of a given vertex depends on the PageRank of all other vertices, so even if you want to calculate the PageRank for only some of the vertices, all of them must be calculated. Requesting the PageRank for only some of the vertices does not result in any performance increase at all. </p> <h3>Value</h3> <p>A named list with entries: </p> <table summary="R valueblock"> <tr valign="top"><td><code>vector</code></td> <td> <p>A numeric vector with the PageRank scores.</p> </td></tr> <tr valign="top"><td><code>value</code></td> <td> <p>The eigenvalue corresponding to the eigenvector with the page rank scores. It should be always exactly one.</p> </td></tr> <tr valign="top"><td><code>options</code></td> <td> <p>Some information about the underlying ARPACK calculation. See <code><a href="arpack.html">arpack</a></code> for details. This entry is <code>NULL</code> if not the ARPACK implementation was used.</p> </td></tr> </table> <h3>Author(s)</h3> <p>Tamas Nepusz <a href="mailto:ntamas@gmail.com">ntamas@gmail.com</a> and Gabor Csardi <a href="mailto:csardi.gabor@gmail.com">csardi.gabor@gmail.com</a> </p> <h3>References</h3> <p>Sergey Brin and Larry Page: The Anatomy of a Large-Scale Hypertextual Web Search Engine. Proceedings of the 7th World-Wide Web Conference, Brisbane, Australia, April 1998. </p> <h3>See Also</h3> <p>Other centrality scores: <code><a href="closeness.html">closeness</a></code>, <code><a href="betweenness.html">betweenness</a></code>, <code><a href="degree.html">degree</a></code> </p> <h3>Examples</h3> <pre> g <- sample_gnp(20, 5/20, directed=TRUE) page_rank(g)$vector g2 <- make_star(10) page_rank(g2)$vector # Personalized PageRank g3 <- make_ring(10) page_rank(g3)$vector reset <- seq(vcount(g3)) page_rank(g3, personalized=reset)$vector </pre> <hr /><div style="text-align: center;">[Package <em>igraph</em> version 1.3.5 <a href="00Index.html">Index</a>]</div> </body></html>