Commit Graph

35 Commits (832eb6137ed89c1a54a8cb2328151d0d35063ded)

Author SHA1 Message Date
junos aed73bb7ed Add fill values for communication for rows with no calls/smses. 2021-08-21 18:17:58 +02:00
junos 0b85ee8fdc Merge branch 'master' into ml_pipeline 2021-08-21 17:37:45 +02:00
junos e2e268148d Fill in 0.5 for undefined ratio.
When there are no calls and no smses (of a particular type), the ratio is undefined. But since their number is the same, I argue that the ratio can represent that with a 0.5, similarly to the case where no_calls_all = no_sms_all != 0.
2021-08-21 17:33:31 +02:00
junos 00015a3b8d Fill in zeroes when joining or unstacking.
If there are no calls or smses for a particular day, there is no corresponding row in the features dataframe. When joining these, however, NaNs were introduced. Since a value of 0 is meaningful for all of these features, replace NaNs with 0's.
2021-08-21 17:31:15 +02:00
junos d6337e82ac Merge branch 'master' into ml_pipeline 2021-08-20 17:43:53 +02:00
junos 9a319ac6e5 Add an option to group on other than just participant_id. 2021-08-20 17:41:12 +02:00
junos 93f136b080 Add a method to get communication features. 2021-08-19 17:32:02 +02:00
junos 777e6f0a58 calls_sms_features() now returns all communication features. 2021-08-18 15:41:47 +02:00
junos 2d78aacd18 Compile a list of contact features and add a test. 2021-08-18 15:35:42 +02:00
junos c88336481e Add a test for SMS features. 2021-08-18 15:28:46 +02:00
junos 1bc996413e Clarify names for no_all calls/sms feature.
Add another test.
2021-08-18 15:23:30 +02:00
junos a2a44c202a Calculate common features outside if...else. 2021-08-18 10:54:54 +02:00
junos 4740e94d37 Fix a bug introduced in e7fe4e8398 . 2021-08-18 10:51:48 +02:00
junos b1ad8d1309 List calls features. 2021-08-17 16:27:34 +02:00
junos e7fe4e8398 Simplify merge into join. 2021-08-17 13:53:19 +02:00
Ivan Kobe 74b4f9ddbe separated features 2021-08-10 12:59:47 +02:00
junos 02f2607be9 Fix formatting and typos. 2021-08-06 18:53:39 +02:00
junos cca5a29483 Rename features and add one for missed calls. 2021-08-06 18:53:39 +02:00
Ivan Kobe 62af04fe09 Communication 2021-08-06 16:44:39 +00:00
junos b8301ca458 Small corrections. 2021-07-03 18:45:46 +02:00
junos eebb10504e Add more SMS features.
Add a test case for messages and a separate test.
2021-05-07 15:48:17 +02:00
junos 6e9c13d5d8 Add more call features.
The total duration of calls and maximum duration by type.
The number of all calls and ratio of incoming and outgoing calls.
2021-05-07 15:18:56 +02:00
junos 81080f7504 Use Collection from collections.abc instead of typing.List. 2021-05-07 12:44:34 +02:00
junos f37e8dc0eb Add a plot of most frequent contacts. 2021-05-04 17:23:52 +02:00
junos 9301d9ec7f Enumerate contacts by grouping by participant ID first.
Previously, enumeration worked for only one participant.
2021-04-09 16:01:53 +02:00
junos 66b36faedc Add Seaborn and cleanup. 2021-04-09 15:33:52 +02:00
junos b7b60294ba Add a (useless?) test for features.communication.count_comms.
Formatting.
2021-04-06 17:12:36 +02:00
junos 414b30b7e1 Remove missing call duration and document. 2021-04-06 16:54:08 +02:00
junos 9b495e63a3 Add a function to get sms data and illustrate in Jupyter notebook. 2021-04-06 16:50:40 +02:00
junos ab2dbf7a02 Add a function to count calls and their duration and SMSes by type. 2021-04-06 16:23:19 +02:00
junos d218bb1d7c Document communication functions. 2021-04-06 14:32:18 +02:00
junos 9e16d329dd Improve formatting. 2021-04-06 11:48:37 +02:00
junos 29b664c41b Add a method to enumerate contacts and a method to test this with call data. 2021-02-02 16:20:46 +01:00
junos dfb4236769 Add a method to enumerate contacts and appropriate tests. 2021-02-01 18:24:24 +01:00
junos b2d93e0686 Add a method to get Calls data.
Add a test for this.
2021-01-05 17:00:45 +01:00