Added new messages testing

pull/103/head
kaguillera 2020-09-03 16:30:13 -04:00
parent 441cdf69c3
commit c589ca522d
7 changed files with 41 additions and 2 deletions

View File

@ -32,6 +32,13 @@ if config["PHONE_VALID_SENSED_DAYS"]["COMPUTE"]:
min_valid_hours_per_day=config["PHONE_VALID_SENSED_DAYS"]["MIN_VALID_HOURS_PER_DAY"], min_valid_hours_per_day=config["PHONE_VALID_SENSED_DAYS"]["MIN_VALID_HOURS_PER_DAY"],
min_valid_bins_per_hour=config["PHONE_VALID_SENSED_DAYS"]["MIN_VALID_BINS_PER_HOUR"])) min_valid_bins_per_hour=config["PHONE_VALID_SENSED_DAYS"]["MIN_VALID_BINS_PER_HOUR"]))
for provider in config["MESSAGES"]["PROVIDERS"].keys():
if config["MESSAGES"]["PROVIDERS"][provider]["COMPUTE"]:
files_to_compute.extend(expand("data/raw/{pid}/{sensor}_raw.csv", pid=config["PIDS"], sensor=config["MESSAGES"]["DB_TABLE"]))
files_to_compute.extend(expand("data/raw/{pid}/{sensor}_with_datetime.csv", pid=config["PIDS"], sensor=config["MESSAGES"]["DB_TABLE"]))
files_to_compute.extend(expand("data/interim/{pid}/{sensor_key}_features/{sensor_key}_{language}_{provider_key}.csv", pid=config["PIDS"], language=config["MESSAGES"]["PROVIDERS"][provider]["SRC_LANGUAGE"], provider_key=provider, sensor_key="MESSAGES".lower()))
files_to_compute.extend(expand("data/processed/features/{pid}/{sensor_key}.csv", pid=config["PIDS"], sensor_key="MESSAGES".lower()))
for provider in config["BLUETOOTH"]["PROVIDERS"].keys(): for provider in config["BLUETOOTH"]["PROVIDERS"].keys():
if config["BLUETOOTH"]["PROVIDERS"][provider]["COMPUTE"]: if config["BLUETOOTH"]["PROVIDERS"][provider]["COMPUTE"]:
files_to_compute.extend(expand("data/raw/{pid}/{sensor}_raw.csv", pid=config["PIDS"], sensor=config["BLUETOOTH"]["DB_TABLE"])) files_to_compute.extend(expand("data/raw/{pid}/{sensor}_raw.csv", pid=config["PIDS"], sensor=config["BLUETOOTH"]["DB_TABLE"]))

View File

@ -0,0 +1,9 @@
"local_segment","local_segment_label","local_start_date","local_start_time","local_end_date","local_end_time","messages_rapids_received_countmostfrequentcontact","messages_rapids_received_count","messages_rapids_received_distinctcontacts","messages_rapids_received_timefirstmessage","messages_rapids_received_timelastmessage","messages_rapids_sent_countmostfrequentcontact","messages_rapids_sent_count","messages_rapids_sent_distinctcontacts","messages_rapids_sent_timefirstmessage","messages_rapids_sent_timelastmessage"
"afternoon#2020-05-28#12:00:00#2020-05-28#17:59:59","afternoon","2020-05-28","12:00:00","2020-05-28","17:59:59",1,2,2,830,949,1,3,3,722,979
"daily#2020-05-28#00:00:00#2020-05-28#23:59:59","daily","2020-05-28","00:00:00","2020-05-28","23:59:59",7,12,6,6,1382,3,8,6,219,1401
"daily#2020-05-29#00:00:00#2020-05-29#23:59:59","daily","2020-05-29","00:00:00","2020-05-29","23:59:59",3,6,4,401,1382,1,4,4,388,1401
"evening#2020-05-28#18:00:00#2020-05-28#23:59:59","evening","2020-05-28","18:00:00","2020-05-28","23:59:59",2,3,2,1173,1382,1,2,2,1218,1401
"evening#2020-05-29#18:00:00#2020-05-29#23:59:59","evening","2020-05-29","18:00:00","2020-05-29","23:59:59",2,3,2,1173,1382,1,2,2,1218,1401
"morning#2020-05-28#06:00:00#2020-05-28#11:59:59","morning","2020-05-28","06:00:00","2020-05-28","11:59:59",1,3,3,401,660,1,2,2,388,654
"morning#2020-05-29#06:00:00#2020-05-29#11:59:59","morning","2020-05-29","06:00:00","2020-05-29","11:59:59",1,3,3,401,660,1,2,2,388,654
"night#2020-05-28#00:00:00#2020-05-28#05:59:59","night","2020-05-28","00:00:00","2020-05-28","05:59:59",4,4,1,6,312,1,1,1,219,219
1 local_segment local_segment_label local_start_date local_start_time local_end_date local_end_time messages_rapids_received_countmostfrequentcontact messages_rapids_received_count messages_rapids_received_distinctcontacts messages_rapids_received_timefirstmessage messages_rapids_received_timelastmessage messages_rapids_sent_countmostfrequentcontact messages_rapids_sent_count messages_rapids_sent_distinctcontacts messages_rapids_sent_timefirstmessage messages_rapids_sent_timelastmessage
2 afternoon#2020-05-28#12:00:00#2020-05-28#17:59:59 afternoon 2020-05-28 12:00:00 2020-05-28 17:59:59 1 2 2 830 949 1 3 3 722 979
3 daily#2020-05-28#00:00:00#2020-05-28#23:59:59 daily 2020-05-28 00:00:00 2020-05-28 23:59:59 7 12 6 6 1382 3 8 6 219 1401
4 daily#2020-05-29#00:00:00#2020-05-29#23:59:59 daily 2020-05-29 00:00:00 2020-05-29 23:59:59 3 6 4 401 1382 1 4 4 388 1401
5 evening#2020-05-28#18:00:00#2020-05-28#23:59:59 evening 2020-05-28 18:00:00 2020-05-28 23:59:59 2 3 2 1173 1382 1 2 2 1218 1401
6 evening#2020-05-29#18:00:00#2020-05-29#23:59:59 evening 2020-05-29 18:00:00 2020-05-29 23:59:59 2 3 2 1173 1382 1 2 2 1218 1401
7 morning#2020-05-28#06:00:00#2020-05-28#11:59:59 morning 2020-05-28 06:00:00 2020-05-28 11:59:59 1 3 3 401 660 1 2 2 388 654
8 morning#2020-05-29#06:00:00#2020-05-29#11:59:59 morning 2020-05-29 06:00:00 2020-05-29 11:59:59 1 3 3 401 660 1 2 2 388 654
9 night#2020-05-28#00:00:00#2020-05-28#05:59:59 night 2020-05-28 00:00:00 2020-05-28 05:59:59 4 4 1 6 312 1 1 1 219 219

View File

@ -0,0 +1,9 @@
"local_segment","local_segment_label","local_start_date","local_start_time","local_end_date","local_end_time","messages_rapids_received_countmostfrequentcontact","messages_rapids_received_count","messages_rapids_received_distinctcontacts","messages_rapids_received_timefirstmessage","messages_rapids_received_timelastmessage","messages_rapids_sent_countmostfrequentcontact","messages_rapids_sent_count","messages_rapids_sent_distinctcontacts","messages_rapids_sent_timefirstmessage","messages_rapids_sent_timelastmessage"
"afternoon#2020-05-28#12:00:00#2020-05-28#17:59:59","afternoon","2020-05-28","12:00:00","2020-05-28","17:59:59",1,2,2,830,949,1,3,3,722,979
"daily#2020-05-28#00:00:00#2020-05-28#23:59:59","daily","2020-05-28","00:00:00","2020-05-28","23:59:59",1,12,12,6,1382,1,8,8,219,1401
"daily#2020-05-29#00:00:00#2020-05-29#23:59:59","daily","2020-05-29","00:00:00","2020-05-29","23:59:59",0,6,6,401,1382,0,4,4,388,1401
"evening#2020-05-28#18:00:00#2020-05-28#23:59:59","evening","2020-05-28","18:00:00","2020-05-28","23:59:59",1,3,3,1173,1382,1,2,2,1218,1401
"evening#2020-05-29#18:00:00#2020-05-29#23:59:59","evening","2020-05-29","18:00:00","2020-05-29","23:59:59",0,3,3,1173,1382,0,2,2,1218,1401
"morning#2020-05-28#06:00:00#2020-05-28#11:59:59","morning","2020-05-28","06:00:00","2020-05-28","11:59:59",1,3,3,401,660,1,2,2,388,654
"morning#2020-05-29#06:00:00#2020-05-29#11:59:59","morning","2020-05-29","06:00:00","2020-05-29","11:59:59",0,3,3,401,660,0,2,2,388,654
"night#2020-05-28#00:00:00#2020-05-28#05:59:59","night","2020-05-28","00:00:00","2020-05-28","05:59:59",1,4,4,6,312,1,1,1,219,219
1 local_segment local_segment_label local_start_date local_start_time local_end_date local_end_time messages_rapids_received_countmostfrequentcontact messages_rapids_received_count messages_rapids_received_distinctcontacts messages_rapids_received_timefirstmessage messages_rapids_received_timelastmessage messages_rapids_sent_countmostfrequentcontact messages_rapids_sent_count messages_rapids_sent_distinctcontacts messages_rapids_sent_timefirstmessage messages_rapids_sent_timelastmessage
2 afternoon#2020-05-28#12:00:00#2020-05-28#17:59:59 afternoon 2020-05-28 12:00:00 2020-05-28 17:59:59 1 2 2 830 949 1 3 3 722 979
3 daily#2020-05-28#00:00:00#2020-05-28#23:59:59 daily 2020-05-28 00:00:00 2020-05-28 23:59:59 1 12 12 6 1382 1 8 8 219 1401
4 daily#2020-05-29#00:00:00#2020-05-29#23:59:59 daily 2020-05-29 00:00:00 2020-05-29 23:59:59 0 6 6 401 1382 0 4 4 388 1401
5 evening#2020-05-28#18:00:00#2020-05-28#23:59:59 evening 2020-05-28 18:00:00 2020-05-28 23:59:59 1 3 3 1173 1382 1 2 2 1218 1401
6 evening#2020-05-29#18:00:00#2020-05-29#23:59:59 evening 2020-05-29 18:00:00 2020-05-29 23:59:59 0 3 3 1173 1382 0 2 2 1218 1401
7 morning#2020-05-28#06:00:00#2020-05-28#11:59:59 morning 2020-05-28 06:00:00 2020-05-28 11:59:59 1 3 3 401 660 1 2 2 388 654
8 morning#2020-05-29#06:00:00#2020-05-29#11:59:59 morning 2020-05-29 06:00:00 2020-05-29 11:59:59 0 3 3 401 660 0 2 2 388 654
9 night#2020-05-28#00:00:00#2020-05-28#05:59:59 night 2020-05-28 00:00:00 2020-05-28 05:59:59 1 4 4 6 312 1 1 1 219 219

View File

@ -0,0 +1 @@
"local_segment","local_segment_label","local_start_date","local_start_time","local_end_date","local_end_time","messages_rapids_received_countmostfrequentcontact","messages_rapids_received_count","messages_rapids_received_distinctcontacts","messages_rapids_received_timefirstmessage","messages_rapids_received_timelastmessage","messages_rapids_sent_countmostfrequentcontact","messages_rapids_sent_count","messages_rapids_sent_distinctcontacts","messages_rapids_sent_timefirstmessage","messages_rapids_sent_timelastmessage"
1 local_segment local_segment_label local_start_date local_start_time local_end_date local_end_time messages_rapids_received_countmostfrequentcontact messages_rapids_received_count messages_rapids_received_distinctcontacts messages_rapids_received_timefirstmessage messages_rapids_received_timelastmessage messages_rapids_sent_countmostfrequentcontact messages_rapids_sent_count messages_rapids_sent_distinctcontacts messages_rapids_sent_timefirstmessage messages_rapids_sent_timelastmessage

View File

@ -0,0 +1 @@
"local_segment","local_segment_label","local_start_date","local_start_time","local_end_date","local_end_time","messages_rapids_received_countmostfrequentcontact","messages_rapids_received_count","messages_rapids_received_distinctcontacts","messages_rapids_received_timefirstmessage","messages_rapids_received_timelastmessage","messages_rapids_sent_countmostfrequentcontact","messages_rapids_sent_count","messages_rapids_sent_distinctcontacts","messages_rapids_sent_timefirstmessage","messages_rapids_sent_timelastmessage"
1 local_segment local_segment_label local_start_date local_start_time local_end_date local_end_time messages_rapids_received_countmostfrequentcontact messages_rapids_received_count messages_rapids_received_distinctcontacts messages_rapids_received_timefirstmessage messages_rapids_received_timelastmessage messages_rapids_sent_countmostfrequentcontact messages_rapids_sent_count messages_rapids_sent_distinctcontacts messages_rapids_sent_timefirstmessage messages_rapids_sent_timelastmessage

View File

@ -2,5 +2,4 @@ directory: ./
configfile: ./tests/settings/testing_config.yaml configfile: ./tests/settings/testing_config.yaml
snakefile: ./tests/Snakefile snakefile: ./tests/Snakefile
cores: 1 cores: 1
# forcerun: [messages_features, call_features, bluetooth_features, activity_features, battery_features, screen_features, light_features, applications_foreground_features, wifi_features, conversation_features]
forcerun: [join_features_from_providers] forcerun: [join_features_from_providers]

View File

@ -1,6 +1,5 @@
# Participants to include in the analysis # 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 # You must create a file for each participant named pXXX containing their device_id. This can be done manually or automatically
# PIDS: [test01, test02, test03, test04]
PIDS: [test01, test02, test03, test04] PIDS: [test01, test02, test03, test04]
# Global var with common day segments # Global var with common day segments
@ -11,6 +10,20 @@ DAY_SEGMENTS: &day_segments
PHONE_VALID_SENSED_BINS: PHONE_VALID_SENSED_BINS:
DB_TABLES: [bluetooth] DB_TABLES: [bluetooth]
# Communication SMS features config, TYPES and FEATURES keys need to match
MESSAGES:
DB_TABLE: messages
PROVIDERS:
RAPIDS:
COMPUTE: True
MESSAGES_TYPES : [received, sent]
FEATURES:
received: [count, distinctcontacts, timefirstmessage, timelastmessage, countmostfrequentcontact]
sent: [count, distinctcontacts, timefirstmessage, timelastmessage, countmostfrequentcontact]
SRC_LANGUAGE: "r"
SRC_FOLDER: "rapids" # inside src/features/messages
BLUETOOTH: BLUETOOTH:
DB_TABLE: bluetooth DB_TABLE: bluetooth
PROVIDERS: PROVIDERS: