INNER CODE UNIT · Python
sliding_dot_product
matrix-profile-foundation/matrixprofile · matrixprofile/core.py:423
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
The query.
Returns
-------
array_like - The sliding dot product.
"""
m = len(query)