page.rank               package:igraph               R Documentation

_T_h_e _P_a_g_e _R_a_n_k _a_l_g_o_r_i_t_h_m

_D_e_s_c_r_i_p_t_i_o_n:

     Calculates the Google PageRank for the specified vertices.

_U_s_a_g_e:

     page.rank (graph, vids = V(graph), directed = TRUE, damping = 0.85, 
         weights = NULL, options = igraph.arpack.default) 
     page.rank.old (graph, vids = V(graph), directed = TRUE, niter = 1000, 
         eps = 0.001, damping = 0.85, old = FALSE) 

_A_r_g_u_m_e_n_t_s:

   graph: The graph object. 

    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).

 weights: A numerical vector or 'NULL'. This argument can be used to
          give edge weights for calculating the weighted PageRank of
          vertices. If this is 'NULL' and the graph has a 'weight' edge
          attribute then that is used. If 'weights' is a numerical
          vector then it used, even if the graph has a 'weights' edge
          attribute. If this is 'NA', then no edge weights are used
          (even if the graph has a 'weight' edge attribute.

 options: A named list, to override some ARPACK options. See 'arpack'
          for details.

   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.

     old: A logical scalar, whether the old style (pre igraph 0.5)
          normalization to use. See details below.

_D_e_t_a_i_l_s:

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

     igraph 0.5 (and later) contains two PageRank calculation
     implementations. The 'page.rank' function uses ARPACK to perform
     the calculation, see also 'arpack'.

     The 'page.rank.old' function performs a simple power method, this
     is the implementation that was available under the name
     'page.rank' in pre 0.5 igraph versions. Note that 'page.rank.old'
     has an argument called 'old'. If this argument is 'FALSE' (the
     default), then the proper PageRank algorithm is used, i.e. (1-d)/n
     is added to the weighted PageRank of vertices to calculate the
     next iteration. If this argument is 'TRUE' then (1-d) is added,
     just like in the PageRank paper; d is the damping factor, and n is
     the total number of vertices. A further difference is that the old
     implementation does not renormalize the page rank vector after
     each iteration. Note that the 'old=FALSE' method is not stable, is
     does not necessarily converge to a fixed point. It should be
     avoided for new code, it is only included for compatibility with
     old igraph versions.

     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.

_V_a_l_u_e:

     For 'page.rank' a named list with entries: 

  vector: A numeric vector with the PageRank scores.

   value: The eigenvalue corresponding to the eigenvector with the page
          rank scores. It should be always exactly one.

 options: Some information about the underlying ARPACK calculation. See
          'arpack' for details.


     For 'page.rank.old' a numeric vector of Page Rank scores.

_A_u_t_h_o_r(_s):

     Tamas Nepusz ntamas@rmki.kfki.hu and Gabor Csardi
     csardi@rmki.kfki.hu

_R_e_f_e_r_e_n_c_e_s:

     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.

_S_e_e _A_l_s_o:

     Other centrality scores: 'closeness', 'betweenness', 'degree'

_E_x_a_m_p_l_e_s:

     g <- random.graph.game(20, 5/20, directed=TRUE)
     page.rank(g)$vector

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

