INK-USC / RE-Net

Recurrent Event Network: Autoregressive Structure Inference over Temporal Knowledge Graphs (EMNLP 2020)
http://inklab.usc.edu/renet/
435 stars 95 forks source link

How to do inference #66

Open moktayoglu opened 2 years ago

moktayoglu commented 2 years ago

Hello,

I am trying to do inference with the trained model with new time points. How do we do that? Can you help?

I tried using global_model.predict however it only gave the same results. Is there another way to do it?

Thanks!

Atakanzsn commented 2 years ago

facing with the same question, any solutions?

woojeongjin commented 2 years ago

Hi Could you elaborate the issue? What dataset are you using?

moktayoglu commented 2 years ago

Hi, i am using a dataset i created using protein interactions. But want to use the trained model to create predictions for unseen datapoints.

On Wed, Aug 17, 2022, 7:23 PM Woojeong Jin @.***> wrote:

Hi Could you elaborate the issue? What dataset are you using?

— Reply to this email directly, view it on GitHub https://github.com/INK-USC/RE-Net/issues/66#issuecomment-1218634193, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJIGM3GGPQXMPT2TSMH75LVZVX5XANCNFSM52DKRHQQ . You are receiving this because you authored the thread.Message ID: @.***>

moktayoglu commented 2 years ago

for larger time stamps than the test set.

On Wed, Aug 17, 2022, 7:25 PM MELIS OKTAYOGLU @.***> wrote:

Hi, i am using a dataset i created using protein interactions. But want to use the trained model to create predictions for unseen datapoints.

On Wed, Aug 17, 2022, 7:23 PM Woojeong Jin @.***> wrote:

Hi Could you elaborate the issue? What dataset are you using?

— Reply to this email directly, view it on GitHub https://github.com/INK-USC/RE-Net/issues/66#issuecomment-1218634193, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJIGM3GGPQXMPT2TSMH75LVZVX5XANCNFSM52DKRHQQ . You are receiving this because you authored the thread.Message ID: @.***>

woojeongjin commented 2 years ago

There should be some rules for timestamps as described in the paper:

  1. The timestamps are discrete integers and have equal intervals.
  2. The timestamps of the test set should be after those of the training set.

Please follow these rules!

moktayoglu commented 2 years ago

Hi, i guess i wasnt clear. I can do inference for test dataset but can we do predictions when there is no ground truth, for time stamps larger than the test set. For example I have trained the model on time stamps 0-160, validated for 160-180, tested for 180-200. Is there a way I can create predictions for 200-250?

On Wed, Aug 17, 2022, 7:35 PM Woojeong Jin @.***> wrote:

There should be some rules for timestamps:

  1. The timestamps are discrete integers and have equal intervals.
  2. The timestamps of the test set should be after those of the training set.

— Reply to this email directly, view it on GitHub https://github.com/INK-USC/RE-Net/issues/66#issuecomment-1218658883, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJIGM6ZDWNT3WJJOERLGCLVZVZNLANCNFSM52DKRHQQ . You are receiving this because you authored the thread.Message ID: @.***>

woojeongjin commented 2 years ago

Sure you can do that. You can refer to the predicted graph in the inference code which is for creating a graph at each time stamp. First, you sample subjects, then relations, and then objects at a certain time stamp. With this set of triples, you have a graph at the time stamp.

moktayoglu commented 2 years ago

Could you elaborate? How to proceed after training, validating and testing?

On Wed, Aug 17, 2022, 8:03 PM Woojeong Jin @.***> wrote:

Sure you can do that. The predicted graph in the code is for creating a graph at each time stamp. First, you sample subjects, then relations, and then objects at a certain time stamp. With this set of triples, you have a graph at the time stamp.

— Reply to this email directly, view it on GitHub https://github.com/INK-USC/RE-Net/issues/66#issuecomment-1218712411, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJIGM3REBVJ67VZUNKQ63DVZV4V3ANCNFSM52DKRHQQ . You are receiving this because you authored the thread.Message ID: @.***>

moktayoglu commented 1 year ago

Hello,

Could you provide some help with it?

On Thu, Aug 18, 2022 at 3:21 AM MELIS OKTAYOGLU @.***> wrote:

Could you elaborate? How to proceed after training, validating and testing?

On Wed, Aug 17, 2022, 8:03 PM Woojeong Jin @.***> wrote:

Sure you can do that. The predicted graph in the code is for creating a graph at each time stamp. First, you sample subjects, then relations, and then objects at a certain time stamp. With this set of triples, you have a graph at the time stamp.

— Reply to this email directly, view it on GitHub https://github.com/INK-USC/RE-Net/issues/66#issuecomment-1218712411, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJIGM3REBVJ67VZUNKQ63DVZV4V3ANCNFSM52DKRHQQ . You are receiving this because you authored the thread.Message ID: @.***>

dnanad commented 7 months ago

Hey hi, did you manage to compete this? I am curious about your use case!

Hello, Could you provide some help with it? On Thu, Aug 18, 2022 at 3:21 AM MELIS OKTAYOGLU @.> wrote: Could you elaborate? How to proceed after training, validating and testing? On Wed, Aug 17, 2022, 8:03 PM Woojeong Jin @.> wrote: > Sure you can do that. > The predicted graph in the code is for creating a graph at each time > stamp. > First, you sample subjects, then relations, and then objects at a certain > time stamp. > With this set of triples, you have a graph at the time stamp. > > — > Reply to this email directly, view it on GitHub > <#66 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/ARJIGM3REBVJ67VZUNKQ63DVZV4V3ANCNFSM52DKRHQQ > . > You are receiving this because you authored the thread.Message ID: > @.***> >