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 ?
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.
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
andradius
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 changedn_neighs
, the result still remain the same, does that meanradius
suppressn_neighs
?Thanks!