[Networkit] personalized PageRank implementation

Karim Kouki kookstrash at gmail.com
Thu May 4 18:35:46 CEST 2017


Hello,

I would like to implement the personalized PageRank with the help of the
Networkit Library SourceCode in C++.

In practical terms, this means in the followinf While loop:






while (! isConverged) {
handler.assureRunning();
G.balancedParallelForNodes([&](node u) {
pr[u] = 0.0;
G.forInEdgesOf(u, [&](node u, node v, edgeweight w) {
// note: inconsistency in definition in Newman's book (Ch. 7) regarding
directed graphs
// we follow the verbal description, which requires to sum over the
incoming edges
pr[u] += scoreData[v] * w / deg[v];
});
pr[u] *= damp;
if(u.edgeId in listIDs.Id){ //here, if an edge is part of a predefined
list, this if{} test would be valid
 //and the teleport term would be added
pr[u] += teleportProb; //
});

...




(see attachment)




I would like to add the teleport term only for a given list of nodes.

I thought the Partition/EdgeListPartition readers would help, but it needs
to read the special nodes from a text file and I potentially have a huge
file to read.


I was hoping there would be a node attribute that could help me do that.



Does anyone have an idea how to solve that issue?

(for the personalized pageRank algorithm, see: attachment 2, I want to
replicate the process described in this document)


Kind regards,
Karim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ira.uni-karlsruhe.de/pipermail/networkit/attachments/20170504/52f45df3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PersonalizedPageRank.cpp
Type: text/x-c++src
Size: 2203 bytes
Desc: not available
URL: <http://lists.ira.uni-karlsruhe.de/pipermail/networkit/attachments/20170504/52f45df3/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: APATE A novel appoach for automated credit card transaction fraud detection using network-based extensions (2015).pdf
Type: application/pdf
Size: 793376 bytes
Desc: not available
URL: <http://lists.ira.uni-karlsruhe.de/pipermail/networkit/attachments/20170504/52f45df3/attachment-0001.pdf>


More information about the NetworKit mailing list