How to use roll_time_series function properly? #1037
-
Hi, I have a time-series dataset with minute-by-minute data. I would like to get the last 4 hours of data to predict a classification label for the next 1-hour. To achieve this, I created IDs using
Unfortunately, in this format, I am losing lots of data. What I actually want is:
I'm not sure how to create it accordingly with the P.S. Here's an example of my data structure:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Have you looked into the documentation for the function? https://tsfresh.readthedocs.io/en/latest/api/tsfresh.utilities.html#tsfresh.utilities.dataframe_functions.roll_time_series There you will find what these arguments mean. For your use-case, you can set the |
Beta Was this translation helpful? Give feedback.
Have you looked into the documentation for the function? https://tsfresh.readthedocs.io/en/latest/api/tsfresh.utilities.html#tsfresh.utilities.dataframe_functions.roll_time_series
There is also a dedicated document text for rolling: https://tsfresh.readthedocs.io/en/latest/text/forecasting.html#forecasting-label
There you will find what these arguments mean. For your use-case, you can set the
max_timeshift
to 4*60 (maximum length of each resulting time series) and therolling_direction
to 60 (the size of each step). Have you actually tried the function already and are facing any errors with it?