Esempio n. 1
0
    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)
Esempio n. 2
0
 def test_number_pairs(self):
     self.assertEqual(_number_pairs(_cluster(self.labels_true)), 40)
Esempio n. 3
0
 def test_intersection_size(self):
     self.assertEqual(
         _intersection_size(_cluster(self.labels_true),
                            _cluster(self.labels_pred)), 20)
Esempio n. 4
0
 def test_number_pairs(self):
     self.assertEqual(_number_pairs(_cluster(self.labels_true)), 40)
Esempio n. 5
0
 def test_intersection_size(self):
     self.assertEqual(_intersection_size(_cluster(self.labels_true), _cluster(self.labels_pred)), 20)
Esempio n. 6
0
    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)