Skip to content

Commit 6597d45

Browse files
committed
Improved documentation for P in motifs function
1 parent c7967d0 commit 6597d45

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stumpy/motifs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,11 @@ def motifs(
205205
The time series or sequence
206206
207207
P : numpy.ndarray
208-
Matrix Profile of `T`
208+
The (1-dimensional) matrix profile of `T`. In the case where the matrix
209+
profile was computed with `k > 1` (i.e., top-k nearest neighbors), you
210+
must summarize the top-k nearest-neighbor distances for each subsequence
211+
into a single value (e.g., `np.mean`, `np.min`, etc) and that use that
212+
derived value as your `P`.
209213
210214
min_neighbors : int, default 1
211215
The minimum number of similar matches a subsequence needs to have in order

0 commit comments

Comments
 (0)