You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/15 03:14:30 UTC

[GitHub] [spark] f422661 opened a new pull request #24608: fixed pagerank.py error result.

f422661 opened a new pull request #24608: fixed  pagerank.py error result.
URL: https://github.com/apache/spark/pull/24608
 
 
   fixed the error result of pagerank.
   The pagerank formulation is "rank * 0.85 + (1/number of vals) * 0.15"
   
   ## What changes were proposed in this pull request?
   1. add  "num_vals = ranks.count()"
   2. modify : ranks = contribs.reduceByKey(add).mapValues(lambda rank: rank * 0.85 + (1/num_vals) * 0.15)
   (Please fill in changes proposed in this fix)
   
   ## How was this patch tested?
   
   (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
   (If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
   
   Please review http://spark.apache.org/contributing.html before opening a pull request.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org