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

Computation of integral term for dynamic link prediction #7

Open
SimonTommerup opened this issue Apr 1, 2021 · 0 comments
Open

Computation of integral term for dynamic link prediction #7

SimonTommerup opened this issue Apr 1, 2021 · 0 comments

Comments

@SimonTommerup
Copy link

Hi

I am trying to make my own implementation of DyRep and have used your code and paper for inspiration. However, I have difficulty understanding your computation of the integral term in the conditional density.

In the function cond_density you do the following:

Lambda_sum = torch.cumsum(self.Lambda_dict.flip(0), 0).flip(0) / len(self.Lambda_dict)

i.e. the accumulated sum from most recent time step to the time step 4999 steps in the past divided by the number of steps.

Is it understood correctly that this something like a Riemann approximation of the integral term in the conditional density function (as you quote from the Dyrep paper on page 9)?

If yes, how do you take into account that the time steps in the sum are not equidistant?

Also I noticed that on the first evaluation (running with batch size of 200) the lambda_dict has only 4000 recordings - would this not influence the correctness of the sum approximation as it is still divided by 5000 but only has 4000 terms?

I hope that you have time to explain briefly what the intention is here.

And by the way thanks for uploading your code to Github 👍

Best regards
Simon

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