Accelerometer

Latest version: v7.2.1.post0

Safety actively analyzes 700971 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

4.2.3

What's Changed
* Improve docs and fix ReadTheDocs issue
* Fix summary statistics; add new `*-week-avg stats` https://github.com/activityMonitoring/biobankAccelerometerAnalysis/pull/191
* Hardcode `ylim` range in `accPlot` for easier comparison between different plots.
* Use mean (not median) absolute error for calibration. This together with the change introduced in 4.2.0 produce lower calibration error. See plot below.

![calibr-errs-diff](https://user-images.githubusercontent.com/5551642/146919956-31e0ca83-197c-485d-924a-5e26dfc01d9d.png)

4.2.2

- Further improve imputation by first imputing using same day of week, then within weekday/weekend, and finally using all other days.
- Rename output summary field name, e.g. `day0-sleep(hrs)` to `day0-recorded-sleep(hrs)`

4.2.1

What's Changed

* v4.2.1 by chanshing in https://github.com/activityMonitoring/biobankAccelerometerAnalysis/pull/189

- New flag `--extractFeatures` for more flexibility, e.g. extract feats w/o classify
- Make versions explicit in `setup.py` -- mainly to ensure same sklearn/joblib versions with trained model
- No more need to manually specify activity model for `accPlot`
- Add a progress bar for `accCollateSummary`
- Fix summary output stats to be computed based on multiple of 24h, otherwise will be biased for days w/o full 24h. The issue appeared mainly at the boundaries of the recording period (first and last days).
- New summary stats: Include in the summary the actual recorded hours for each day. See below.
- Fix wear time stats to be also based on 24h and be consistent with the other metrics.
- Refactor nonwear code.
- Cleanup imputation: Impute only for stats calculations and no longer impute the output time-series, therefore also deprecate `--imputation`.

Include summary of actual recorded hours of activity
Sometimes we want the actual recorded hours for each separate day. Now we include in the summary:

{
day0-wear(hrs): ...
day1-wear(hrs): ...
...
day0-sleep(hrs): ...
day1-sleep(hrs):...
...
}

These should visually match the time-series plot.

4.2.0

What's Changed
Improve gravity calibration routine; Update github workflows by chanshing in https://github.com/activityMonitoring/biobankAccelerometerAnalysis/pull/184

- Following van Hees paper, discard outliers before linear regression and use weighted least squares instead of ordinary least squares. We use a slight variation where we detect outliers based on a percentile (0.5%) instead of some hard threshold as in the paper. We also track the MAE instead of RMSE which is more robust to outliers.

- Use uncentered temperature (deprecate meanTemp) as it made comparing offsets across devices more cumbersome. Centering the temperature changes the offset coefficients, meaning the same device would have different offsets if they had different mean temps.

- Fix 154 where calibration coeffs were not restored when calibration fails.

- Update github workflows to reflect changes, and also switch to comparing the summary file instead of the epoch file as it is much lighter (28K vs 6.3M). We don't wanna fill up git with historical copies of epoch files.

Deprecation
Calibration is now based on the absolute temperature rather than the centered temperature. The reason for this is that it makes it easier to compare the calibr params across devices. Centering the temperature changes the offset params, so even the same device would have different offsets depending on the mean temperature. In van Hees paper temperature was centered for interpretation purposes. In the future, setting `--meanTemp` will be deprecated. Currently, passing `--meanTemp` will be ignored and force calibration. When processing UKB, we recommend always running calibration.

4.1.0

Two new entry points `accWriteCmds` and `accCollateSummary`

**Usage:**
bash
accWriteCmds accDir/ -d resultsDir/ -f processCmds.txt
accCollateSummary resultsDir -o all-summary.csv


Major changes in output directory structure
Major change in how outputs are structured: When processing multiple files, results are now grouped by subjects instead of results. So
specifying each folder for each result (e.g. `--timeSeriesFolder timeSeries/`, `--summaryFolder summary/`) is now deprecated. Instead, simply specify `--outputFolder` and all result files will be stored there.

Example:

accDir/
group0/
subject001.cwa
subject002.cwa
...
group1/
subject003.cwa
subject004.cwa
...


Then `accWriteCmds accDir/ -d outDir/ -f processCmds.txt ; bash processCmds.txt` will result in the following output structure:


outDir/
group0/
subject001/
subject001-summary.json
subject001-timeSeries.csv
...
subject002/
subject002-summary.json
subject002-timeSeries.csv
...
...
group1/
subject003/
subject003-summary.json
subject003-timeSeries.csv
...
subject004/
subject004-summary.json
subject004-timeSeries.csv
...
...


Minor fixes
- better print
- rm nonWearFile intermediate file at exit
- filesCSV defaults to None (calibrate by default)

4.0.2

Minor bug fixes:
- 83d07c6025a55dd1211f7b33241768c2cf946b3b improve collate json and fix future regex bug. Closes 178
- 426a057aae1209a603b76c6b4ed25c6f02ebd8d9 fix file extension case sensitive
- 1a520f97569c272cf914795891c1b1bb8268eed6 fix folder writable assertion. Closes 182
- 46572c7e13f201073c866705ece877b2a71c7395 fix nan wrongly imputed
- 5d1d7c2ca29f9d744f8a82d20693382c89a0b818 fix impute plot

Page 5 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.