You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
I think there is a problem with the overloaded pagerank function for SimpleWeightedDiGraphs.
Note that if we define the (unweighted) graph based on A = [0 1 1; 1 0 0; 0 1 0], where g = SimpleDiGraph(A), the call pagerank(g)results in something like [0.3878; 0.3974; 0.2148] (which I believe is correct), while the same call on h = SimpleWeightedDiGraph(A) results in [0.3974; 0.3878; 0.2148] (note that the first and second entries are now swapped).
My guess is that the problem is in the second line of the code, where the summation along rows S = vec(sum(A, dims=1)) should be on M (or A transpose, if you like). For truly weighted graphs (unlike the trivial example above), this leads to fairly wacky results.
On an unrelated note (two, actually), this is my first issue on GitHub, so apologies if I am not following the proper etiquette. More importantly, thank you very much for the fantastic effort made in building this (and all related) package(s).
The text was updated successfully, but these errors were encountered:
I think there is a problem with the overloaded pagerank function for SimpleWeightedDiGraphs.
Note that if we define the (unweighted) graph based on
A = [0 1 1; 1 0 0; 0 1 0]
, whereg = SimpleDiGraph(A)
, the callpagerank(g)
results in something like[0.3878; 0.3974; 0.2148]
(which I believe is correct), while the same call onh = SimpleWeightedDiGraph(A)
results in[0.3974; 0.3878; 0.2148]
(note that the first and second entries are now swapped).My guess is that the problem is in the second line of the code, where the summation along rows
S = vec(sum(A, dims=1))
should be onM
(orA
transpose, if you like). For truly weighted graphs (unlike the trivial example above), this leads to fairly wacky results.On an unrelated note (two, actually), this is my first issue on GitHub, so apologies if I am not following the proper etiquette. More importantly, thank you very much for the fantastic effort made in building this (and all related) package(s).
The text was updated successfully, but these errors were encountered: