Question

I have a sparse graph with directed weighted edges. I have normalized the sum of outgoing weight edges of each vertex to be 1.

I run JUNG pagerank on it, and the score of some of the vertices is NaN. These vertices do not have outgoing edges. But this should not be an issue as JUNG api 2 states

If a vertex has no outgoing edges, then the probability of taking a random jump from that vertex is (by default) effectively 1.

I have tried a smaller subset of the graph and I do not encounter the NaN problem. Do you guys have any suggestions? Thank you.

Was it helpful?

Solution

Two possibilities occur to me: you've set alpha to something peculiar (unlikely) or some of your edge weights are zero (or NaN).

Try running it without specifying your own edge weights. If that works then there's something weird with your edge weights.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top