Comments (3)
您好~ 目前deepwalk已知问题是对于独立点会存在将自身作为邻居顶点进行采样的问题,这是由于networkx的邻居获取机制导致的。不知您说的是否是这个问题?如果不是这个问题,麻烦指出具体的问题帮助我们进行改进。
我所做的研究中不存在孤立点的情况,所以应该不是你说的独立点重复采样的问题。为了回答你的问题,我做了如下实验,以最经典的karate网络为例(34个节点,不存在孤立点),我使用你提供的deepwalk代码和https://github.com/phanein/deepwalk 提供的代码,在相同参数的情况下(--max-memory-data-size 0 --number-walks 80 --representation-size 17 --walk-length 40 --window-size 10 --workers 1),取100次嵌入结果的平均值对每一个向量做比较,结果如下(从节点1到节点34,使用余弦相似度,调用python函数from sklearn.metrics.pairwise import cosine_similarity):
[0.4607906639208839], [0.14583083343027428], [0.10433700876067258], [0.10585915864593479], [0.29468624241130204], [0.31663012161867626], [0.1933105854441737], [0.3956301179280702], [0.38898165971535015], [0.1936263987721945], [0.3334481587066986], [0.08787716564314624], [0.2703404869330344], [0.5218187333875279], [0.244416501827768], [0.25748774755185555], [0.32319160785761236], [0.009651753567593884], [0.11258320489373647], [0.22947905518395237], [0.23214729423499547], [0.053709737355217675], [0.09656930378263275], [0.08120878398645703], [0.6030732143152714], [0.3215139532708406], [0.011497123270551716], [0.1388385320114997], [0.43689806198566505], [0.04997083306023275], [0.06674077466730642], [0.1447796439960975], [0.22911076195231844], [0.17835644390391345]]
这个差别是巨大的,因为同样的**写的代码是不可能有如此大的差异的,深入研究后发现是你的代码得到的嵌入向量有问题(我做了聚类,因为涉及到所写paper的研究内容,就不展开了)。
综上所述,我的整个发现问题的过程就是这样,具体代码我没有去查看,你可以重复一下我上述的实验。对比https://github.com/phanein/deepwalk和你的代码deepwalk出来的结果的差异性。
最后,我会关闭这个问题,因为我自己没有时间去解决,而且带了个人情绪去评论你所做的工作,很抱歉。
from graphembedding.
您好~ 目前deepwalk已知问题是对于独立点会存在将自身作为邻居顶点进行采样的问题,这是由于networkx的邻居获取机制导致的。不知您说的是否是这个问题?如果不是这个问题,麻烦指出具体的问题帮助我们进行改进。
我所做的研究中不存在孤立点的情况,所以应该不是你说的独立点重复采样的问题。为了回答你的问题,我做了如下实验,以最经典的karate网络为例(34个节点,不存在孤立点),我使用你提供的deepwalk代码和https://github.com/phanein/deepwalk 提供的代码,在相同参数的情况下(--max-memory-data-size 0 --number-walks 80 --representation-size 17 --walk-length 40 --window-size 10 --workers 1),取100次嵌入结果的平均值对每一个向量做比较,结果如下(从节点1到节点34,使用余弦相似度,调用python函数from sklearn.metrics.pairwise import cosine_similarity):
[0.4607906639208839], [0.14583083343027428], [0.10433700876067258], [0.10585915864593479], [0.29468624241130204], [0.31663012161867626], [0.1933105854441737], [0.3956301179280702], [0.38898165971535015], [0.1936263987721945], [0.3334481587066986], [0.08787716564314624], [0.2703404869330344], [0.5218187333875279], [0.244416501827768], [0.25748774755185555], [0.32319160785761236], [0.009651753567593884], [0.11258320489373647], [0.22947905518395237], [0.23214729423499547], [0.053709737355217675], [0.09656930378263275], [0.08120878398645703], [0.6030732143152714], [0.3215139532708406], [0.011497123270551716], [0.1388385320114997], [0.43689806198566505], [0.04997083306023275], [0.06674077466730642], [0.1447796439960975], [0.22911076195231844], [0.17835644390391345]]
这个差别是巨大的,因为同样的**写的代码是不可能有如此大的差异的,深入研究后发现是你的代码得到的嵌入向量有问题(我做了聚类,因为涉及到所写paper的研究内容,就不展开了)。
综上所述,我的整个发现问题的过程就是这样,具体代码我没有去查看,你可以重复一下我上述的实验。对比https://github.com/phanein/deepwalk和你的代码deepwalk出来的结果的差异性。
最后,我会关闭这个问题,因为我自己没有时间去解决,而且带了个人情绪去评论你所做的工作,很抱歉。
我看了一下双方的代码,个人感觉deepctr的实现没啥问题,倒是你发的那个github可能会有问题。
问题所在是 : folk出的子进程的random state可能不会是随机的
参考链接:
https://joblib.readthedocs.io/en/latest/auto_examples/parallel_random_state.html#sphx-glr-download-auto-examples-parallel-random-state-py
https://stackoverflow.com/questions/49847794/child-processes-generating-same-random-numbers-as-parent-process
deepctr
用的是joblib
的多进程,你提供的那个第三方用的是concurrent.futures.ProcessPoolExecutor
的多进程,后者的random state可能会存在问题。
个人拙见,如有不对,欢迎拍砖。
from graphembedding.
您好~ 目前deepwalk已知问题是对于独立点会存在将自身作为邻居顶点进行采样的问题,这是由于networkx
的邻居获取机制导致的。不知您说的是否是这个问题?如果不是这个问题,麻烦指出具体的问题帮助我们进行改进。
from graphembedding.
Related Issues (20)
- Documentation: Node Embedding in relations to Role Discovery
- ReFeX (recursive features)
- ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory HOT 1
- __init__() got an unexpected keyword argument 'size' HOT 5
- 如何使用GPU加速 HOT 1
- 请问能否提供数据来源,想了解数据的背景和含义?
- 运行deepwalk_wiki.py时出现DLL load failed
- line loss计算问题 HOT 3
- 能否提供可执行环境要求,总是报错 HOT 2
- SDNE,'NoneType' object is not callable
- TypeError: __init__() got an unexpected keyword argument 'iter'
- 在创建图G时发生读取文件错误
- node embedding methods to apply to multi-graph problems HOT 1
- line训练时报错
- fatal error C1083 HOT 1
- 'charmap' codec can't decode HOT 1
- 请问如何用gpu进行训练呢?
- 【小问题】struc2vec超过16线程跑不了
- 【Question】NotImplementedError: run SDNE in Python3.8, tf2.11.0 HOT 1
- Wrong:SDNE
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphembedding.