Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PagerankDelta correctness #38

Open
chris1274 opened this issue Mar 25, 2021 · 0 comments
Open

PagerankDelta correctness #38

chris1274 opened this issue Mar 25, 2021 · 0 comments

Comments

@chris1274
Copy link

It looks like you are discarding the residuals of all vertices every round, as opposed to only resetting residuals that are greater than the activation threshold. As a consequence, a vertex that takes more than one round to accumulate enough residual error to become active again, stays inactive, and the algorithm converges in less iterations than it should.

Maybe something like:

struct PR_Vertex_Reset {
  double* nghSum;
  PR_Vertex_Reset(double* _nghSum) :
    nghSum(_nghSum) {}
  inline bool operator () (uintE i) {
    if (nghSum[i] > epsilon2) nghSum[i] = 0.0; //reset only if we crossed threshold
    return 1;
  }
};

Please let me know if I am misunderstanding something here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant