Skip to content

Random walk go to the node itself #3

@lingling93

Description

@lingling93

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions