From c2cfdc79fb30bb467565cf16cee8bd8f241cb061 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Tue, 26 May 2020 11:40:02 +0200 Subject: Remove main --- src/python/gudhi/clustering/tomato.py | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'src/python/gudhi/clustering') 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() -- cgit v1.2.3