summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2020-05-26 11:40:02 +0200
committerMarc Glisse <marc.glisse@inria.fr>2020-05-26 11:40:02 +0200
commitc2cfdc79fb30bb467565cf16cee8bd8f241cb061 (patch)
tree6de6992e53cf35e4367b1575885f6f64790dca8b
parent9f2c4f3c8ed6e4e11ba8e962ffc0ac957dd45d74 (diff)
Remove main
-rw-r--r--src/python/gudhi/clustering/tomato.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/python/gudhi/clustering/tomato.py b/src/python/gudhi/clustering/tomato.py
index a3e304dc..901a9399 100644
--- a/src/python/gudhi/clustering/tomato.py
+++ b/src/python/gudhi/clustering/tomato.py
@@ -306,29 +306,3 @@ class Tomato:
else:
self.__n_clusters = None
self.__merge_threshold = merge_threshold
-
-
-if __name__ == "__main__":
- import sys
-
- a = [(1, 2), (1.1, 1.9), (0.9, 1.8), (10, 0), (10.1, 0.05), (10.2, -0.1), (5.4, 0)]
- a = numpy.random.rand(500, 2)
- t = Tomato(metric="euclidean", graph_type="knn", density_type="DTM", n_clusters=2, k=4, n_jobs=-1, eps=0.05,)
- t.fit(a)
- # print("neighbors\n",t.neighbors_)
- # print()
- # print("weights\n",t.weights_)
- # print()
- # print("diagram\n",t.diagram_)
- # print()
- print("max\n", t.max_weight_per_cc_, file=sys.stderr)
- # print()
- print("leaf labels\n", t.leaf_labels_)
- # print()
- print("labels\n", t.labels_)
- # print()
- print("children\n", t.children_)
- # print()
- t.n_clusters_ = 2
- print("labels\n", t.labels_)
- t.plot_diagram()