-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
ZeroDivisionError when trying to use RelevantFeatureAugmenter #524
Comments
I experienced the same issue in an |
Sorry for the long pause. I am not 100% sure I have already understood your problem. COuld you maybe post a small portion of your data or at least a Also, as things have changed, does it still occur with the newest version of tsfresh? |
I am encountering this as well with tsfesh==0.15.1. In my case, For now, I am looking for a way to avoid using the Thanks! |
Yes there is :-) Have a look into https://tsfresh.readthedocs.io/en/latest/text/feature_extraction_settings.html#a-handy-trick-do-i-really-have-to-create-the-dictionary-by-hand Back to the issue itself: Could someone share a minimal data example? Because I guess something is non-optimal with the data you feed in |
@nils-braun Thanks for the fast reply. I am really at a loss of what could be wrong with my data, especially since the extract_relevant_features call works as expected. My df consists of about 300 timeseries with over a million observations in each. I guess I can try taking out columns one by one and see if any particular column gives the transformer trouble. Unfortunately, this is not a high priority for me at this time, so I may not get to it anytime soon. Incidentally, was tsfresh largely built to extract features from financial data? I wonder what additional value do the tsfresh feature calculators bring over the traditional technical analysis indicators. Sorry, I know this is off-topic. But I just could not resist asking the question. |
Could anyone of you (@sokol11 @thbuerg) share some example data so I can debug the issue? Concerning your second question: I am not really an expert on financial time series. |
I have additionally ran into this issue with (on wsl)
Code:
and Traceback:
|
I believe the issue is coming from line 194 of
So in my case, Then it seems the offending line in
|
To fix my issue, I just had to make sure the index of This was achieved with
rather than
|
Thanks @JacquesDonnelly ! Now it starts to make sense to me :-) Does this maybe also solve the issue of the others? |
I assume that the assertion introduced in #690 helps also solving the other problems from this thread? If not, please re-open this issue! :-) |
I'm getting an error when I attempt to use the RelevantFeatureAugmenter both by itself and within a pipeline, both produce the same error.
I'm having a very similar issue as described here.
My original Dataframe "reframed" consists of an id, time columns as well as two additional columns, one with my time series lagged by 1 ( 'var1(t-1)' ) and the other with the target time series ( 'var1(t)' ). Thus my data format is flat. My target and feature columns are both numerical with negative, zero, and positive values.
My code is as follows,
The same of the y Series is (25742,) and of X_train is (25742, 0) while reframed_features has a shape of (25742, 3).
The error I'm getting is
When I run the "pipeline_with_two_datasets.ipynb" everything works just fine.
If I add column_kind to the RelevantFeatureAugmenter I get a ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all(). Could this be because I'm attempting to only extract values from one feature (although I just tested this and adding another feature doesn't seem to correct things)? Another area where I think things could be going wrong is that the dataframe I use to "set_timeseries_container" is the same length as the X_test I'm attempting to extract. If this is the cause is there no other way to extract the same features on a new data set, this would be a big issue for me as I'm going to be using new "online" data all of the time. Please forgive me if I'm making a silly error. Thanks.
The text was updated successfully, but these errors were encountered: