GitHub user pfontana3w2 opened a pull request:

    https://github.com/apache/spark/pull/2100

    Error in Page Rank Computation in PageRank.scala

    I saw an error in the Page Rank computation for runUntilConverge() in 
PageRank.scala. It uses the oldPR instead of the resetProb. Note that the run() 
Method in PageRank.scala uses resetProb as my correction does here (see Lines 
95–96 of PageRank.scala).
    
    Here is the diff that I see (in case it is hidden later):
    ```scala
    -      val newPR = oldPR + (1.0 - resetProb) * msgSum
    +      // Equation: resetProb * (1-resetProb)*msgSum
    +      val newPR = resetProb + (1.0 - resetProb) * msgSum
    ```
    
    If I am incorrect, feel free to make the proper correction.
    
    Best Wishes

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/pfontana3w2/spark master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/2100.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2100
    
----
commit 493d7357f429ede73dc3e59c1e21c31c215fd87e
Author: Peter Fontana <[email protected]>
Date:   2014-08-22T20:32:50Z

    Fixed PageRank to add resetProb, not oldPR

commit 18eb2319beff5edd5d9914cb286e407ab1303daa
Author: Peter Fontana <[email protected]>
Date:   2014-08-22T20:36:42Z

    Corrected PageRankFile

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to