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

Function test_stimp_raw_mp

tests/test_stimp.py:186–214  ·  view source on GitHub ↗

Check pan.P_ attribute for raw matrix profile

(T)

Source from the content-addressed store, hash-verified

184
185@pytest.mark.parametrize("T", T)
186def test_stimp_raw_mp(T):
187 """
188 Check pan.P_ attribute for raw matrix profile
189 """
190 percentage = 1.0
191 min_m = 3
192 n = 5
193
194 pan = stimp(
195 T,
196 min_m=min_m,
197 max_m=None,
198 step=1,
199 percentage=percentage,
200 pre_scrump=False,
201 # normalize=True,
202 )
203
204 for i in range(n):
205 pan.update()
206
207 for idx, m in enumerate(pan.M_[:n]):
208 zone = int(np.ceil(m / 4))
209 ref_P_ = naive.stump(T, m, T_B=None, exclusion_zone=zone)[:, 0]
210 cmp_P_ = pan.P_[idx]
211
212 naive.replace_inf(ref_P_)
213 naive.replace_inf(cmp_P_)
214 npt.assert_almost_equal(ref_P_, cmp_P_)
215
216
217@pytest.mark.filterwarnings("ignore:numpy.dtype size changed")

Callers

nothing calls this directly

Calls 2

stimpClass · 0.90
updateMethod · 0.45

Tested by

no test coverage detected