MCPcopy Index your code
hub / github.com/stumpy-dev/stumpy / test_scrump_A_B_join

Function test_scrump_A_B_join

tests/test_scrump.py:168–195  ·  view source on GitHub ↗
(T_A, T_B, percentages)

Source from the content-addressed store, hash-verified

166@pytest.mark.parametrize("T_A, T_B", test_data)
167@pytest.mark.parametrize("percentages", percentages)
168def test_scrump_A_B_join(T_A, T_B, percentages):
169 m = 3
170
171 for percentage in percentages:
172 seed = np.random.randint(100000)
173
174 np.random.seed(seed)
175 ref_P, ref_I, ref_left_I, ref_right_I = naive.scrump(
176 T_A, m, T_B, percentage, None, False, None
177 )
178
179 np.random.seed(seed)
180 approx = scrump(
181 T_A, m, T_B, ignore_trivial=False, percentage=percentage, pre_scrump=False
182 )
183 approx.update()
184 comp_P = approx.P_
185 comp_I = approx.I_
186 comp_left_I = approx.left_I_
187 comp_right_I = approx.right_I_
188
189 naive.replace_inf(ref_P)
190 naive.replace_inf(comp_P)
191
192 npt.assert_almost_equal(ref_P, comp_P)
193 npt.assert_almost_equal(ref_I, comp_I)
194 npt.assert_almost_equal(ref_left_I, comp_left_I)
195 npt.assert_almost_equal(ref_right_I, comp_right_I)
196
197
198@pytest.mark.parametrize("T_A, T_B", test_data)

Callers

nothing calls this directly

Calls 2

scrumpClass · 0.90
updateMethod · 0.45

Tested by

no test coverage detected