Comment 2 for bug 1123003

Revision history for this message
Tamás Nepusz (ntamas) wrote :

I'm no expert in the R interface, but:

1) page.rank has a bunch of other arguments besides the graph itself, and the ARPACK options are the last one, so chances are that you must specify the name of the argument explicitly. For instance, if you write

page.rank(g, vids=V(g), myoptions)

then "myoptions" gets interpreted as the argument that comes _after_ vids, which is "directed". The correct invocation is:

page.rank(g, options=myoptions)

or

page.rank(g, vids=whatever, options=myoptions)

2) The number of iterations is _not_ the number of iterations in the "classical" power method (that was used in page.rank.old) but the number of iterations in the implicitly restarted Arnoldi method that page.rank uses. Lowering it might yield completely incorrect results. You might want to play around with the "tol" parameter instead, which sets the tolerance value used when calculating the Ritz values.

3) The error message that you get ("The Schur form computed by LAPACK routine dlahqr" etcetera) is unrelated to the number of iterations anyway. This error message usually indicates that there is something "pathological" in your graph that prevents the implicitly restarted Arnoldi method to terminate successfully. Usually, this happens when your graph has multiple disconnected components, so it would probably make sense to decompose the graph into individual subcomponents (see ?decompose.graph) and then calculate the PageRank on each of them individually. (Yes, page.rank should do it automatically on its own, but we are about to switch to a new implementation soon which avoids these problems).