0

This here is the link to the documentation.

I had assumed that the radius parameter would've taken in the following value (radius I want to search)/(radius of the earth). Since that is how I had been converting the output of the tree.query method into a distance I can use.

However the results that come out of it don't make any sense, which is why I was hoping someone would clarify what this parameter expects as an input since the docs weren't very clear.

JoeShmo
  • 21
  • 2
  • Distances, and hence the radius parameter, are in terms of the initialization parameter `metric`. If "the results that come out of it don't make any sense," please provide an example of what you expect and what actual behavior is. – Ben Reiniger Jul 26 '21 at 20:11
  • So the metric I use is 'haversine' (which takes in =lat/lon). My use case is similar to this answer: https://stackoverflow.com/questions/63121268/how-can-i-introduce-the-radio-in-query-radius-balltree-sklearn-radians-km I am looking for cell phone towers within a given range of a phone, for eg. if I have a radius of 3km I expect there to be at most 6 towers, however they are all within a 100-200 range which is absolutely wrong. – JoeShmo Jul 27 '21 at 15:47
  • That answer suggests that you need to convert between Earthly distances and unit-sphere ones; see also e.g. [sklearn haversine function docs](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.haversine_distances.html?highlight=haversine#sklearn.metrics.pairwise.haversine_distances). – Ben Reiniger Jul 27 '21 at 20:58

0 Answers0