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?
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