From 9b3447febd075f4dc5ede6a4071f72821835e7a2 Mon Sep 17 00:00:00 2001 From: Primoz Date: Wed, 28 Sep 2022 12:40:05 +0000 Subject: [PATCH] Contextual imputation correction --- src/features/phone_messages/rapids/main.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/phone_messages/rapids/main.R b/src/features/phone_messages/rapids/main.R index 9db9a4b6..817b5e49 100644 --- a/src/features/phone_messages/rapids/main.R +++ b/src/features/phone_messages/rapids/main.R @@ -66,10 +66,10 @@ rapids_features <- function(sensor_data_files, time_segment, provider){ messages_features <- merge(messages_features, features, all=TRUE) } # Fill seleted columns with a high number - time_cols <- select(call_features, contains("timefirstmessages") | contains("timelastmessages")) %>% + time_cols <- select(messages_features, contains("timefirstmessages") | contains("timelastmessages")) %>% colnames(.) - call_features <- call_features %>% + messages_features <- messages_features %>% mutate_at(., time_cols, ~replace(., is.na(.), 1000000)) # Fill NA values with 0