-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] disable imputation on future data (#562)
* postprocess imputation df by putting back trailing nan's Signed-off-by: lschilders <[email protected]> * add unit test test_no_imputation_for_future_data Signed-off-by: lschilders <[email protected]> * fix unit test test_linear_quantile Signed-off-by: lschilders <[email protected]> * fix imports in flatliner.py Signed-off-by: lschilders <[email protected]> * remove columns with future nan values Signed-off-by: lschilders <[email protected]> * implement non_trailing_null_rows in missing_values_transformer and add unit tests Signed-off-by: lschilders <[email protected]> * also transform labels y with trailing null rows Signed-off-by: lschilders <[email protected]> * test in test_linear_quantile for trailing null Signed-off-by: lschilders <[email protected]> * Format Python code with Black Signed-off-by: black <[email protected]> * merge Black formatting in branch Signed-off-by: lschilders <[email protected]> * remove assert in fit_transform missing_values_transformer Signed-off-by: lschilders <[email protected]> * only train on subset of data in test_pipeline_train_model Signed-off-by: lschilders <[email protected]> * adapt transform(x) to not remove non_trailing_nulls and index with DataFrame rather than list of index Signed-off-by: lschilders <[email protected]> * test for duplicate indices Signed-off-by: lschilders <[email protected]> * remove non trailing null rows in fit_transform and check in test_imputer of test_linear_quantile Signed-off-by: lschilders <[email protected]> * add test for calling transform separately Signed-off-by: lschilders <[email protected]> * refactored MissingValuesTransformer with private static method _determine_trailing_null_rows Signed-off-by: lschilders <[email protected]> * add whitelist for no_fill_future_values_features Signed-off-by: lschilders <[email protected]> * immutable default value for no_fill_future_values_features * Update openstef/feature_engineering/missing_values_transformer.py Co-authored-by: Egor Dmitriev <[email protected]> Signed-off-by: Lars Schilders <[email protected]> * add no_fill_future_values_features to model_creator Signed-off-by: lschilders <[email protected]> --------- Signed-off-by: lschilders <[email protected]> Signed-off-by: black <[email protected]> Signed-off-by: Lars Schilders <[email protected]> Co-authored-by: black <[email protected]> Co-authored-by: Egor Dmitriev <[email protected]>
- Loading branch information
1 parent
75ffb01
commit 430fa9e
Showing
7 changed files
with
120 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters