Fill NaNs after merging all features.

rapids
junos 2021-08-21 19:48:57 +02:00
parent ee30c042ea
commit 3611fc76f7
1 changed files with 11 additions and 10 deletions

View File

@ -72,11 +72,6 @@ class SensorFeatures:
self.df_features_all = safe_outer_merge_on_index(
self.df_features_all, self.df_proximity_counts
)
self.df_features_all.fillna(
value= proximity.FILL_NA_PROXIMITY,
inplace=True,
downcast="infer",
)
print("Calculated proximity features.")
if "communication" in self.data_types:
@ -88,13 +83,19 @@ class SensorFeatures:
self.df_features_all = safe_outer_merge_on_index(
self.df_features_all, self.df_calls_sms
)
self.df_features_all.fillna(
value=communication.FILL_NA_CALLS_SMS_ALL,
inplace=True,
downcast="infer",
)
print("Calculated communication features.")
self.df_features_all.fillna(
value=proximity.FILL_NA_PROXIMITY,
inplace=True,
downcast="infer",
)
self.df_features_all.fillna(
value=communication.FILL_NA_CALLS_SMS_ALL,
inplace=True,
downcast="infer",
)
def get_features(self, data_type, feature_names) -> pd.DataFrame:
if data_type == "proximity":
if feature_names == "all":