MCPcopy
hub / github.com/stumpy-dev/stumpy / test_mstump_with_isconstant_case1

Function test_mstump_with_isconstant_case1

tests/test_mstump.py:567–586  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

565
566
567def test_mstump_with_isconstant_case1():
568 # case1: `T_subseq_isconstant` is a (partial) function
569 d = 3
570 n = 64
571 m = 8
572
573 T = np.random.uniform(-1000, 1000, size=[d, n])
574 T_subseq_isconstant = functools.partial(
575 naive.isconstant_func_stddev_threshold, quantile_threshold=0.05
576 )
577
578 excl_zone = int(np.ceil(m / 4))
579
580 ref_P, ref_I = naive.mstump(
581 T, m, excl_zone, T_subseq_isconstant=T_subseq_isconstant
582 )
583 comp_P, comp_I = mstump(T, m, T_subseq_isconstant=T_subseq_isconstant)
584
585 npt.assert_almost_equal(ref_P, comp_P)
586 npt.assert_almost_equal(ref_I, comp_I)
587
588
589def test_mstump_with_isconstant_case2():

Callers

nothing calls this directly

Calls 1

mstumpFunction · 0.90

Tested by

no test coverage detected