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

Improve documentation on "impute_function" #754

Closed
AsiehH opened this issue Sep 14, 2020 · 2 comments · Fixed by #800
Closed

Improve documentation on "impute_function" #754

AsiehH opened this issue Sep 14, 2020 · 2 comments · Fixed by #800

Comments

@AsiehH
Copy link

AsiehH commented Sep 14, 2020

I receive an error when passing a dataframe with nan in some columns in the following code where df_rolled is the output of roll_time_series:

from tsfresh.feature_extraction import extract_features, EfficientFCParameters
from tsfresh.utilities.dataframe_functions import impute

extraction_setting = EfficientFCParameters()
X = extract_features(df_rolled, column_id="id", column_sort="month", default_fc_parameters=extraction_setting, impute_function=impute, show_warnings=False)

ValueError: Column must not contain NaN values: ratio_last_sum_PPDOS

There is an old issue #18 but it appears that tsfresh.feature_extraction. FeatureExtractionSettings doesn't exist anymore.

@AsiehH
Copy link
Author

AsiehH commented Sep 15, 2020

Ok, so I figured out that the impute_function parameter in extract_features does not impute missing values in the input but the output!
It would be great to clarify this in the documentation here

Currently the definition is as follows

impute_function

(None or callable) – None, if no imputing should happen or the function to call for imputing>

@nils-braun
Copy link
Collaborator

Thanks for getting back to the issue and looking for the solution by yourself. If you have a a good suggestion, we would love to see a PR :-)
Otherwise we can also try to fix it

@nils-braun nils-braun changed the title impute error for extract_features Improve documentation on "impute_function" Sep 15, 2020
nils-braun added a commit that referenced this issue Jan 24, 2021
nils-braun added a commit that referenced this issue Mar 2, 2021
* Fix imputing docu, solving #754

* Stylefix
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

Successfully merging a pull request may close this issue.

2 participants