INNER CODE UNIT · Python
complexity
target/matrixprofile-ts · matrixprofile/annotation_vector.py:22
complexity = np.sqrt(diff_mean)
complexity = complexity - complexity.min()
complexity = complexity / complexity.max()
return complexity
def make_meanstd_AV(ts, m):
""" returns boolean annotation vector which selects windows with a standard deviation greater than average """
_, std = movmeanstd(ts, m)
mu = std.mean()
return (std < mu).astype(int)
def make_clipping_AV(ts, m):
"""
returns an annotation vector proportional to the number if mins/maxs in the window
"""
av = (ts == ts.min()) | (ts == ts.max())