Skip to content

PagerankDelta correctness #38

@chris1274

Description

@chris1274

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions