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

关于Struc2vec构建相似度图代码的一些问题 #41

Open
WDdeBWT opened this issue Jul 28, 2020 · 0 comments
Open

关于Struc2vec构建相似度图代码的一些问题 #41

WDdeBWT opened this issue Jul 28, 2020 · 0 comments

Comments

@WDdeBWT
Copy link

WDdeBWT commented Jul 28, 2020

您好,我在使用struc2vec构建结构相似度的代码时发现有一些问题。

具体来说,当opt2_reduce_sim_calc开启的时候,get_vertices函数拿到的是对于与每个节点自己相似的邻居,这里的这个相似性是单向的。也就是假如a与b相似,则a的邻居中有b,若b与a也相似,则b的邻居中也有a(类似于有向图),然而在后面_get_layer_rep方法中,是把这种相似度当作无向情况来处理的,也就是只考虑了opt2_reduce_sim_calc为False的情况。
此时,当opt2为True时,由于a和b的相似邻居中都有对方,而构建边的时候,会为每个点保存“入”和“出”的两条边,这样就会导致重复的边。换句话说,我认为_get_layer_rep在opt2_reduce_sim_calc选项为True的时候,行为是有错误的。

期待您的回复
最后感谢您开源这部分代码,极大的方便了我的工作,节约了时间,谢谢

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