aditya-grover / node2vec

http://snap.stanford.edu/node2vec/
MIT License
2.65k stars 914 forks source link

why unpersist graph here? #81

Open zhuhuangjian opened 5 years ago

zhuhuangjian commented 5 years ago

https://github.com/aditya-grover/node2vec/blob/883241e825e1473ef9916ac79f6686f5ef6b1603/node2vec_spark/src/main/scala/com/navercorp/Node2vec.scala#L101

shboy commented 4 years ago

because int different iter of numWalks, the graph should be reinitialized. \ p.s val (j, q) = GraphOps.setupAlias(clickNode.neighbors) val nextNodeIndex: PartitionID = GraphOps.drawAlias(j, q) clickNode.path = Array(vertexId, clickNode.neighbors(nextNodeIndex)._1) generates a random nextNodeIndex in graph init