igraph (version 0.4.1)

page.rank: The Page Rank algorithm

Description

Calculates the Google PageRank for the specified vertices.

Usage

page.rank(graph, nodes = V(graph), directed = is.directed(graph),
    niter = 1000, eps = 0.001, damping = 0.85)

Arguments

graph
The graph object.
nodes
The vertices of interest.
directed
Logical, if true directed paths will be considered for directed graphs. It is ignored for undirected graphs.
niter
The maximum number of iterations to perform.
eps
The algorithm will consider the calculation as complete if the difference of PageRank values between iterations change less than this value for every node.
damping
The damping factor (d in the original paper).

Value

  • A numeric vector of Page Rank scores.

Details

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.

Since the calculation is an iterative process, the algorithm is stopped after a given count of iterations or if the PageRank value differences between iterations are less than a predefined value.

For the explanation of the PageRank algorithm, see the following webpage: http://www-db.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.

References

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.

See Also

Other centrality scores: closeness, betweenness, degree

Examples

Run this code
g <- random.graph.game(20, 5/20, directed=TRUE)
page.rank(g)

g2 <- graph.star(10)
page.rank(g2)

Run the code above in your browser using DataCamp Workspace