Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

motifs.motifs throws exceptions on larger arrays #81

Open
watsondavetrendalyze opened this issue Sep 15, 2019 · 1 comment
Open

motifs.motifs throws exceptions on larger arrays #81

watsondavetrendalyze opened this issue Sep 15, 2019 · 1 comment

Comments

@watsondavetrendalyze
Copy link

watsondavetrendalyze commented Sep 15, 2019

I have a timeseries (pattern) of length 44,640 (1 month) and a segment (m) length of 60

Exception thrown on this array but not on subset with 10080 points (1 week)

mp = matrixProfile.stomp(pattern,m)

I am getting the following error:

OverflowError Traceback (most recent call last)
in
52 ax.legend()
53
---> 54 mtfs ,motif_d = motifs.motifs(pattern, mp, max_motifs=10)
55 print('top motifs: \n',mtfs)
56 print('top distances: \n',motif_d)

~/.local/lib/python3.6/site-packages/matrixprofile/motifs.py in motifs(ts, mp, max_motifs, radius, n_neighbors, ex_zone)
57 motif_set = set()
58 initial_motif = [min_idx]
---> 59 pair_idx = int(mp[1][min_idx])
60 if mp_current[pair_idx] != np.inf:
61 initial_motif += [pair_idx]

OverflowError: cannot convert float infinity to integer

When I run the same on 10080 points it runs fine and is very fast.

The same data runs fine with MASS2, MASS3 and Stumped over much larger time series > 1.6M rows

Attached in a ZIP file with sample data
MP Debug 1.zip

@watsondavetrendalyze watsondavetrendalyze changed the title motifs.motifs throws exceptions of large arrays motifs.motifs throws exceptions on larger arrays Sep 15, 2019
@watsondavetrendalyze
Copy link
Author

I was able to debug further and I see the matrixProfile.stomp(pattern,m) is returning some NaN values over some range in the data. I do not get this issue on other ranges nor on when using MASS2 and MASS3 on same range that gave the exception. As example the attached works without exception.

coinbase_1month_june_debugtest.zip

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

No branches or pull requests

1 participant