page_rank | R Documentation |
Calculates the Google PageRank for the specified vertices.
page_rank(
graph,
algo = c("prpack", "arpack"),
vids = V(graph),
directed = TRUE,
damping = 0.85,
personalized = NULL,
weights = NULL,
options = NULL
)
graph |
The graph object. |
algo |
Character scalar, which implementation to use to carry out the
calculation. The default is |
vids |
The vertices of interest. |
directed |
Logical, if true directed paths will be considered for directed graphs. It is ignored for undirected graphs. |
damping |
The damping factor (‘d’ in the original paper). |
personalized |
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. |
weights |
A numerical vector or |
options |
A named list, to override some ARPACK options. See
|
For the explanation of the PageRank algorithm, see the following webpage: http://infolab.stanford.edu/~backrub/google.html, or the following reference:
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.
The page_rank()
function can use either the PRPACK library or ARPACK
(see arpack()
) to perform the calculation.
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.
A named list with entries:
vector |
A numeric vector with the PageRank scores. |
value |
When using the ARPACK method, the eigenvalue corresponding to the eigenvector with the PageRank scores is returned here. It is expected to be exactly one, and can be used to check that ARPACK has successfully converged to the expected eingevector. When using the PRPACK method, it is always set to 1.0. |
options |
Some information
about the underlying ARPACK calculation. See |
igraph_personalized_pagerank()
.
Tamas Nepusz ntamas@gmail.com and Gabor Csardi csardi.gabor@gmail.com
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.
Other centrality scores: closeness()
,
betweenness()
, degree()
Centrality measures
alpha_centrality()
,
authority_score()
,
betweenness()
,
closeness()
,
diversity()
,
eigen_centrality()
,
harmonic_centrality()
,
hits_scores()
,
power_centrality()
,
spectrum()
,
strength()
,
subgraph_centrality()
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.