uoguelph-mlrg / LDG

PyTorch code for "Learning Temporal Attention in Dynamic Graphs with Bilinear Interactions"
https://arxiv.org/abs/1909.10367
Other
98 stars 24 forks source link

How to evaluate your model on another dynamic graph dataset? #2

Open Uchman21 opened 4 years ago

Uchman21 commented 4 years ago

I have a simple dataset of temporal graphs and would like to train it for link prediction. So far going through your code, everything seems confusing and highly tailored for only the social evolution dataset and not so clear to tailor for others. Can you provide a simple data loader for other normal graph datasets?

PS: A large amount of console printouts makes running the code confusing

bknyaz commented 4 years ago

Hi, Thanks for reporting this. I hope to have time in the future to fix this issue, but not sure when. So PRs are welcome.

On high level, the code should work with any data loader that returns (u, v, time_delta_uv, k, time_bar, time_cur) for each event: https://github.com/uoguelph-mlrg/LDG/blob/master/data_loader.py#L193

where u,v - are indices of nodes between which the event occured time_delta_uv - is the difference between current time and previous time for nodes u and v time_bar - are time stamps of last events for all nodes time_cur - is current time

There can be other parts in the code where I expect the Social dataset, but only in a few places.

bknyaz commented 4 years ago

Hi, I added the base data loader class and example_data_loader showing which attributes and functions should be implemented for other datasets. Plus, added another dataset, Github. The code is still not very clean, but hope it can be useful.

kingmbc commented 4 years ago

Thanks! I'm just looking through your codes, I just wonder, is there any dependencies of the version?

So, I hope, in README.md, it's good to provide the dependency and its version :)

Perhaps, it requires a set of pytorch, scikit-learn, pandas, matplotlib, etc.