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

Function test_stimp_raw_mp

tests/test_aamp_stimp.py:201–228  ·  view source on GitHub ↗

Check pan.P_ attribute for raw matrix profile

(T)

Source from the content-addressed store, hash-verified

199
200@pytest.mark.parametrize("T", T)
201def test_stimp_raw_mp(T):
202 """
203 Check pan.P_ attribute for raw matrix profile
204 """
205 percentage = 1.0
206 min_m = 3
207 n = 5
208
209 pan = aamp_stimp(
210 T,
211 min_m=min_m,
212 max_m=None,
213 step=1,
214 percentage=percentage,
215 pre_scraamp=False,
216 )
217
218 for i in range(n):
219 pan.update()
220
221 for idx, m in enumerate(pan.M_[:n]):
222 zone = int(np.ceil(m / 4))
223 ref_P_ = naive.aamp(T, m, T_B=None, exclusion_zone=zone)[:, 0]
224 cmp_P_ = pan.P_[idx]
225
226 naive.replace_inf(ref_P_)
227 naive.replace_inf(cmp_P_)
228 npt.assert_almost_equal(ref_P_, cmp_P_)
229
230
231@pytest.mark.filterwarnings("ignore:numpy.dtype size changed")

Callers

nothing calls this directly

Calls 2

aamp_stimpClass · 0.90
updateMethod · 0.45

Tested by

no test coverage detected