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

Function maamp

tests/naive.py:659–677  ·  view source on GitHub ↗
(T, m, excl_zone, include=None, discords=False, p=2.0)

Source from the content-addressed store, hash-verified

657
658
659def maamp(T, m, excl_zone, include=None, discords=False, p=2.0):
660 T = T.copy()
661
662 d, n = T.shape
663 k = n - m + 1
664
665 P = np.full((d, k), np.inf)
666 I = np.ones((d, k), dtype="int64") * -1
667
668 for i in range(k):
669 D = maamp_multi_distance_profile(i, T, m, include, discords, p=p)
670 P_i, I_i = PI(D, i, excl_zone)
671
672 for dim in range(T.shape[0]):
673 col_mask = P[dim] > P_i[dim]
674 P[dim, col_mask] = P_i[dim, col_mask]
675 I[dim, col_mask] = I_i[dim, col_mask]
676
677 return P, I
678
679
680def subspace(T, m, subseq_idx, nn_idx, k, include=None, discords=False):

Callers

nothing calls this directly

Calls 2

PIFunction · 0.85

Tested by

no test coverage detected