Beispiel #1
0
 def test__detect_anoms_no_num_obs_per_period(self):
     with self.assertRaises(AssertionError):
         _detect_anoms(self.data1,
                       k=0.02,
                       alpha=0.05,
                       num_obs_per_period=None,
                       use_decomp=False,
                       use_esd=False,
                       direction='both')
Beispiel #2
0
 def test__detect_anoms_use_esd_true(self):
     shesd = _detect_anoms(self.data1,
                           k=0.02,
                           alpha=0.05,
                           num_obs_per_period=1440,
                           use_decomp=True,
                           use_esd=True,
                           direction='both')
     self.assertEqual(133, len(shesd['anoms']))
Beispiel #3
0
 def test__detect_anoms_neg(self):
     shesd = _detect_anoms(self.data1,
                           k=0.02,
                           alpha=0.05,
                           num_obs_per_period=1440,
                           use_decomp=True,
                           use_esd=False,
                           direction='neg')
     self.assertEqual(85, len(shesd['anoms']))