예제 #1
0
 def test_engine(self):
     """changepoint.pelt.Pelt: set numba engine"""
     c = pelt.Pelt("l2", 1, 1, engine=self.engine)
     assert hasattr(c.segmentation, "py_func")
예제 #2
0
 def test_init(self):
     """changepoint.pelt.Pelt.__init__"""
     c = pelt.Pelt("l2", 1, 1, engine=self.engine)
     self.assertIsInstance(c.cost, type(self.cost))
     self.assertEqual(c._min_size, self.cost.min_size)
예제 #3
0
 def test_find_changepoints(self):
     """changepoint.pelt.Pelt.find_changepoints"""
     c = pelt.Pelt("l2", 1, 1, engine=self.engine)
     cp = c.find_changepoints(self.data, self.penalty)
     np.testing.assert_equal(cp, self.cp)
예제 #4
0
 def test_engine(self):
     """changepoint.pelt.Pelt: set python engine"""
     c = pelt.Pelt("l2", 1, 1, engine=self.engine)
     self.assertIsInstance(c.segmentation, types.FunctionType)