Project

dbscan

0.01
No commit activity in last 3 years
No release in over 3 years
DBSCAN (Density-based spatial clustering of applications with noise) is a data clustering algorithm proposed by Martin Ester, Hans-Peter Kriegel, Jorg Sander and Xiaowei Xu.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

dbscan

DBSCAN implementation (forked from shiguodong/dbscan)

$ gem install dbscan
$ ruby examples/simple.rb

Example:

input = [ 0, 10, 20 ],
        [ 0, 11, 21 ],
        [ 0, 12, 20 ],
        [ 20, 33, 59 ],
        [ 21, 32, 56 ],
        [ 59, 77, 101 ],
        [ 58, 79, 100 ],
        [ 58, 76, 102 ],
        [ 300, 70, 20 ],
        [ 500, 300, 202],
        [ 500, 302, 204 ]

Output:

{-1=>[[300, 70, 20]],
 0=>[[0, 10, 20], [0, 11, 21], [0, 12, 20]],
 1=>[[20, 33, 59], [21, 32, 56]],
 2=>[[59, 77, 101], [58, 79, 100], [58, 76, 102]],
 3=>[[500, 300, 202], [500, 302, 204]]}