INNER CODE UNIT · Python

y

matrix-profile-foundation/matrixprofile · matrixprofile/core.py:416

    y = np.append(np.flipud(query), np.zeros([1, n - m]))
    y = np.fft.fft(y)
    z = np.fft.ifft(x * y)

    return np.real(z[m - 1:n])


def sliding_dot_product(ts, query):
    """
    Computes the sliding dot product for query over the time series using
    convolution. Note that the result is trimmed due to the computations
    being invalid; the len(query) to len(ts) is kept.

    Parameters
    ----------
    ts : array_like
        The time series.
    query : array_like

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…