-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resample beliefs about instantaneous sensors (#118)
* Support downsampling instantaneous sensors * More robust implementation of resampling instantaneous sensor data, taking into account DST transitions * Add tests * Add NotImplementedError case * Simplify util function * Expand docstring * isort * Fix test * Add two regular (non-DST-transition) resampling cases * Move index reset dance to within util function * Remove upsampling example in a test for downsampling (upsampling should use a different method, such as pad or interpolate) * Remove redundante call to drop_duplicates * typo * Clarify inline comment * Add inline explanation about handling DST transitions * Revert "Remove upsampling example in a test for downsampling (upsampling should use a different method, such as pad or interpolate)" This reverts commit 707ea63. * Add new property: event_frequency * Rename function to resample instantaneous events, rewrite its logic by resampling per unique offset, and support multiple resampling methods, with some of them updating the event resolution of the resulting BeliefsDataFrame * Add a lot more test cases for resampling instantaneous sensor data * Test resolution and frequency for resample instantaneous BeliefsDataFrame * Expand test for resampling instantaneous BeliefsDataFrame with 'first' method. * clarifications * Do not cast floats to ints (loss of information) * Restrict resampling to BeliefsDataFrames with 1 row per event * isort and flake8 * Rename test * Clarify docstring of function parameters * Expand resample_events docstring
- Loading branch information
Showing
6 changed files
with
509 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.