Ejemplo n.º 1
0
 def testSmoothMaxBoundaryMultiZigZag(self):
     tp = json.load(open("emission/tests/data/smoothing_data/caltrain_multi_zigzag.json"))
     (retained_indices, removed_indices) = tags.smooth_max_boundary(tp)
     logging.info("removed indices = %s" % removed_indices)
     self.assertEqual(len(removed_indices), 2)
     self.assertEqual(removed_indices, [46, 58])
Ejemplo n.º 2
0
 def testSmoothMaxDeviationOneZigZag(self):
     tp = json.load(open("emission/tests/data/smoothing_data/caltrain_one_zigzag.json"))
     (retained_indices, removed_indices) = tags.smooth_max_boundary(tp)
     logging.info("removed indices = %s" % removed_indices)
     self.assertEqual(len(removed_indices), 1)
     self.assertEqual(removed_indices, [68])