Exemplo n.º 1
0
 def test_heuristic_get_states(self):
     """Check attribute pairs after the widget has been paused"""
     heuristic = KMeansCorrelationHeuristic(self.data_cont)
     heuristic.n_clusters = 2
     states = heuristic.get_states(None)
     _ = next(states)
     self.assertListEqual(list(heuristic.get_states(next(states))),
                          [(0, 3), (2, 3), (0, 1), (1, 2), (1, 3)])
Exemplo n.º 2
0
 def test_heuristic_get_states(self):
     """Check attribute pairs after the widget has been paused"""
     heuristic = KMeansCorrelationHeuristic(self.data_cont)
     heuristic.n_clusters = 2
     states = heuristic.get_states(None)
     _ = next(states)
     self.assertListEqual(list(heuristic.get_states(next(states))),
                          [(0, 3), (2, 3), (0, 1), (1, 2), (1, 3)])
Exemplo n.º 3
0
 def test_heuristic(self):
     """Check attribute pairs got by heuristic"""
     heuristic = KMeansCorrelationHeuristic(self.data_cont)
     heuristic.n_clusters = 2
     self.assertListEqual(list(heuristic.get_states(None)), [(0, 2), (0, 3),
                                                             (2, 3), (0, 1),
                                                             (1, 2),
                                                             (1, 3)])
Exemplo n.º 4
0
 def test_heuristic(self):
     """Check attribute pairs got by heuristic"""
     heuristic = KMeansCorrelationHeuristic(self.data_cont)
     heuristic.n_clusters = 2
     self.assertListEqual(list(heuristic.get_states(None)),
                          [(0, 2), (0, 3), (2, 3), (0, 1), (1, 2), (1, 3)])