Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20839

Incorrect Dynamic PageRank calculation

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 2.1.1
    • Fix Version/s: None
    • Component/s: GraphX
    • Labels:
      None

      Description

      Correct me if I am wrong
      I think there are three places where the pagerank calculation is incorrect
      1st) in the VertexProgram (line 318 of PageRank.scala in spark 2.1.1)
      val newPR = oldPR + (1.0 - resetProb) * msgSum
      it should be
      val newPR = resetProb + (1.0 - resetProb) * msgSum

      2nd) in the message sending part (line 336 of the same file)
      Iterator((edge.dstId, edge.srcAttr._2 * edge.attr))
      should be
      Iterator((edge.dstId, edge.srcAttr._1 * edge.attr))
      as we should be sending the edge weight multiplied by the current pagerank of the source vertex (not the vertex's delta)

      3rd) the tol check against the abs of the delta (line 335)
      if (edge.srcAttr._2 > tol) {
      should be
      if (Math.abs(edge.srcAttr._2) > tol) {

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bahaelaila7 BahaaEddin AlAila
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: