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

average delta calculation #1

Closed
dm61 opened this issue Jan 7, 2016 · 0 comments
Closed

average delta calculation #1

dm61 opened this issue Jan 7, 2016 · 0 comments
Assignees

Comments

@dm61
Copy link
Owner

dm61 commented Jan 7, 2016

Currently, avg_delta in glucose-get-last.js by taking the current bg, subtracting a past bg value, up to 3 steps behind (15 min old), and dividing by the minutes between. A problem with this approach is that avg_delta is about as noisy as delta. Any decisions based on avg_delta are bound to be corrupted by noise. A better approach is to use an FIR filter over past n samples (this could be a variable) to estimate an average slope. Here is an example that compares delta FIR filtered avg_delta using the current bg and past 6 values, so averaging is over 30 minutes. This FIR filter is equivalent to finding the slope of the best-fit linear-regression line through the bg points. Should investigate other FIR filters.

difffirfilter1

@dm61 dm61 self-assigned this Jan 7, 2016
@dm61 dm61 closed this as completed Jan 28, 2016
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

No branches or pull requests

1 participant