thunlp / OpenNE

An Open-Source Package for Network Embedding (NE)
MIT License
1.68k stars 485 forks source link

TADW中的w和h优化方法?牛顿或者拟牛顿? #75

Closed liujinxin1 closed 4 years ago

liujinxin1 commented 5 years ago

您好,我是一名正在研读网络表示学习的学生,读到了tadw方法的文章,用您在该网站发布代码进行了复现,在读到w和h的迭代优化过程中,因代码知识薄弱遇到了些问题,看到了Hess定义变量感觉像是用了牛顿法或者拟牛顿法,希望能在百忙之中解答疑惑,谢谢

RealTommyHu commented 5 years ago

Hello,老哥看明白这儿了吗,能否给我讲讲,我也是一头雾水啊

liujinxin1 commented 5 years ago

老弟啊,我自己没看懂去和66楼童鞋问了和你同样的问题,他的回答:用了共轭梯度下降,搜一下,就是标准的Fletcher-Reeves

RealTommyHu commented 5 years ago

原来是这样,谢啦

RealTommyHu commented 5 years ago
`~)} }{9L0(4(7EH(TJ(JLB

87行这个对H的偏导你求了吗,我算出来多了个系数2

liujinxin1 commented 5 years ago

不用谢,不知道你有没有复现过关于NE的链接预测的实验,Dru-Mara /EvalNE

------------------ 原始邮件 ------------------ 发件人: "tommyH"notifications@github.com; 发送时间: 2019年8月31日(星期六) 中午1:48 收件人: "thunlp/OpenNE"OpenNE@noreply.github.com; 抄送: "刘金新"1561044851@qq.com;"Author"author@noreply.github.com; 主题: Re: [thunlp/OpenNE] TADW中的w和h优化方法?牛顿或者拟牛顿? (#75)

原来是这样,谢啦

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

RealTommyHu commented 5 years ago

没有欸,我前天才刚开始看NE,我后面有时间了看看

liujinxin1 commented 5 years ago

附件里我推导过程,跟你一样,也差个2,而且我也不知道他的二阶导怎么算的

------------------ 原始邮件 ------------------ 发件人: "tommyH"notifications@github.com; 发送时间: 2019年8月31日(星期六) 中午1:53 收件人: "thunlp/OpenNE"OpenNE@noreply.github.com; 抄送: "刘金新"1561044851@qq.com;"Author"author@noreply.github.com; 主题: Re: [thunlp/OpenNE] TADW中的w和h优化方法?牛顿或者拟牛顿? (#75)

87行这个对H的偏导你求了吗,我算出来多了个系数2 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

RealTommyHu commented 5 years ago

好吧

liujinxin1 commented 5 years ago

你有运行过line那个方法吗? 我在终端运行的时候出现这样的错误 File "D:\software\Python3.5\lib\site-packages\openne-0.0.0py3.5.egg\openne__main__.py", line 128, in main model = line.LINE(g, epoch=args.epochs, rep_size=args.representation_size, order=args.order, NameError: name 'line' is not defined 后来把它单拎出来在pycharm上运行又有错误: ile "C:\Users\liujinxin\Desktop\line\OpenNE-master\src\openne\line.py", line 132, in gen_sampling_table node_degree[look_up[edge[0]] IndexError: index 2708 is out of bounds for axis 0 with size 2708

------------------ 原始邮件 ------------------ 发件人: "tommyH"notifications@github.com; 发送时间: 2019年8月31日(星期六) 下午2:05 收件人: "thunlp/OpenNE"OpenNE@noreply.github.com; 抄送: "刘金新"1561044851@qq.com;"Author"author@noreply.github.com; 主题: Re: [thunlp/OpenNE] TADW中的w和h优化方法?牛顿或者拟牛顿? (#75)

好吧

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

liujinxin1 commented 4 years ago

Hello,我是以前跟你讨论过OPENNE库里边TADW那篇论文代码的学生,我最近读了一篇(IJCAI-18)Discrete Network Embedding论文,想找人讨论一下里边的优化过程,我有点看不懂。        1.其中文中描述采用proximal gradient method来优化公式(9)得到公式(10),(10)所代表的是公式(9)的代理函数,没有找到参考文献不是很明白这一步是怎么得到的?        2.公式(10)是怎么推导到公式(11)?     如果你读过希望能帮我答疑解惑,祝你新年快乐,。

cgq15 commented 4 years ago

您好,TADW所用的优化方法是共轭梯度下降。正如 @RobsonHu 所说,我们的代码中求导少了系数2,现在已经在新版修复,感谢您的指出!