Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python library for distance clustering

I'm looking for a python library to organize a set of coordinates into clusters. My input is a list of (latitude, longitude) coordinates, and I want to get a list of clusters that group them according to distance.

I don't know before hand how many clusters I need to obtain, so I can't use something like a K-Means (like the cluster module) algorithm (not alone at least, maybe I there's an algorithm I can use to obtain that number based on the input data).

I also looked at clusterpy, but it seemed overly complicated for the task and the documentation is not very guiding.

like image 233
Facundo Olano Avatar asked Sep 01 '25 10:09

Facundo Olano


1 Answers

I would recommend scikit learn. The linked page has a good discussion about different clustering algorithms. For geographic clustering (as someone above already suggested) DBSCAN works well.

like image 84
JKucan Avatar answered Sep 02 '25 23:09

JKucan