-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
DBSCAN and haversine metric #4452
Description
Hi,
I am observing a somewhat weird behavior when using DBSCAN and I am not sure what's going on. Sometimes when I am using DBSCAN with the 'haversine' distance I get a the following error:
ValueError: Unknown metric haversine. Valid metrics are ['euclidean', 'l2', 'l1', 'manhattan', 'cityblock', 'braycurtis', 'canberra', 'chebyshev', 'correlation', 'cosine', 'dice', 'hamming', 'jaccard', 'kulsinski', 'mahalanobis', 'matching', 'minkowski', 'rogerstanimoto', 'russellrao', 'seuclidean', 'sokalmichener', 'sokalsneath', 'sqeuclidean', 'yule', 'wminkowski'], or 'precomputed', or a callable
The weird thing is that however in the majority of cases DBSCAN with the haversine distance seems to work and as far as I can tell produces meaningful results. I am on Python 2.7.3 and the following libraries are installed:
Delorean==0.4.5
affinity==0.1.0
argparse==1.2.1
basemap==1.0.7
distribute==0.7.3
joblib==0.8.4
matplotlib==1.4.2
mock==1.0.1
nose==1.3.4
numpy==1.9.1
pygmaps==0.1.1
pymongo==2.8
pyparsing==2.0.3
python-dateutil==2.2
pytz==2014.9
scikit-learn==0.15.2
scipy==0.14.0
six==1.8.0
wsgiref==0.1.2
Has anybody any idea what's going on? I am also happy to do some further research into that issue but at the moment just have no clue how to go about that.