Commit 51fa4b5
Feature/issue 14/combined temperature acceleration nonwear detect (#141)
* Update metrics.py
Initial implementation of CTA non wear detect
* Update metrics.py
switch to float as input
* Update metrics.py
Handling uneven time sampling between temp and acceleration
Adding moving average as low pass filter
* Added initial unit tests + rearrange function
Added helper function and re-arranged +simplified main algorithm
Added first unit tests
* Update metrics.py
Fixed acceleration SD criteria to be for at least 2 out of 3 axis to agree with paper publication
* Update test_metrics.py
Added coverage for second criteria when accel criteria not met
* Update metrics.py
Switch to if:elif logic for clarity
* Integrate scikit support
Adding skdh DETACH algorithm
Addressed initial review comments for CTA
* Update test_metrics.py
Fix _pre_process_temperature naming
* Modify tests for macos, added unit test for DETACH
Added homebrew install for libomp for skdh support
Added initial unit test for DETACH (not good)
* Update metrics.py
Remove == comparison since mean_temp is float
Fixed scipy.interpolate import
#Note directly importing skdh.preprocessing.DETACH (skdh did not properly set dependencies?)
* Update test_metrics.py
Fix for unit tests with non-decreasing temperature
* Update metrics.py
Fix imports
* Update test_metrics.py
Additional test for the final if (for decreasing temps under temp_threshold)
* Adding majority vote function + resample function
Initial version of majority vote function and the resample function to be used to assess nonwear detection performance
* Modifications to enable cross comparison of nonwear
Changed temporal resolution of DETACH to one minute
Removed monotonically increasing requirement for resample
* Update test_computations.py
Test diff start time
* Update test_computations.py
Add coverage for ValueError because why not
* Update computations.py
Change default temporal resolution to one minute
Rounding for nonwear measurements after resampling
* Update test_computations.py
Test needs to have different temporal resolution otherwise resample doesn't get called
* Update poetry.lock
* Update metrics.py
* Update poetry.lock
resolve merge conflicts
* Update metrics.py
* Added combined ggir_detach ensenmble
Ensemble nonwear for ggir + detach
Added tests and fixed some variable naming
* Update poetry.lock
* Update test_calibration.py
* Adding in logic support for nonwear type into orchestrator
First pass at logic support for the nonwear alogirthms. Defaults to GGIR for all cases (temperature sensor or not)
* Test nonwear options
Unit test failing due to data size of sample bin file
* Add cli support for nonwear algo
Adding in cli support for nonwear
Adding test support
Using argparse, will investigate typer soon to replace this
* Add longer sample data for DETACH
Tests for orchestrator, new example data + move nonwear regrouping into the nonwear definition
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix dependency addition
Remove extras from pyproject.toml and poetry lock file
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Moving into nonwear_utils
Moving some function into nonwear_utils module
* Update orchestrator.py
* Addressing PR comments
* Initial changes for PR
* Adding in support for nonwear dispatcher
* Final edits to cli to support multiple nw algos
* Fixes after chaning var name in get_nonwear_measurements()
* Update metrics.py
Forgot to change year of reference.
* Refactoring nonwear implementation
* Update orchestrator.py
* First pass removing None epoch_length
* Update nonwear_utils.py
* Update nonwear_utils.py
* Epoch length ValueError check
* Removing support for epoch_length = None in enmo and anglez
* Update orchestrator.py
ValueError is raised in internal function.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent d8ab060 commit 51fa4b5
13 files changed
Lines changed: 2140 additions & 402 deletions
File tree
- .github/workflows
- src/wristpy
- core
- processing
- tests
- sample_data
- smoke
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
79 | 90 | | |
80 | 91 | | |
81 | | - | |
82 | | - | |
| 92 | + | |
| 93 | + | |
83 | 94 | | |
84 | 95 | | |
85 | 96 | | |
| |||
141 | 152 | | |
142 | 153 | | |
143 | 154 | | |
144 | | - | |
| 155 | + | |
| 156 | + | |
145 | 157 | | |
146 | 158 | | |
147 | 159 | | |
| |||
180 | 192 | | |
181 | 193 | | |
182 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 50 | | |
99 | 51 | | |
100 | 52 | | |
| |||
103 | 55 | | |
104 | 56 | | |
105 | 57 | | |
106 | | - | |
| 58 | + | |
107 | 59 | | |
| 60 | + | |
108 | 61 | | |
109 | 62 | | |
110 | 63 | | |
| |||
128 | 81 | | |
129 | 82 | | |
130 | 83 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 84 | + | |
134 | 85 | | |
| 86 | + | |
135 | 87 | | |
136 | 88 | | |
137 | 89 | | |
| |||
188 | 140 | | |
189 | 141 | | |
190 | 142 | | |
| 143 | + | |
191 | 144 | | |
192 | 145 | | |
193 | 146 | | |
| |||
198 | 151 | | |
199 | 152 | | |
200 | 153 | | |
| 154 | + | |
201 | 155 | | |
202 | 156 | | |
203 | 157 | | |
| |||
209 | 163 | | |
210 | 164 | | |
211 | 165 | | |
212 | | - | |
| 166 | + | |
| 167 | + | |
213 | 168 | | |
214 | 169 | | |
215 | 170 | | |
| |||
230 | 185 | | |
231 | 186 | | |
232 | 187 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 188 | + | |
| 189 | + | |
236 | 190 | | |
237 | 191 | | |
238 | 192 | | |
| |||
291 | 245 | | |
292 | 246 | | |
293 | 247 | | |
| 248 | + | |
294 | 249 | | |
295 | 250 | | |
296 | 251 | | |
| |||
306 | 261 | | |
307 | 262 | | |
308 | 263 | | |
309 | | - | |
| 264 | + | |
310 | 265 | | |
| 266 | + | |
311 | 267 | | |
312 | 268 | | |
313 | 269 | | |
| |||
328 | 284 | | |
329 | 285 | | |
330 | 286 | | |
331 | | - | |
332 | | - | |
333 | | - | |
| 287 | + | |
334 | 288 | | |
| 289 | + | |
| 290 | + | |
335 | 291 | | |
336 | 292 | | |
337 | 293 | | |
338 | 294 | | |
339 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
340 | 300 | | |
341 | 301 | | |
342 | 302 | | |
| |||
358 | 318 | | |
359 | 319 | | |
360 | 320 | | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
361 | 326 | | |
362 | 327 | | |
363 | 328 | | |
| |||
386 | 351 | | |
387 | 352 | | |
388 | 353 | | |
389 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
390 | 364 | | |
391 | | - | |
392 | | - | |
| 365 | + | |
393 | 366 | | |
394 | 367 | | |
395 | 368 | | |
| |||
398 | 371 | | |
399 | 372 | | |
400 | 373 | | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | 374 | | |
410 | 375 | | |
411 | 376 | | |
| |||
437 | 402 | | |
438 | 403 | | |
439 | 404 | | |
440 | | - | |
| 405 | + | |
441 | 406 | | |
442 | 407 | | |
443 | 408 | | |
| |||
452 | 417 | | |
453 | 418 | | |
454 | 419 | | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | 420 | | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | 421 | | |
464 | 422 | | |
465 | 423 | | |
466 | | - | |
| 424 | + | |
467 | 425 | | |
468 | 426 | | |
469 | | - | |
| 427 | + | |
470 | 428 | | |
0 commit comments