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

Parameters of squidpy.gr.spatial_neighbors() #783

Open
Qirongmao97 opened this issue Dec 13, 2023 · 1 comment
Open

Parameters of squidpy.gr.spatial_neighbors() #783

Qirongmao97 opened this issue Dec 13, 2023 · 1 comment
Assignees

Comments

@Qirongmao97
Copy link

Dear Squidpy developers:

I'm not quite sure some of the parameters in squidpy.gr.spatial_neighbors() function.

I noticed that there are parameters of n_neighs and radius for the generic coordinates data, what's the differences between them? I tried to input them both in the fuction and no matter how many time I changed n_neighs, the result still remain the same, does that mean radius suppress n_neighs ?

Thanks!

@giovp
Copy link
Member

giovp commented Apr 25, 2024

radius suppress n_neighs exactly, however only if all the neighbors have distance < radius. If you select n_neighs high enough so that some neighs have distance > radius, than they will be preserved.

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