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
Post a Comment