firstuseafter column removed from contextual imputation

notes
Primoz 2022-09-28 12:47:08 +00:00
parent 9b3447febd
commit 6286e7a44c
2 changed files with 1 additions and 3 deletions

View File

@ -89,8 +89,7 @@ def straw_cleaning(sensor_data_files, provider):
"timefirstcall" in col or "timefirstcall" in col or
"timelastcall" in col or "timelastcall" in col or
"timefirstmessages" in col or "timefirstmessages" in col or
"timelastmessages" in col or "timelastmessages" in col]
"firstuseafter" in col]
features[impute_w_hn] = impute(features[impute_w_hn], method="high_number") features[impute_w_hn] = impute(features[impute_w_hn], method="high_number")
# Impute phone locations with median # Impute phone locations with median

View File

@ -63,7 +63,6 @@ def rapids_features(sensor_data_files, time_segment, provider, filter_data_by_se
if not screen_features.empty: if not screen_features.empty:
screen_features.fillna(value={feature_name: 0 for feature_name in screen_features.columns if not feature_name.startswith(("stdduration", "firstuseafter"))}, inplace=True) screen_features.fillna(value={feature_name: 0 for feature_name in screen_features.columns if not feature_name.startswith(("stdduration", "firstuseafter"))}, inplace=True)
screen_features["firstuseafter"] = screen_features["firstuseafter"].fillna(1000000)
screen_features = screen_features.reset_index() screen_features = screen_features.reset_index()
return screen_features return screen_features