lambda-ml.clustering.dbscan
Density-based clustering with DBSCAN.
Example usage:
(def data [[2 10] [2 5] [8 4] [5 8] [7 5] [6 4] [1 2] [4 9]])
(let [epsilon 4.0
min-pts 2]
(dbscan lambda-ml.distance/euclidean epsilon min-pts data))
;;=> {[8 4] 1, [6 4] 1, [7 5] 1, [5 8] 2, [4 9] 2}
dbscan
(dbscan f epsilon min-pts points)
Returns a clustering of points represented as a map from cluster id to a set of points, using the epsilon parameter for neighborhood lookups and forming clusters with at least min-pts density.
make-proximity-search
(make-proximity-search f points)
Given a distance function f and a coll of points, returns a function that, given a distance and a query point, returns a sequence of all points that are within the given distance of the query point.