summaryrefslogtreecommitdiff
path: root/src/python/gudhi/clustering
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2020-03-17 10:56:12 +0100
committerMarc Glisse <marc.glisse@inria.fr>2020-03-17 10:56:12 +0100
commitf0d24aa8d75b71e7b8771b4271b4ef6a9e296d4a (patch)
treef28d1023f43f4b0483a0694239d9cf4454aec5b0 /src/python/gudhi/clustering
parent5a87b00145499bb5afeadaef7dec476ae5f826d0 (diff)
doc default n_clusters
Diffstat (limited to 'src/python/gudhi/clustering')
-rw-r--r--src/python/gudhi/clustering/tomato.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/python/gudhi/clustering/tomato.py b/src/python/gudhi/clustering/tomato.py
index 6906c5bb..7b319b5c 100644
--- a/src/python/gudhi/clustering/tomato.py
+++ b/src/python/gudhi/clustering/tomato.py
@@ -58,10 +58,10 @@ class Tomato:
kde_params (dict): if density_type is 'KDE' or 'logKDE', additional parameters passed directly to sklearn.neighbors.KernelDensity.
k (int): number of neighbors for a knn graph (including the vertex itself). Defaults to 10.
k_DTM (int): number of neighbors for the DTM density estimation (including the vertex itself). Defaults to k.
- r (float): size of a neighborhood if graph_type is 'radius'
- eps (float): approximation factor when computing nearest neighbors (currently ignored with a GPU)
+ r (float): size of a neighborhood if graph_type is 'radius'.
+ eps (float): approximation factor when computing nearest neighbors (currently ignored with a GPU).
gpu (bool): enable use of CUDA (through pykeops) to compute k nearest neighbors. This is useful when the dimension becomes large (10+) but the number of points remains low (less than a million).
- n_clusters (int): number of clusters requested. Defaults to ???
+ n_clusters (int): number of clusters requested. Defaults to None, i.e. no merging occurs and we get the maximal number of clusters.
merge_threshold (float): minimum prominence of a cluster so it doesn't get merged.
symmetrize_graph (bool): whether we should add edges to make the neighborhood graph symmetric. This can be useful with k-NN for small k. Defaults to false.
p (float): norm L^p on input points (numpy.inf is supported without gpu). Defaults to 2.
@@ -280,7 +280,7 @@ class Tomato:
else:
weights = -numpy.log(weights)
- if self.density_type_ == "KDE" or self.density_type_ == "logKDE":
+ if self.density_type_ in {"KDE", "logKDE"}:
# FIXME: replace most assert with raise ValueError("blabla")
assert input_type == "points"
kde_params = self.params_.get("kde_params", dict())