Github user thunterdb commented on a diff in the pull request:
https://github.com/apache/spark/pull/16483#discussion_r106535595
--- Diff: graphx/src/main/scala/org/apache/spark/graphx/lib/PageRank.scala
---
@@ -322,13 +335,12 @@ object PageRank extends Logging {
def personalizedVertexProgram(id: VertexId, attr: (Double, Double),
msgSum: Double): (Double, Double) = {
val (oldPR, lastDelta) = attr
- var teleport = oldPR
- val delta = if (src==id) resetProb else 0.0
- teleport = oldPR*delta
-
- val newPR = teleport + (1.0 - resetProb) * msgSum
- val newDelta = if (lastDelta == Double.NegativeInfinity) newPR else
newPR - oldPR
- (newPR, newDelta)
+ val newPR = if (lastDelta == Double.NegativeInfinity) {
--- End diff --
My memory of the algorithm is a bit rusty. Why don't you need to check for
self-loops here anymore?
---
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]