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

More explanation about the core code #1

Open
wanpifeng4ever opened this issue Nov 14, 2017 · 1 comment
Open

More explanation about the core code #1

wanpifeng4ever opened this issue Nov 14, 2017 · 1 comment

Comments

@wanpifeng4ever
Copy link

Hi,
I recently read the paper and cannot understand the idea of Analogy Model and also its implementation. It seems that the score function in line 574~590 of the main.cpp is the hybrid between Distmult and ComplEx models. How exactly is it related to the formulation of Analogy model in the paper?
Thanks for any help.

@quark0
Copy link
Owner

quark0 commented Nov 14, 2017

You're right that it can be viewed as the hybrid of DistMult and ComplEx. Let's assume the relational matrix in ANALOGY consists of $a$ real scalars and $b$ 2x2 blocks, it is not hard to verify that its score function can be decomposed as the summation of the DistMult score of embedding size $a$ and the ComplEx score involving $b/2$ complex numbers.

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

2 participants