Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve gravity calibration routine; Update github workflows #184

Merged
merged 3 commits into from
Nov 11, 2021

Conversation

chanshing
Copy link
Member

  • Following van Hees paper, discard outliers before linear regression and use weighted least squares instead of ordinary least squares. I use a slight variation where I detect outliers based on a percentile (0.5%) instead of some hard threshold as in the paper. I 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 Calibration should not done when it fails #154 bug 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.

Improve calibration by taking into account outliers and removing them
before linear regression. Also track the MAE instead of RMSE which is
more robust to outliers. Also fix bug where coefs are not restored if
calibration failed. Finally, deprecate centering the temperature
(meanTemp) -- this makes the coefficients less interpretable across
devices (temperature normalization changes the offsets too, making
comparisons across devices with different temperatures more cumbersome)

Closes OxWearables#154
Update to reflect change in calibration. Also use summary.json for
testing as it's lighter than the epoch file (28K vs 6.3M): We don't want
to fill up git with many historical copies of the epoch files.
@chanshing chanshing merged commit c93db22 into OxWearables:master Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calibration should not done when it fails
1 participant