RandomWalk(walkLength: Int = 10, numWalks: Int = 1, seed: Long = -1)

Implements random walks on unweighted graph

This algorithm starts numWalks unbiased random walks from each node and terminates them after the walks have reached walkLength nodes. The network is treated as directed and if a vertex has no outgoing edges, the walk remains at this vertex for the remaining steps.


walkLength: Int = 10

maximum length of generated walks

numWalks: Int = 1

number of walks to start for each node

seed: Long

seed for the random number generator


Currently, results are non-deterministic even with fixed seed, likely due to non-deterministic message order.


walks: Array[ArrayBuffer[String]]: List of nodes for each random walk started from this vertex


vertex 1

vertex 2

vertex walkLength

name: String

name: String

name: String

Each row of the table corresponds to a single random walk and columns correspond to the vertex at a given step