Skip to content
This repository has been archived by the owner on Nov 7, 2020. It is now read-only.

HolE implementation seems to ignore labels #11

Open
svjan5 opened this issue Oct 11, 2018 · 2 comments
Open

HolE implementation seems to ignore labels #11

svjan5 opened this issue Oct 11, 2018 · 2 comments

Comments

@svjan5
Copy link

svjan5 commented Oct 11, 2018

Hi,
I couldn't understand why are we ignoring label information in hole.py by taking np.abs during softplus operation defined in math_utils.py (link).

Thanks in advance

@mana-ysh
Copy link
Owner

Hi @svjan5
My softplus function has max(0, x) term, so it doesn’t ignore the label, I think.

In [23]: def softplus(x): return np.maximum(0, x)+np.log(1+np.exp(-np.abs(-x)))
In [35]: softplus(1)
Out[35]: 1.3132616875182228

In [36]: softplus(-1)
Out[36]: 0.31326168751822286

Since naive softplus function often occurs overflow warning, my function has this form.

@svjan5
Copy link
Author

svjan5 commented Oct 11, 2018

Hi,
Thank you for the reply.
I was matching your HolE implementation with the original implementation from M. Nickel (scikit-kge). There is some difference in the computation of score function (yours|his). Also he doesn't include max(0,x) while computing loss (link).

Can you please clarify?

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

No branches or pull requests

2 participants