Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What if the number of neighbors is less than the pre-defined number? #180

Open
HenryYuen128 opened this issue Mar 8, 2022 · 1 comment

Comments

@HenryYuen128
Copy link

N(v) ,the fixed-size of neighbors, which is mentioned in the paper. I think this is to make sure that the aggregate function can work correctly. But what if a node with neighbors less than N(v). How dose the model sample and train? And what would happen if there is an isolated node in train or inference stage?

@sam-lev
Copy link

sam-lev commented Mar 8, 2022

Graphsage will either be given as a parameter a max node degree to adhere to or observe the node with the highest degree and when building the adjacency matrix will sample the neighbors of each node and in the event a node has fewer neighbors than max(N(v)) then that node's neighbors will be resampled (sampled with replacement).

If a node is isolated, meaning no incident edges or neighbors, then graphsage can not aggregate to that node and an embedding can't be learned for that node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants