Skip to content

Enable stumpy.motifs() to return all the possible motifs #1075

Discussion options

You must be logged in to vote

Do you think it would be useful to have it written into the function documentation that it's possible to set max_motifs=len(P)

I would be open to that. Maybe a comment in max_motifs like:

To consider all valid motifs, you may set max_motifs to be the length of your input matrix profile (i.e., max_motifs=len(P))

To your second question:

I noticed that stumpy.motifs() returns two arrays, motifs and matches

According to the stumpy.motifs documentation, what is returned are the "motif distances" and the "motif indices". Anyhow, let's use this example:

import numpy as np
import stumpy

np.random.seed(0)
T = np.random.rand(100)
m = 5

mp = stumpy.stump(T, m)
motif_distances, motif_indices…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@giacomoguiduzzi
Comment options

@seanlaw
Comment options

Answer selected by giacomoguiduzzi
@giacomoguiduzzi
Comment options

@seanlaw
Comment options

@giacomoguiduzzi
Comment options

@seanlaw
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants