def perceptron_visualize(*args): if len(args) == 2 and args[1]==True: d = Diagram() d.root.after(2000,perceptron_training_algorithm) d.scatter_plot(args[0]) function(args[0], True, d) else: function(args[0], False)
def test_hierarchical_clustering(self): cluster_list, instances_num = agglomerative_clustering(self.my_other_data) for oeoeoe in cluster_list: print(oeoeoe.distance, " left: ", (oeoeoe.left.label if oeoeoe.left is not None else 0), "right: ", (oeoeoe.right.label if oeoeoe.right is not None else 0)) print(len(cluster_list)) diagram = Diagram() diagram.print_dendrogram(cluster_list, instances_num)