https://github.com/matiasinsaurralde/dbscan
DBSCAN implementation (forked from shiguodong/dbscan)
https://github.com/matiasinsaurralde/dbscan
Last synced: 7 months ago
JSON representation
DBSCAN implementation (forked from shiguodong/dbscan)
- Host: GitHub
- URL: https://github.com/matiasinsaurralde/dbscan
- Owner: matiasinsaurralde
- Created: 2013-09-08T18:12:48.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-08-12T22:55:44.000Z (about 11 years ago)
- Last Synced: 2025-03-15T07:55:01.101Z (8 months ago)
- Language: Ruby
- Homepage:
- Size: 148 KB
- Stars: 15
- Watchers: 2
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
dbscan
======
DBSCAN implementation (forked from shiguodong/dbscan)
```
$ gem install dbscan
```
```
$ ruby examples/simple.rb
```
Example:
```ruby
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:
```ruby
{-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]]}
```