Configurations for new standardization path.
parent
92aff93e65
commit
52e11cdcab
|
@ -678,6 +678,7 @@ ALL_CLEANING_INDIVIDUAL:
|
||||||
COMPUTE: True
|
COMPUTE: True
|
||||||
MIN_OVERLAP_FOR_CORR_THRESHOLD: 0.5
|
MIN_OVERLAP_FOR_CORR_THRESHOLD: 0.5
|
||||||
CORR_THRESHOLD: 0.95
|
CORR_THRESHOLD: 0.95
|
||||||
|
STANDARDIZATION: True
|
||||||
SRC_SCRIPT: src/features/all_cleaning_individual/straw/main.py
|
SRC_SCRIPT: src/features/all_cleaning_individual/straw/main.py
|
||||||
|
|
||||||
ALL_CLEANING_OVERALL:
|
ALL_CLEANING_OVERALL:
|
||||||
|
@ -712,6 +713,7 @@ ALL_CLEANING_OVERALL:
|
||||||
COMPUTE: True
|
COMPUTE: True
|
||||||
MIN_OVERLAP_FOR_CORR_THRESHOLD: 0.5
|
MIN_OVERLAP_FOR_CORR_THRESHOLD: 0.5
|
||||||
CORR_THRESHOLD: 0.95
|
CORR_THRESHOLD: 0.95
|
||||||
|
STANDARDIZATION: True
|
||||||
SRC_SCRIPT: src/features/all_cleaning_overall/straw/main.py
|
SRC_SCRIPT: src/features/all_cleaning_overall/straw/main.py
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,9 @@ def straw_cleaning(sensor_data_files, provider):
|
||||||
## STANDARDIZATION - should it happen before or after kNN imputation?
|
## STANDARDIZATION - should it happen before or after kNN imputation?
|
||||||
# TODO: check if there are additional columns that need to be excluded from the standardization
|
# TODO: check if there are additional columns that need to be excluded from the standardization
|
||||||
excluded_columns = ['local_segment', 'local_segment_label', 'local_segment_start_datetime', 'local_segment_end_datetime']
|
excluded_columns = ['local_segment', 'local_segment_label', 'local_segment_start_datetime', 'local_segment_end_datetime']
|
||||||
features.loc[:, ~features.columns.isin(excluded_columns)] = StandardScaler().fit_transform(features.loc[:, ~features.columns.isin(excluded_columns)])
|
|
||||||
|
if provider["STANDARDIZATION"]:
|
||||||
|
features.loc[:, ~features.columns.isin(excluded_columns)] = StandardScaler().fit_transform(features.loc[:, ~features.columns.isin(excluded_columns)])
|
||||||
|
|
||||||
# KNN IMPUTATION
|
# KNN IMPUTATION
|
||||||
impute_cols = [col for col in features.columns if col not in excluded_columns]
|
impute_cols = [col for col in features.columns if col not in excluded_columns]
|
||||||
|
|
Loading…
Reference in New Issue