Commit Graph

101 Commits (c688580fe8d4bdb2d81b1a60dd9dfb06c459d41f)

Author SHA1 Message Date
junos c688580fe8 Increment answers separately if needed. 2023-07-03 21:01:15 +02:00
junos 8c0b66eddc Extract method to reuse and simplify. 2023-07-03 20:52:08 +02:00
junos e3ff4846e1 Document functions. 2023-07-03 20:45:39 +02:00
junos 825380a47e Add a function to fix SAM question IDs. 2023-07-03 20:41:48 +02:00
junos ef26772038 Add SAM question IDs. 2023-07-03 20:38:20 +02:00
junos c0236b251c Fix question IDs. 2023-07-03 20:11:11 +02:00
junos ec51d7d406 [WIP] Add a function to recode question IDs. 2023-07-03 19:57:28 +02:00
junos 2aca64aa09 Add COPE questions and their IDs. 2023-07-03 19:34:11 +02:00
junos 471ce7c2cb Document extract_stressful_events. 2023-07-03 17:37:34 +02:00
junos ae2ca63bc4 Define QUESTIONNAIRE IDs and use them.
Clean up docstrings.
2023-07-03 17:09:40 +02:00
junos 0409c9e982 Fix format specification. 2023-05-16 17:22:09 +02:00
junos 118e686491 Specify format directly as infer_datetime_format was deprecated. 2023-05-16 17:04:48 +02:00
junos 6eca98962f Export timezone info, too. 2021-12-01 17:08:24 +01:00
junos d34c2ec5e9 Merge branch 'ambient' into ml_pipeline 2021-11-17 10:39:55 +01:00
junos 6fc0d962ae Remove low values of pressure. 2021-10-22 18:09:17 +02:00
junos 92fbda242b Explore barometer and temperature data.
Add docstrings to models.
2021-10-14 17:59:33 +02:00
junos 6302a0f0d9 Merge ambient sensors into one file.
Explore barometer sensor data for one phone.
2021-10-13 16:57:38 +02:00
junos c1bb4ddf0f Save calculated features to csv files. 2021-08-23 16:36:26 +02:00
junos ee30c042ea Fill NaNs introduced in merge for proximity. 2021-08-21 19:40:42 +02:00
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 72b16af75c Make group_by consistent with communication. 2021-08-20 17:52:31 +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 bb75abcb9b Add tests for proximity. 2021-08-17 16:07:52 +02:00
junos e7fe4e8398 Simplify merge into join. 2021-08-17 13:53:19 +02:00
Junos Lukan cf28aa547a Merge branch 'communication' into 'master'
separated features

See merge request junoslukan/straw2analysis!2
2021-08-17 11:42:03 +00:00
junos c8bb481508 Add a parameter for grouping. 2021-08-12 15:07:20 +02:00
junos 98f1df81c6 Use the same function for ESM and other data. 2021-08-11 17:26:44 +02:00
junos ad85f79bc5 Move datetime calculation to a separate function. 2021-08-11 17:19:14 +02:00
junos c6d0e4391e Add a couple of proximity features. 2021-08-11 16:40:19 +02:00
junos af65d0864f Add a simple function for recoding proximity. 2021-08-11 15:04:27 +02:00
junos a2180aee54 Fix assignment to use loc.
For assigning a value to selected rows (a subset), regular slicing using [] produces a KeyError.
2021-08-11 14:53:59 +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 1bdb334c42 Fix formatting. 2021-07-27 20:57:21 +02:00
junos b99136a181 Document individual functions for event extraction. 2021-07-27 20:56:27 +02:00
junos 9bd42afa02 Simplify pivoting a table and fix other mistakes. 2021-07-27 20:41:13 +02:00