RoyZhengGao / edge2vec

Learning node representation using edge semantics
BSD 3-Clause "New" or "Revised" License
51 stars 22 forks source link

Random walk go to the node itself #3

Open lingling93 opened 4 years ago

lingling93 commented 4 years ago

https://github.com/RoyZhengGao/edge2vec/blob/e6637e638919b364ac081826c68879daf182ae73/edge2vec.py#L146-173

Hi Zheng Gao:

In your code, if the 'threshold' of a neighbour was bigger than 'rand' then go to that neighbour. When I apply it to Himmelstein's hetionet, it gave errors. Then I found the error happened because the random walk went to itself, but there is no edge between a node and itself. I think this error happens because that in some situation, no threshold of any neighbour could be bigger than the 'rand'. I want to change the code to make the random walk go to the neighbour whose 'threshold' is biggest. How do you think about this problem and do you have any suggestion for me?

Lingling

akastrin commented 4 years ago

Hi @lingling93 ,

do you have any success so far in running edge2vec? I also try to run the code on hetionet network and get into the same problem.