diff --git a/config.yaml b/config.yaml index 0f39a418..009116d3 100644 --- a/config.yaml +++ b/config.yaml @@ -37,8 +37,8 @@ MESSAGES: DB_TABLE: messages TYPES : [received, sent] FEATURES: - received: [count, distinctcontacts, timefirstsms, timelastsms, countmostfrequentcontact] - sent: [count, distinctcontacts, timefirstsms, timelastsms, countmostfrequentcontact] + received: [count, distinctcontacts, timefirstmessage, timelastmessage, countmostfrequentcontact] + sent: [count, distinctcontacts, timefirstmessage, timelastmessage, countmostfrequentcontact] DAY_SEGMENTS: *day_segments # Communication call features config, TYPES and FEATURES keys need to match diff --git a/docs/features/extracted.rst b/docs/features/extracted.rst index d36f58e1..06e1894c 100644 --- a/docs/features/extracted.rst +++ b/docs/features/extracted.rst @@ -107,8 +107,8 @@ Name Units Description ========================= ========= ============= count messages Number of messages of type ``messages_type`` that occurred during a particular ``day_segment``. distinctcontacts contacts Number of distinct contacts that are associated with a particular ``messages_type`` during a particular ``day_segment``. -timefirstsms minutes Number of minutes between 12:00am (midnight) and the first ``message`` of a particular ``messages_type``. -timelastsms minutes Number of minutes between 12:00am (midnight) and the last ``message`` of a particular ``messages_type``. +timefirstmessages minutes Number of minutes between 12:00am (midnight) and the first ``message`` of a particular ``messages_type``. +timelastmessages minutes Number of minutes between 12:00am (midnight) and the last ``message`` of a particular ``messages_type``. countmostfrequentcontact messages Number of messages from the contact with the most messages of ``messages_type`` during a ``day_segment`` throughout the whole dataset of each participant. ========================= ========= ============= @@ -120,7 +120,7 @@ countmostfrequentcontact messages Number of messages from the contact wi ... TYPES: [sent] FEATURES: - sent: [count, distinctcontacts, timefirstsms, timelastsms, countmostfrequentcontact] + sent: [count, distinctcontacts, timefirstmessages, timelastmessages, countmostfrequentcontact] .. _call-sensor-doc: @@ -747,7 +747,7 @@ unknownexpectedfraction Ration between minutesunknown an ========================= ================= ============= **Assumptions/Observations:** - +N/A .. ------------------------------- Begin Fitbit Section ----------------------------------- .. diff --git a/src/features/messages/messages_base.R b/src/features/messages/messages_base.R index 70b8510f..a784a213 100644 --- a/src/features/messages/messages_base.R +++ b/src/features/messages/messages_base.R @@ -1,4 +1,4 @@ -library('tidyr') +library('tidyr') filter_by_day_segment <- function(data, day_segment) { if(day_segment %in% c("morning", "afternoon", "evening", "night")) @@ -9,51 +9,51 @@ filter_by_day_segment <- function(data, day_segment) { return(data %>% head(0)) } -base_sms_features <- function(sms, sms_type, day_segment, requested_features){ +base_messages_features <- function(messages, messages_type, day_segment, requested_features){ # Output dataframe features = data.frame(local_date = character(), stringsAsFactors = FALSE) # The name of the features this function can compute - base_features_names <- c("countmostfrequentcontact", "count", "distinctcontacts", "timefirstsms", "timelastsms") + base_features_names <- c("countmostfrequentcontact", "count", "distinctcontacts", "timefirstmessage", "timelastmessage") # The subset of requested features this function can compute features_to_compute <- intersect(base_features_names, requested_features) - # Filter rows that belong to the sms type and day segment of interest - sms <- sms %>% filter(message_type == ifelse(sms_type == "received", "1", ifelse(sms_type == "sent", 2, NA))) %>% + # Filter rows that belong to the message type and day segment of interest + messages <- messages %>% filter(message_type == ifelse(messages_type == "received", "1", ifelse(messages_type == "sent", 2, NA))) %>% filter_by_day_segment(day_segment) # If there are not features or data to work with, return an empty df with appropiate columns names if(length(features_to_compute) == 0) return(features) - if(nrow(sms) < 1) - return(cbind(features, read.csv(text = paste(paste("sms", sms_type, day_segment, features_to_compute, sep = "_"), collapse = ","), stringsAsFactors = FALSE))) + if(nrow(messages) < 1) + return(cbind(features, read.csv(text = paste(paste("messages", messages_type, day_segment, features_to_compute, sep = "_"), collapse = ","), stringsAsFactors = FALSE))) for(feature_name in features_to_compute){ if(feature_name == "countmostfrequentcontact"){ # Get the number of messages for the most frequent contact throughout the study - mostfrequentcontact <- sms %>% + mostfrequentcontact <- messages %>% group_by(trace) %>% mutate(N=n()) %>% ungroup() %>% filter(N == max(N)) %>% head(1) %>% # if there are multiple contacts with the same amount of messages pick the first one only pull(trace) - feature <- sms %>% + feature <- messages %>% filter(trace == mostfrequentcontact) %>% group_by(local_date) %>% - summarise(!!paste("sms", sms_type, day_segment, feature_name, sep = "_") := n()) %>% + summarise(!!paste("messages", messages_type, day_segment, feature_name, sep = "_") := n()) %>% replace(is.na(.), 0) features <- merge(features, feature, by="local_date", all = TRUE) } else { - feature <- sms %>% + feature <- messages %>% group_by(local_date) feature <- switch(feature_name, - "count" = feature %>% summarise(!!paste("sms", sms_type, day_segment, feature_name, sep = "_") := n()), - "distinctcontacts" = feature %>% summarise(!!paste("sms", sms_type, day_segment, feature_name, sep = "_") := n_distinct(trace)), - "timefirstsms" = feature %>% summarise(!!paste("sms", sms_type, day_segment, feature_name, sep = "_") := first(local_hour) * 60 + first(local_minute)), - "timelastsms" = feature %>% summarise(!!paste("sms", sms_type, day_segment, feature_name, sep = "_") := last(local_hour) * 60 + last(local_minute))) + "count" = feature %>% summarise(!!paste("messages", messages_type, day_segment, feature_name, sep = "_") := n()), + "distinctcontacts" = feature %>% summarise(!!paste("messages", messages_type, day_segment, feature_name, sep = "_") := n_distinct(trace)), + "timefirstmessage" = feature %>% summarise(!!paste("messages", messages_type, day_segment, feature_name, sep = "_") := first(local_hour) * 60 + first(local_minute)), + "timelastmessage" = feature %>% summarise(!!paste("messages", messages_type, day_segment, feature_name, sep = "_") := last(local_hour) * 60 + last(local_minute))) features <- merge(features, feature, by="local_date", all = TRUE) } diff --git a/src/features/messages_features.R b/src/features/messages_features.R index 14a54472..1f8cabde 100644 --- a/src/features/messages_features.R +++ b/src/features/messages_features.R @@ -1,20 +1,20 @@ # If you want to implement extra features, source(..) a new file and duplicate the line "features <- merge(...)", then -# swap base_sms_features(...) for your own function +# swap base_sms_features(...) for your own function source("renv/activate.R") source("src/features/messages/messages_base.R") library(dplyr, warn.conflicts = FALSE) -sms <- read.csv(snakemake@input[[1]]) +messages <- read.csv(snakemake@input[[1]]) day_segment <- snakemake@params[["day_segment"]] requested_features <- snakemake@params[["features"]] -sms_type <- snakemake@params[["messages_type"]] +messages_type <- snakemake@params[["messages_type"]] features <- data.frame(local_date = character(), stringsAsFactors = FALSE) # Compute base SMS features -features <- merge(features, base_sms_features(sms, sms_type, day_segment, requested_features), by="local_date", all = TRUE) +features <- merge(features, base_messages_features(messages, messages_type, day_segment, requested_features), by="local_date", all = TRUE) if(ncol(features) != length(requested_features) + 1) - stop(paste0("The number of features in the output dataframe (=", ncol(features),") does not match the expected value (=", length(requested_features)," + 1). Verify your SMS feature extraction functions")) + stop(paste0("The number of features in the output dataframe (=", ncol(features),") does not match the expected value (=", length(requested_features)," + 1). Verify your Messages (SMS) feature extraction functions")) write.csv(features, snakemake@output[[1]], row.names = FALSE) diff --git a/tests/data/processed/test01/messages_received_afternoon.csv b/tests/data/processed/test01/messages_received_afternoon.csv index ef130628..10344957 100644 --- a/tests/data/processed/test01/messages_received_afternoon.csv +++ b/tests/data/processed/test01/messages_received_afternoon.csv @@ -1,2 +1,2 @@ -"local_date","sms_received_afternoon_countmostfrequentcontact","sms_received_afternoon_count","sms_received_afternoon_distinctcontacts","sms_received_afternoon_timefirstsms","sms_received_afternoon_timelastsms" +"local_date","messages_received_afternoon_countmostfrequentcontact","messages_received_afternoon_count","messages_received_afternoon_distinctcontacts","messages_received_afternoon_timefirstmessage","messages_received_afternoon_timelastmessage" "2020-05-28",1,2,2,830,949 diff --git a/tests/data/processed/test01/messages_received_daily.csv b/tests/data/processed/test01/messages_received_daily.csv index 3683c908..b3db335e 100644 --- a/tests/data/processed/test01/messages_received_daily.csv +++ b/tests/data/processed/test01/messages_received_daily.csv @@ -1,3 +1,3 @@ -"local_date","sms_received_daily_countmostfrequentcontact","sms_received_daily_count","sms_received_daily_distinctcontacts","sms_received_daily_timefirstsms","sms_received_daily_timelastsms" +"local_date","messages_received_daily_countmostfrequentcontact","messages_received_daily_count","messages_received_daily_distinctcontacts","messages_received_daily_timefirstmessage","messages_received_daily_timelastmessage" "2020-05-28",7,12,6,6,1382 "2020-05-29",3,6,4,401,1382 diff --git a/tests/data/processed/test01/messages_received_evening.csv b/tests/data/processed/test01/messages_received_evening.csv index 9976fc09..2791e326 100644 --- a/tests/data/processed/test01/messages_received_evening.csv +++ b/tests/data/processed/test01/messages_received_evening.csv @@ -1,3 +1,3 @@ -"local_date","sms_received_evening_countmostfrequentcontact","sms_received_evening_count","sms_received_evening_distinctcontacts","sms_received_evening_timefirstsms","sms_received_evening_timelastsms" +"local_date","messages_received_evening_countmostfrequentcontact","messages_received_evening_count","messages_received_evening_distinctcontacts","messages_received_evening_timefirstmessage","messages_received_evening_timelastmessage" "2020-05-28",2,3,2,1173,1382 "2020-05-29",2,3,2,1173,1382 diff --git a/tests/data/processed/test01/messages_received_morning.csv b/tests/data/processed/test01/messages_received_morning.csv index dc281938..2aab40a6 100644 --- a/tests/data/processed/test01/messages_received_morning.csv +++ b/tests/data/processed/test01/messages_received_morning.csv @@ -1,3 +1,3 @@ -"local_date","sms_received_morning_countmostfrequentcontact","sms_received_morning_count","sms_received_morning_distinctcontacts","sms_received_morning_timefirstsms","sms_received_morning_timelastsms" +"local_date","messages_received_morning_countmostfrequentcontact","messages_received_morning_count","messages_received_morning_distinctcontacts","messages_received_morning_timefirstmessage","messages_received_morning_timelastmessage" "2020-05-28",1,3,3,401,660 "2020-05-29",1,3,3,401,660 diff --git a/tests/data/processed/test01/messages_received_night.csv b/tests/data/processed/test01/messages_received_night.csv index 1d90dc36..84a53e1b 100644 --- a/tests/data/processed/test01/messages_received_night.csv +++ b/tests/data/processed/test01/messages_received_night.csv @@ -1,2 +1,2 @@ -"local_date","sms_received_night_countmostfrequentcontact","sms_received_night_count","sms_received_night_distinctcontacts","sms_received_night_timefirstsms","sms_received_night_timelastsms" +"local_date","messages_received_night_countmostfrequentcontact","messages_received_night_count","messages_received_night_distinctcontacts","messages_received_night_timefirstmessage","messages_received_night_timelastmessage" "2020-05-28",4,4,1,6,312 diff --git a/tests/data/processed/test01/messages_sent_afternoon.csv b/tests/data/processed/test01/messages_sent_afternoon.csv index 96e4a9d9..1ac41cd2 100644 --- a/tests/data/processed/test01/messages_sent_afternoon.csv +++ b/tests/data/processed/test01/messages_sent_afternoon.csv @@ -1,2 +1,2 @@ -"local_date","sms_sent_afternoon_countmostfrequentcontact","sms_sent_afternoon_count","sms_sent_afternoon_distinctcontacts","sms_sent_afternoon_timefirstsms","sms_sent_afternoon_timelastsms" +"local_date","messages_sent_afternoon_countmostfrequentcontact","messages_sent_afternoon_count","messages_sent_afternoon_distinctcontacts","messages_sent_afternoon_timefirstmessage","messages_sent_afternoon_timelastmessage" "2020-05-28",1,3,3,722,979 diff --git a/tests/data/processed/test01/messages_sent_daily.csv b/tests/data/processed/test01/messages_sent_daily.csv index 8638ad3f..b6d423ea 100644 --- a/tests/data/processed/test01/messages_sent_daily.csv +++ b/tests/data/processed/test01/messages_sent_daily.csv @@ -1,3 +1,3 @@ -"local_date","sms_sent_daily_countmostfrequentcontact","sms_sent_daily_count","sms_sent_daily_distinctcontacts","sms_sent_daily_timefirstsms","sms_sent_daily_timelastsms" +"local_date","messages_sent_daily_countmostfrequentcontact","messages_sent_daily_count","messages_sent_daily_distinctcontacts","messages_sent_daily_timefirstmessage","messages_sent_daily_timelastmessage" "2020-05-28",3,8,6,219,1401 "2020-05-29",1,4,4,388,1401 diff --git a/tests/data/processed/test01/messages_sent_evening.csv b/tests/data/processed/test01/messages_sent_evening.csv index c034593c..b5a38e27 100644 --- a/tests/data/processed/test01/messages_sent_evening.csv +++ b/tests/data/processed/test01/messages_sent_evening.csv @@ -1,3 +1,3 @@ -"local_date","sms_sent_evening_countmostfrequentcontact","sms_sent_evening_count","sms_sent_evening_distinctcontacts","sms_sent_evening_timefirstsms","sms_sent_evening_timelastsms" +"local_date","messages_sent_evening_countmostfrequentcontact","messages_sent_evening_count","messages_sent_evening_distinctcontacts","messages_sent_evening_timefirstmessage","messages_sent_evening_timelastmessage" "2020-05-28",1,2,2,1218,1401 "2020-05-29",1,2,2,1218,1401 diff --git a/tests/data/processed/test01/messages_sent_morning.csv b/tests/data/processed/test01/messages_sent_morning.csv index 08719542..a3d3fb5e 100644 --- a/tests/data/processed/test01/messages_sent_morning.csv +++ b/tests/data/processed/test01/messages_sent_morning.csv @@ -1,3 +1,3 @@ -"local_date","sms_sent_morning_countmostfrequentcontact","sms_sent_morning_count","sms_sent_morning_distinctcontacts","sms_sent_morning_timefirstsms","sms_sent_morning_timelastsms" +"local_date","messages_sent_morning_countmostfrequentcontact","messages_sent_morning_count","messages_sent_morning_distinctcontacts","messages_sent_morning_timefirstmessage","messages_sent_morning_timelastmessage" "2020-05-28",1,2,2,388,654 "2020-05-29",1,2,2,388,654 diff --git a/tests/data/processed/test01/messages_sent_night.csv b/tests/data/processed/test01/messages_sent_night.csv index 92ef2e04..bbabc406 100644 --- a/tests/data/processed/test01/messages_sent_night.csv +++ b/tests/data/processed/test01/messages_sent_night.csv @@ -1,2 +1,2 @@ -"local_date","sms_sent_night_countmostfrequentcontact","sms_sent_night_count","sms_sent_night_distinctcontacts","sms_sent_night_timefirstsms","sms_sent_night_timelastsms" +"local_date","messages_sent_night_countmostfrequentcontact","messages_sent_night_count","messages_sent_night_distinctcontacts","messages_sent_night_timefirstmessage","messages_sent_night_timelastmessage" "2020-05-28",1,1,1,219,219 diff --git a/tests/data/processed/test02/messages_received_afternoon.csv b/tests/data/processed/test02/messages_received_afternoon.csv index ef130628..10344957 100644 --- a/tests/data/processed/test02/messages_received_afternoon.csv +++ b/tests/data/processed/test02/messages_received_afternoon.csv @@ -1,2 +1,2 @@ -"local_date","sms_received_afternoon_countmostfrequentcontact","sms_received_afternoon_count","sms_received_afternoon_distinctcontacts","sms_received_afternoon_timefirstsms","sms_received_afternoon_timelastsms" +"local_date","messages_received_afternoon_countmostfrequentcontact","messages_received_afternoon_count","messages_received_afternoon_distinctcontacts","messages_received_afternoon_timefirstmessage","messages_received_afternoon_timelastmessage" "2020-05-28",1,2,2,830,949 diff --git a/tests/data/processed/test02/messages_received_daily.csv b/tests/data/processed/test02/messages_received_daily.csv index 556f361b..a6143606 100644 --- a/tests/data/processed/test02/messages_received_daily.csv +++ b/tests/data/processed/test02/messages_received_daily.csv @@ -1,3 +1,3 @@ -"local_date","sms_received_daily_countmostfrequentcontact","sms_received_daily_count","sms_received_daily_distinctcontacts","sms_received_daily_timefirstsms","sms_received_daily_timelastsms" +"local_date","messages_received_daily_countmostfrequentcontact","messages_received_daily_count","messages_received_daily_distinctcontacts","messages_received_daily_timefirstmessage","messages_received_daily_timelastmessage" "2020-05-28",1,12,12,6,1382 "2020-05-29",0,6,6,401,1382 diff --git a/tests/data/processed/test02/messages_received_evening.csv b/tests/data/processed/test02/messages_received_evening.csv index 691965d1..01058f5a 100644 --- a/tests/data/processed/test02/messages_received_evening.csv +++ b/tests/data/processed/test02/messages_received_evening.csv @@ -1,3 +1,3 @@ -"local_date","sms_received_evening_countmostfrequentcontact","sms_received_evening_count","sms_received_evening_distinctcontacts","sms_received_evening_timefirstsms","sms_received_evening_timelastsms" +"local_date","messages_received_evening_countmostfrequentcontact","messages_received_evening_count","messages_received_evening_distinctcontacts","messages_received_evening_timefirstmessage","messages_received_evening_timelastmessage" "2020-05-28",1,3,3,1173,1382 "2020-05-29",0,3,3,1173,1382 diff --git a/tests/data/processed/test02/messages_received_morning.csv b/tests/data/processed/test02/messages_received_morning.csv index 23140211..57bab4a1 100644 --- a/tests/data/processed/test02/messages_received_morning.csv +++ b/tests/data/processed/test02/messages_received_morning.csv @@ -1,3 +1,3 @@ -"local_date","sms_received_morning_countmostfrequentcontact","sms_received_morning_count","sms_received_morning_distinctcontacts","sms_received_morning_timefirstsms","sms_received_morning_timelastsms" +"local_date","messages_received_morning_countmostfrequentcontact","messages_received_morning_count","messages_received_morning_distinctcontacts","messages_received_morning_timefirstmessage","messages_received_morning_timelastmessage" "2020-05-28",1,3,3,401,660 "2020-05-29",0,3,3,401,660 diff --git a/tests/data/processed/test02/messages_received_night.csv b/tests/data/processed/test02/messages_received_night.csv index 36f3809d..574edc88 100644 --- a/tests/data/processed/test02/messages_received_night.csv +++ b/tests/data/processed/test02/messages_received_night.csv @@ -1,2 +1,2 @@ -"local_date","sms_received_night_countmostfrequentcontact","sms_received_night_count","sms_received_night_distinctcontacts","sms_received_night_timefirstsms","sms_received_night_timelastsms" +"local_date","messages_received_night_countmostfrequentcontact","messages_received_night_count","messages_received_night_distinctcontacts","messages_received_night_timefirstmessage","messages_received_night_timelastmessage" "2020-05-28",1,4,4,6,312 diff --git a/tests/data/processed/test02/messages_sent_afternoon.csv b/tests/data/processed/test02/messages_sent_afternoon.csv index 96e4a9d9..1ac41cd2 100644 --- a/tests/data/processed/test02/messages_sent_afternoon.csv +++ b/tests/data/processed/test02/messages_sent_afternoon.csv @@ -1,2 +1,2 @@ -"local_date","sms_sent_afternoon_countmostfrequentcontact","sms_sent_afternoon_count","sms_sent_afternoon_distinctcontacts","sms_sent_afternoon_timefirstsms","sms_sent_afternoon_timelastsms" +"local_date","messages_sent_afternoon_countmostfrequentcontact","messages_sent_afternoon_count","messages_sent_afternoon_distinctcontacts","messages_sent_afternoon_timefirstmessage","messages_sent_afternoon_timelastmessage" "2020-05-28",1,3,3,722,979 diff --git a/tests/data/processed/test02/messages_sent_daily.csv b/tests/data/processed/test02/messages_sent_daily.csv index 0e446cec..a14ba553 100644 --- a/tests/data/processed/test02/messages_sent_daily.csv +++ b/tests/data/processed/test02/messages_sent_daily.csv @@ -1,3 +1,3 @@ -"local_date","sms_sent_daily_countmostfrequentcontact","sms_sent_daily_count","sms_sent_daily_distinctcontacts","sms_sent_daily_timefirstsms","sms_sent_daily_timelastsms" +"local_date","messages_sent_daily_countmostfrequentcontact","messages_sent_daily_count","messages_sent_daily_distinctcontacts","messages_sent_daily_timefirstmessage","messages_sent_daily_timelastmessage" "2020-05-28",1,8,8,219,1401 "2020-05-29",0,4,4,388,1401 diff --git a/tests/data/processed/test02/messages_sent_evening.csv b/tests/data/processed/test02/messages_sent_evening.csv index 4195852f..7a6edd68 100644 --- a/tests/data/processed/test02/messages_sent_evening.csv +++ b/tests/data/processed/test02/messages_sent_evening.csv @@ -1,3 +1,3 @@ -"local_date","sms_sent_evening_countmostfrequentcontact","sms_sent_evening_count","sms_sent_evening_distinctcontacts","sms_sent_evening_timefirstsms","sms_sent_evening_timelastsms" +"local_date","messages_sent_evening_countmostfrequentcontact","messages_sent_evening_count","messages_sent_evening_distinctcontacts","messages_sent_evening_timefirstmessage","messages_sent_evening_timelastmessage" "2020-05-28",1,2,2,1218,1401 "2020-05-29",0,2,2,1218,1401 diff --git a/tests/data/processed/test02/messages_sent_morning.csv b/tests/data/processed/test02/messages_sent_morning.csv index db650744..0a7a3e5f 100644 --- a/tests/data/processed/test02/messages_sent_morning.csv +++ b/tests/data/processed/test02/messages_sent_morning.csv @@ -1,3 +1,3 @@ -"local_date","sms_sent_morning_countmostfrequentcontact","sms_sent_morning_count","sms_sent_morning_distinctcontacts","sms_sent_morning_timefirstsms","sms_sent_morning_timelastsms" +"local_date","messages_sent_morning_countmostfrequentcontact","messages_sent_morning_count","messages_sent_morning_distinctcontacts","messages_sent_morning_timefirstmessage","messages_sent_morning_timelastmessage" "2020-05-28",1,2,2,388,654 "2020-05-29",0,2,2,388,654 diff --git a/tests/data/processed/test02/messages_sent_night.csv b/tests/data/processed/test02/messages_sent_night.csv index 92ef2e04..bbabc406 100644 --- a/tests/data/processed/test02/messages_sent_night.csv +++ b/tests/data/processed/test02/messages_sent_night.csv @@ -1,2 +1,2 @@ -"local_date","sms_sent_night_countmostfrequentcontact","sms_sent_night_count","sms_sent_night_distinctcontacts","sms_sent_night_timefirstsms","sms_sent_night_timelastsms" +"local_date","messages_sent_night_countmostfrequentcontact","messages_sent_night_count","messages_sent_night_distinctcontacts","messages_sent_night_timefirstmessage","messages_sent_night_timelastmessage" "2020-05-28",1,1,1,219,219 diff --git a/tests/settings/testing_config.yaml b/tests/settings/testing_config.yaml index beb4484e..b7f25b3b 100644 --- a/tests/settings/testing_config.yaml +++ b/tests/settings/testing_config.yaml @@ -2,6 +2,7 @@ # If you are extracting screen or Barnett's location features, screen and locations tables are mandatory. TABLES_FOR_SENSED_BINS: [messages, calls, screen] + # Participants to include in the analysis # You must create a file for each participant named pXXX containing their device_id. This can be done manually or automatically PIDS: [test01, test02] @@ -17,8 +18,8 @@ MESSAGES: DB_TABLE: messages TYPES : [received, sent] FEATURES: - received: [count, distinctcontacts, timefirstsms, timelastsms, countmostfrequentcontact] - sent: [count, distinctcontacts, timefirstsms, timelastsms, countmostfrequentcontact] + received: [count, distinctcontacts, timefirstmessage, timelastmessage, countmostfrequentcontact] + sent: [count, distinctcontacts, timefirstmessage, timelastmessage, countmostfrequentcontact] DAY_SEGMENTS: *day_segments # Communication call features config, TYPES and FEATURES keys need to match