childmindresearch / wristpy

https://childmindresearch.github.io/wristpy/
GNU Lesser General Public License v2.1
2 stars 1 forks source link

Implementing rolling median function for metrics.py #38

Closed frey-perez closed 3 months ago

frey-perez commented 3 months ago

This function implements the rolling median function, a function meant to pre-process acceleration data before determining angle_relative_to_horizontal values. All relevant unit tests are included.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (fd1a714) to head (9d91309).

:exclamation: Current head 9d91309 differs from pull request most recent head ae24b23

Please upload reports for the commit ae24b23 to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## development #38 +/- ## ============================================= Coverage 100.00% 100.00% ============================================= Files 4 4 Lines 113 120 +7 ============================================= + Hits 113 120 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

nx10 commented 3 months ago

Why not use https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.Expr.rolling_median.html and other polars.rolling_* methods instead of implementing all of these?

ReinderVosDeWael commented 3 months ago

Why not use https://docs.pola.rs/py-polars/html/reference/expressions/api/polars.Expr.rolling_median.html and other polars.rolling_* methods instead of implementing all of these?

Fair point - for now, as there's some design questions to be answered regarding handling of even window size and unit of window size, lets leave this for now. I'll make an issue out of it though so we can reassess this when those issues are resolved.