Thanks very much for this. This is very helpful! -Ahmed
On Sun, Dec 14, 2014 at 6:08 PM, Tamas Nepusz <[email protected]> wrote: > > Hello, > > This is a bug in the pagerank() method of the Vertex object; it seems that > it > always returns the PageRank score of the first vertex. I'll fix this ASAP. > > However, note that there is usually no point in calculating PageRank for > a single vertex because calculating it for a single vertex would require to > calculate it for the whole graph anyway. So, it is more efficient to do it > like > this: > > pr = g.pagerank() > for v in g.vs: > print "{0}, {1}, {2}".format(v["name"], v.degree(), pr[v.index]) > > T. > > On 12/14, Ahmed Abdeen Hamed wrote: > > Hello friends, > > > > I am calling the vertex pagerank function on a graph as follows: > > > > for v in g.vs: > > print (str(v["name"]) + "," + str(v.degree()) + "," + > > str(v.pagerank()))# > > > > > > carbon,44,0.0211771680628 > > offsets,2,0.0211771680628 > > weather,10,0.0211771680628 > > extremes,10,0.0211771680628 > > assessment,6,0.0211771680628 > > > > Even though the degrees are different, I get identical PR for each > vertex. > > When calling the pagerank on the graph instance, I get more realistic > > results > > > > I call the graph PR as follow: > > > > print g.vs.pagerank() > > > > Not sure what is going on, any idea? > > > > Thanks very much, > > > > -Ahmed > > > _______________________________________________ > > igraph-help mailing list > > [email protected] > > https://lists.nongnu.org/mailman/listinfo/igraph-help > > > -- > T. >
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
