def test_cluster(self): clusters = frozenset({ frozenset({0, 1, 2, 3, 4, 5}), frozenset({6, 7, 8, 9, 10, 11}), frozenset({12, 13, 14, 15, 16}) }) self.assertSetEqual(_cluster(self.labels_true), clusters)
def test_number_pairs(self): self.assertEqual(_number_pairs(_cluster(self.labels_true)), 40)
def test_intersection_size(self): self.assertEqual( _intersection_size(_cluster(self.labels_true), _cluster(self.labels_pred)), 20)
def test_intersection_size(self): self.assertEqual(_intersection_size(_cluster(self.labels_true), _cluster(self.labels_pred)), 20)
def test_cluster(self): clusters = frozenset({frozenset({0, 1, 2, 3, 4, 5}), frozenset({6, 7, 8, 9, 10, 11}), frozenset({12, 13, 14, 15, 16})}) self.assertSetEqual(_cluster(self.labels_true), clusters)