-
Notifications
You must be signed in to change notification settings - Fork 25
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
Calculation of NHP's log-likelihood #43
Comments
Hi, Regarding the sampling method used here, we are working on to publish a newer version to fix relevant issues. this will be done shortly. |
Thank you. It'll be really helpful to my research. For now it's a bit hard to reproduce the results in the original papers. |
We will have quite a few PRs in next month, fixing the potential problems in loglike computation, some inconsistency in reproducing models and other issues. Besides, we will issue a tech report to explain the details of implementation and re-publish the experiment results. |
Hi. I have doubts on how the code calculates NHP's log-likelihood, which is specified by equation (8) in the NHP paper:
The former part of equation (8) is the sum of individual-type log intensities at all event occurrences. In the
compute_loglikelihood
method intorch_basemodel.py
, however, I saw the type dimension (last dimension) oflambda_at_event
is summed:EasyTemporalPointProcess/easy_tpp/model/torch_model/torch_basemodel.py
Line 104 in 01551fb
EasyTemporalPointProcess/easy_tpp/model/torch_model/torch_nhp.py
Line 265 in 01551fb
lambda_at_event
has shape [batch_size, num_times=max_len-1, num_event_types], as the comments mentioned.The latter part of equation (8), according to Algorithm 1 of the NHP paper:
is calculated by uniformly sampling the intensity function over the whole time frame of the event sequence. In the code, however, it seems like the sampling is done by drawing equidistant samples in each inter-event interval:
EasyTemporalPointProcess/easy_tpp/model/torch_model/torch_nhp.py
Line 255 in 01551fb
Maybe I'm missing something. Thank you for your help.
The text was updated successfully, but these errors were encountered: