pyscamp.selfjoin_knn
- pyscamp.selfjoin_knn(a: List[float], m: int, k: int, **kwargs) List[Tuple[int, int, float]]
[GPU ONLY, EXPERIMENTAL] Returns the approximate k nearest neighbors for each subsequence in a time series
- Parameters:
a (1D array) – Time series to compute the KNN matrix profile for.
m (int) – Subsequence length to use for computing the matrix profile.
k (int) – Number of neighbors to return for each subsequence
threshold (float, optional) – Correlation threshold [0,1] (Default 0), matches which have a correlation less than the threshold will be ignored
- Returns:
List of tuples (col, row, distance) containing the matches (up to K) for each column of the distance matrix, row is the index of the match, and d is the distance between the two subsequences
- Return type:
List of tuple[int, int, float]