graph-walker icon indicating copy to clipboard operation
graph-walker copied to clipboard

Clarification of walker.random_walks

Open RylanSchaeffer opened this issue 2 years ago • 2 comments

Hi! I'm calling walker.random_walks(self.graph, n_walks=15, walk_len=10), but the output numpy array has shape (1500, 10). Why is the first dimension multiplied by 100?

RylanSchaeffer avatar Feb 20 '23 21:02 RylanSchaeffer

n_walks represents the number of random walks per node. Si if your graph has 100 nodes, you'll have 10015 random walks. The kth random walk starting at node i will be accessible at the 100k+i index.

kerighan avatar Mar 12 '23 19:03 kerighan

Hi! Just had this exact same question, thanks for the clarification :slightly_smiling_face: And for this very useful project!

MadeInPierre avatar Jun 15 '23 08:06 MadeInPierre