Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于deepwalk的随机采样问题 #47

Open
shexuan opened this issue Mar 14, 2021 · 0 comments
Open

关于deepwalk的随机采样问题 #47

shexuan opened this issue Mar 14, 2021 · 0 comments

Comments

@shexuan
Copy link

shexuan commented Mar 14, 2021

    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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant