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

Function distance_profile

tests/naive.py:79–92  ·  view source on GitHub ↗
(Q, T, m)

Source from the content-addressed store, hash-verified

77
78
79def distance_profile(Q, T, m):
80 T_inf = np.isinf(T)
81 if np.any(T_inf):
82 T = T.copy()
83 T[T_inf] = np.nan
84
85 Q_inf = np.isinf(Q)
86 if np.any(Q_inf):
87 Q = Q.copy()
88 Q[Q_inf] = np.nan
89
90 D = np.linalg.norm(z_norm(core.rolling_window(T, m), 1) - z_norm(Q), axis=1)
91
92 return D
93
94
95def aamp_distance_profile(Q, T, m, p=2.0):

Callers 6

distance_matrixFunction · 0.85
mass_PIFunction · 0.85
stumpFunction · 0.85
multi_massFunction · 0.85
__init__Method · 0.85

Calls 1

z_normFunction · 0.70

Tested by

no test coverage detected