GraphEmbedding icon indicating copy to clipboard operation
GraphEmbedding copied to clipboard

关于deepwalk的随机采样问题

Open shexuan opened this issue 3 years ago • 0 comments

    def deepwalk_walk(self, walk_length, start_node):

        walk = [start_node]

        while len(walk) < walk_length:
            cur = walk[-1]
            cur_nbrs = list(self.G.neighbors(cur))
            if len(cur_nbrs) > 0:
                walk.append(random.choice(cur_nbrs))
            else:
                break
        return walk

个人觉得上面的函数是否不太妥当,完全没用到,各个结点间的转移概率。各个节点间的转移概率其实是可以统计得到的,是否用上会更好?

shexuan avatar Mar 14 '21 16:03 shexuan