scikit learn - python sklearn KDTree with haversine distance -


i try create kd tree of wgs84 coordinates , find neighbors within radius

from sklearn.neighbors.dist_metrics import distancemetric sklearn.neighbors.kd_tree import kdtree     t = kdtree([[47.8665, 8.90123]], metric=distancemetric.get_metric('haversine')) 

but following error:

valueerror: metric haversinedistance not valid kdtree 

how can use haversine distance in kd-tree?

the k-d-tree can (to best of knowledge) used minkowski norms.

there other trees such ball tree in sklearn, or covertree in elki work haversine distance because metric.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -