Esempio n. 1
0
 def test_linear_4(self):
     data = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 1.0]
     keep, throw = SubselectionAlgorithm.linear(data)
     self.assertEqual([6, 5, 4, 3], keep)
     self.assertEqual([2, 1, 0], throw)
Esempio n. 2
0
 def test_linear_5(self):
     data = [1.0, 0.21, 0.4, 0.6, 0.5, 0.3, 0.1, 0.2]
     keep, throw = SubselectionAlgorithm.linear(data)
     self.assertEqual([0, 3, 4, 2], keep)
     self.assertEqual([5, 1, 7, 6], throw)
Esempio n. 3
0
 def test_linear_3(self):
     data = [1.0, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1]
     keep, throw = SubselectionAlgorithm.linear(data)
     self.assertEqual([0, 1, 2, 3], keep)
     self.assertEqual([4, 5, 6], throw)