对deepwalk的改进:替换deepwalk中的neighborhood sampling strategy,即从随机游走(randomwalk)改成node2vecWalk
deepwalk见博客
node2vecWalk
下面介绍Πvx怎么计算
dtx为啥取值只可能是0,1,2:因为t和v相邻,v和x相邻,只有三种情况:
- t和x相同:dtx=0
- t和x不相邻:dtx=2
- t和x相邻:dtx=1
node2vec伪代码
in any random walk, there is an implicit bias due to the choice of the start node u. Since we learn representations for all nodes, we offset this bias by simulating r random walks of fixed length l starting from every node.