Skip to content

Instantly share code, notes, and snippets.

@josep2
Last active April 2, 2017 22:55
Show Gist options
  • Save josep2/7318545c42a4fe70a59de26785db7aec to your computer and use it in GitHub Desktop.
Save josep2/7318545c42a4fe70a59de26785db7aec to your computer and use it in GitHub Desktop.
val results = g.pageRank.resetProbability(0.15).tol(0.05).run()
// resetProbability and TOL are convergence parameters
results.edges.select("src", "dst", "weight").show()
+---+---+------+
|src|dst|weight|
+---+---+------+
| d| a| 1.0|
| a| b| 0.5|
| a| e| 0.5|
| e| f| 0.5|
| e| d| 0.5|
| f| c| 1.0|
| b| c| 1.0|
| c| b| 1.0|
+---+---+------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment