matrixprofile-ts
matrixprofile-ts copied to clipboard
motifs.motifs throws exceptions on larger arrays
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)
~/.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
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.