Re: About the pagerank for weighted directed graph

433 views
Skip to first unread message

Danny Bickson

unread,
Jan 28, 2014, 4:07:11 PM1/28/14
to GraphLab Users, graphchi-discuss
Hi,
The outgoing edges are used for sending the node pagerank value into the neighbors to use it for their computation. So the out edges are actually used as messages. 
You can add an additional value into the edge data structure which will be read only for storing the initial weight read from the file.

Hope this helps,

Danny Bickson
Co-Founder
GraphLab Inc.


On Tue, Jan 28, 2014 at 9:05 PM, Jinxue Zhang <zhang...@gmail.com> wrote:
Hi Danny, thanks very much for your fast reply!

Yes at the first iteration, each edge weight has been set to 1/num_outedgess. However, the following iterations will set it to the pagerank/v.num_outedges();, as shown in  https://github.com/GraphChi/graphchi-cpp/blob/master/example_apps/pagerank.cpp#L94-L104. So it seems that the edge weight has set to the pagerank of its starting vertex.

Sorry, I might not state clearly about the weight. I tentatively want to build a weighted edgelist file with the format for each line as <src dst weight>. This weight is a permanent for each edge and conflicts with the contemporary 'weight' during the shard updating iterations. Thus shall I use the dynamic data to store both the permanent and contemporary 'weights'?  

On Monday, January 27, 2014 11:42:31 PM UTC-7, Danny Bickson wrote:
Hi, 
I guess you are asking about graphchi?

The graph is considered undirected and at the first iteration each edge weight is set to 1/ num_of_neighbors, see the code here: https://github.com/GraphChi/graphchi-cpp/blob/master/example_apps/pagerank.cpp#L81-L82

which reads a matrix market format file (see documentation here: http://bickson.blogspot.co.il/2012/02/matrix-market-format.html)

Regarding your question, edge->get_data() does not store the temporary pagerank value, but does get the edge value (which is 1/num_of_neighbors). 

Anyway the only change you have to do is change the way the weights are initialized since the rest of the algorithm takes the weights into account.

Best, 

Danny Bickson
Co-Founder
GraphLab Inc.


On Tue, Jan 28, 2014 at 6:09 AM, <zhang...@gmail.com> wrote:
Hi all, recently I am working on computing the pagerank value for the weighted directed graph, i.e., the edgelist format is "<src> <dst> <weight>". Instead treating each out-edge equally in unweighted graphs, Pagerank for weighted graph should assign the value proportional to the weight of each out-edge. It seems that the current example_apps/pagerank.cpp works for the unweighted graph, and graphchi_edge->get_data() has been used for store the temporary pagerank value. Any idea on include the pre-defined edge weight during the pagerank computation? Thanks very much!

--
You received this message because you are subscribed to the Google Groups "GraphLab Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to graphlab-kdd...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "GraphLab Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to graphlab-kdd...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Jinxue Zhang

unread,
Jan 28, 2014, 7:30:41 PM1/28/14
to graphl...@googlegroups.com, graphchi-discuss, bic...@graphlab.com
Hi Danny, thanks for the suggestion. By adding an value to the edge data, I finally got the expected result. Thanks very much!

Jinxue Zhang

unread,
Jan 30, 2014, 12:53:09 PM1/30/14
to graphchi...@googlegroups.com, graphl...@googlegroups.com, bic...@graphlab.com
Hi all, upload the app for computing the pagerank on weighted graphs.
pagerank_weighted.cpp
Reply all
Reply to author
Forward
0 new messages