summaryrefslogtreecommitdiff
path: root/src/python/gudhi/clustering
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2020-05-25 17:16:06 +0200
committerMarc Glisse <marc.glisse@inria.fr>2020-05-25 17:16:06 +0200
commit5be0f973261ce3999097923b573bbf63ec3a08f0 (patch)
tree6b828a6c418f77738cc9326c66d1e6f313408008 /src/python/gudhi/clustering
parent9ff9055a93b5bc5c402519bd0bc8c85bf97d6d84 (diff)
comments
Diffstat (limited to 'src/python/gudhi/clustering')
-rw-r--r--src/python/gudhi/clustering/tomato.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/python/gudhi/clustering/tomato.py b/src/python/gudhi/clustering/tomato.py
index 29f30481..18425700 100644
--- a/src/python/gudhi/clustering/tomato.py
+++ b/src/python/gudhi/clustering/tomato.py
@@ -161,7 +161,7 @@ class Tomato:
eps = self.params_.get("eps", 0)
self.neighbors_ = t.query_ball_tree(t, r=self.params_["r"], p=p, eps=eps)
- # TODO: sklearn's NearestNeighbors can handle more metrics efficiently via its BallTree
+ # TODO: sklearn's NearestNeighbors.radius_neighbors can handle more metrics efficiently via its BallTree (don't bother with the _graph variant, it just calls radius_neighbors).
elif metric != "precomputed":
from sklearn.metrics import pairwise_distances
@@ -230,6 +230,7 @@ class Tomato:
else:
l = self.max_density_per_cc_.min()
r = self.max_density_per_cc_.max()
+ #FIXME: move this out of the else, for diagrams with one point on the diagonal and an infinite point with the same coordinate?
if l == r:
if l > 0:
l, r = .9 * l, 1.1 * r