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

Variable K in KNN #173

Open
mrzzmrzz opened this issue Apr 7, 2023 · 2 comments
Open

Variable K in KNN #173

mrzzmrzz opened this issue Apr 7, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mrzzmrzz
Copy link

mrzzmrzz commented Apr 7, 2023

Thank you very much for developing such a great library. Currently, I have a problem that is bothering me.

In KNN, if I want to choose the number of neighbors based on the proportion of nodes in each graph, instead of using a fixed K value, is there an efficient implementation?

I can only split the batch into separate graphs for calculation and then merge the results, but this method is not computationally efficient. So I would like to ask for your opinions on this.

@rusty1s
Copy link
Owner

rusty1s commented Apr 9, 2023

Yeah, you are right on this one. Currently, we assume fixed k across batches to keep required buffers during computation constant. Changing this would probably require a separate function. An alternative could be to utilize max(k) across all batches, and then filter invalid nodes in a post-processing step, but this may be inefficient as well if your k differs highly across examples.

@github-actions
Copy link

github-actions bot commented Oct 7, 2023

This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?

@github-actions github-actions bot added the stale label Oct 7, 2023
@rusty1s rusty1s added enhancement New feature or request help wanted Extra attention is needed and removed stale labels Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants