Window size is too large while using ostinato #605
-
I need help with handling a ValueError thrown from ostinato. I am passing a list of time series that were grouped using stumpy.mass and I am trying to find the most conserved part of those similar time series using ostinato. The issue I am having is with the window size being passed into ostinato. After some successful outcomes, the window size exceeds the max_size and throws the exception. My guess is that the conserved pattern is found near the end of the sub_seq and cannot complete the seq of length m before running out of terms. Any help is appreciated. My output looks like this: NN_Consensus_1 ValueError Traceback (most recent call last) ~/anaconda3/envs/tf_gpu/lib/python3.9/site-packages/stumpy/core.py in inner_wrapper(*args, **kwargs) ~/anaconda3/envs/tf_gpu/lib/python3.9/site-packages/stumpy/ostinato.py in ostinato(Ts, m, normalize) ~/anaconda3/envs/tf_gpu/lib/python3.9/site-packages/stumpy/core.py in preprocess(T, m) ~/anaconda3/envs/tf_gpu/lib/python3.9/site-packages/stumpy/core.py in check_window_size(m, max_size) ValueError: The window size must be less than or equal to 6 During handling of the above exception, another exception occurred: ValueError Traceback (most recent call last) /tmp/ipykernel_7316/3817041441.py in get_neighbor_consensus(NN_list, df_motif, m) ~/anaconda3/envs/tf_gpu/lib/python3.9/site-packages/stumpy/core.py in inner_wrapper(*args, **kwargs) ~/anaconda3/envs/tf_gpu/lib/python3.9/site-packages/stumpy/ostinato.py in ostinato(Ts, m, normalize) ~/anaconda3/envs/tf_gpu/lib/python3.9/site-packages/stumpy/core.py in preprocess(T, m) ~/anaconda3/envs/tf_gpu/lib/python3.9/site-packages/stumpy/core.py in check_window_size(m, max_size) ValueError: The window size must be less than or equal to 6 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@ChrisCalvin Welcome to the STUMPY community. It's hard to know what is causing this issue without a minimum-reproducible-example (with data) but, based on what the error is saying:
This implies that your window size,
Again, without more information, it will be hard to debug. Additionally, I noticed that you used |
Beta Was this translation helpful? Give feedback.
@ChrisCalvin Welcome to the STUMPY community. It's hard to know what is causing this issue without a minimum-reproducible-example (with data) but, based on what the error is saying:
This implies that your window size,
m
, is too large and, in fact, is larger than the length of one (or more) of the time series in your list of time series. Note thatTs_df
must be a Python list of time series. Based on your usage ofTs_df.values
, this implies thatTs_df
is NOT a Python list and is, instead, a Pandas dataframe with multiple time series in each column. This will not work with ostinato and you will get unexpected (bad) results. Instead…