db_clustering 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/algorithms/density_based/dbscan.rb +5 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6078139ca8ba91099618249c5eb9e01a08c3f402
|
4
|
+
data.tar.gz: 2d3c5e893176ef4d4f20db9835f858f2dab44def
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff195178f56ddaa3eac59f2e75a2ec5be23876685446d50a71a45514537d0130c1fde60ac3f88919323062b4a0f58b2528a4498e5ec1417afc0902dd8b49ab4d
|
7
|
+
data.tar.gz: 1fd241dcbf4b2b7774643437ad4c628e829d7ae3838ce27037fb54437725271b94e66d6128835a5cee800e92befb720bfef8a34cf50e97ceb67ceca09d69b2af
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.12
|
@@ -12,7 +12,7 @@ module DbClustering
|
|
12
12
|
@clusters = []
|
13
13
|
end
|
14
14
|
|
15
|
-
def cluster(max_distance:, min_neighbors:)
|
15
|
+
def cluster(max_distance:, min_neighbors:, debug: false)
|
16
16
|
@clusters = []
|
17
17
|
cluster = nil
|
18
18
|
|
@@ -33,6 +33,10 @@ module DbClustering
|
|
33
33
|
if neighbor.cluster.nil?
|
34
34
|
cluster.add(neighbor)
|
35
35
|
|
36
|
+
if debug
|
37
|
+
print "+"
|
38
|
+
end
|
39
|
+
|
36
40
|
# add the neighbors of the neighbor to the neighbors to fully expand the cluster
|
37
41
|
neighbors |= @datasource.neighbors(point: neighbor, distance_metric: @distance_metric, max_distance: max_distance)
|
38
42
|
end
|