Commit Graph

29 Commits (d5ab5a0394cdd395088723ff80d78f2257f8e37c)

Author SHA1 Message Date
Primoz d5ab5a0394 Writing testing scripts to determine the point of manual imputation. 2022-09-14 14:13:03 +00:00
Sam e5dbbfce44
Avoid NA problem in barnett location evaluation (#172)
* Avoid occasional issue where does_not_span evaluates to NA, which breaks the if()

* Restored original warning
2022-01-18 10:16:37 -05:00
Meng Li 296960f425 Fix the bug of location doryab features when a participant is moving during the whole time segment 2021-11-18 18:42:19 -05:00
Meng Li f340b89c58 Temporary revert PHONE_LOCATIONS BARNETT provider to use R script 2021-09-23 18:16:13 -04:00
Meng Li a3fb718aea Refactor PHONE_LOCATIONS DORYAB provider to compute features based on location episodes 2021-09-23 17:40:06 -04:00
JulioV 2e553dc9e7 Add tqdm package to environment.yaml 2021-08-16 11:04:03 -04:00
JulioV 3e69966c91 Update error message 2021-08-04 15:33:02 -04:00
Shirley 4ddb2845a6 Update initialize_params 2021-08-04 15:33:02 -04:00
JulioV 834bd3b93d Refactor in Python of Barnett provider
Co-authored-by: Shirley Hayati <sahayati@ucdavis.edu>
Co-authored-by: JulioV <JulioV@users.noreply.github.com>
2021-08-04 15:33:02 -04:00
Hannah Roberts b52059b027 Ensure date/time format is maintained
Within the 'determine which is home' for loop, 'xx' is the midpoint of two datetime objects. When the midpoint is calculated to be midnight, only the date is returned. This can be replicated with:

mydates <- as.POSIXct("2018-01-01 00:00:00", tz = "UTC")
mydates
[1] "2018-01-01 UTC"

This results in 'hourofday' being NA as an hour cannot be found. By adding the suggested format wrapper, the time is maintained and 'hourofday' can be determined. It can then successfully be applied to the embedded if-statement within the loop.

mydates <- format(as.POSIXct("2018-01-01 00:00:00", tz = "UTC"), "%Y-%m-%d %H:%M:%S")
mydates
[1] "01-01-2018 00:00:00"
2021-07-23 10:12:11 -04:00
Meng Li 1c57320ab3 Update segment labels and fix the bug when we do not have any labels for event segments 2021-06-29 09:49:24 -04:00
Meng Li 9687081fbe Refactor the rule phone_locations_add_doryab_extra_columns 2021-05-28 09:48:36 -04:00
Meng Li 0d6f51be8b Refactor location features from Doryab provider & add a new strategy to infer home location & fix bugs 2021-05-26 17:36:52 -04:00
JulioV c48c1c8f24 Optimize Barnett's computation multi-day segments 2021-03-28 15:29:07 -04:00
nikunjgoel95 cfc5039918 Fixed the empty dataframe case in infer_home_locations.py and added array condition in doryab location 2021-03-19 11:15:57 -04:00
JulioV fb054b539f Add support for multiple time zones 2021-03-11 14:35:34 -05:00
nikunjgoel95 3d6caea6c4 Added the timeathome feature using infer_home_location.py as interim file. 2021-02-24 16:57:25 -05:00
nikunjgoel95 9b248c449d Fixing and adding MAXIMUM_ROW_DURATION. 2021-02-02 11:38:13 -05:00
nikunjgoel95 e7fc8f44f2 Removing Sampling Frequency and fixing ROG, location entropy and normalized location entropy. 2021-02-02 11:38:08 -05:00
nikunjgoel95 0bbf15f52e Fixed the features dependent on time duration. 2021-02-02 11:36:14 -05:00
JulioV d0fe4d4c28 Add ALL_RESAMPLED flag and accuracy limit 2021-01-14 14:34:25 -05:00
JulioV 38fadbf202
Feature/doryab location clustering (#111)
* Added OPTICS -  lightweight clustering algorithm.

* Changed the error message for inconsistent parameters in CONFIG

* Removing hardcoded values and changing default EPS value in the clustering algorithm.

* Added Observation in Doryab Feature docs.

Co-authored-by: nikunjgoel95 <nikunjgoel2009@gmail.com>
2021-01-14 14:22:51 -05:00
JulioV b7ba3c6407
Feature/location doryab fix (#109)
* Fixing the doryab location features for context of clustering.

* Fixed the wrong shifting while calculating the distance.

* Refractoring the haversine function

* Removed comments.

* Cleaning parts of the code.

* Updated the documentation for CLUSTER_ON parameter.

Co-authored-by: nikunjgoel95 <nikunjgoel2009@gmail.com>
2021-01-07 16:20:46 -05:00
JulioV 614e759551 Refactor day segments to time segments 2020-12-02 18:41:03 -05:00
Meng Li 016bdbfe8c Update Python feature scripts to add sensor and provider names automatically 2020-11-30 14:42:19 -05:00
JulioV ced3305ddb Update R feature scripts to add sensor and provider names automatically 2020-11-25 14:49:42 -05:00
JulioV c5197b6c5f Merge branch 'master' into ds2 2020-10-28 17:50:37 -04:00
JulioV 86509207ac Turn off warnings for tidyverse and dplyr 2020-10-23 10:41:00 -04:00
JulioV 24bf62a7ab Update file names 2020-10-19 15:07:12 -04:00