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

Function test_match_mean_stddev_isconstant

tests/test_motifs.py:504–529  ·  view source on GitHub ↗
(Q, T)

Source from the content-addressed store, hash-verified

502
503@pytest.mark.parametrize("Q, T", test_data)
504def test_match_mean_stddev_isconstant(Q, T):
505 m = Q.shape[0]
506 excl_zone = int(np.ceil(m / 4))
507 max_distance = 0.3
508
509 left = naive_match(
510 Q,
511 T,
512 excl_zone,
513 max_distance=max_distance,
514 )
515
516 T_subseq_isconstant = naive.rolling_isconstant(T, m)
517 M_T, Σ_T = naive.compute_mean_std(T, len(Q))
518
519 right = match(
520 Q,
521 T,
522 M_T,
523 Σ_T,
524 max_matches=None,
525 max_distance=lambda D: max_distance, # also test lambda functionality
526 T_subseq_isconstant=T_subseq_isconstant,
527 )
528
529 npt.assert_almost_equal(left, right)
530
531
532def test_multi_match():

Callers

nothing calls this directly

Calls 2

matchFunction · 0.90
naive_matchFunction · 0.85

Tested by

no test coverage detected