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

Autotune insulinPeakTime and insulinEndTime #1018

Merged
merged 25 commits into from
Aug 15, 2018
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3a4a81c
Initial commit of tuning dia and peak capability.
May 15, 2018
6fd9549
Added setting customPeakTime to true to allow peak time manipulation.
May 17, 2018
6817bc7
Fixed Math function being called.
May 17, 2018
a55277d
Only allowed DIA to range to 9.
May 19, 2018
c1f0653
skip glucose records w/o valid glucose
scottleibrand May 21, 2018
f64da70
Merge branch 'autotune' into tune-dia-and-peak
scottleibrand May 21, 2018
620cb0c
consider DIAs +/- 2h, and peaks +/- 10m, each run
scottleibrand May 21, 2018
35e9b14
use correct peaks; store output
scottleibrand May 21, 2018
a53ec46
tune DIA and insulinPeakTime
scottleibrand May 21, 2018
8e720b1
comment out debugging
scottleibrand May 21, 2018
35a1edd
only tune DIA and peak if requested
scottleibrand May 21, 2018
0771b92
allow 35-100m peak for fiasp, 50-120m for others
scottleibrand May 22, 2018
0987469
syntax
scottleibrand May 22, 2018
7e73528
replace let with var for compatibility
scottleibrand Jun 3, 2018
8b37073
round deviations before comparison
scottleibrand Jun 3, 2018
14a189c
require 1% improvement to change DIA/peak
scottleibrand Jun 4, 2018
cf35f41
fix variable reference
scottleibrand Jun 4, 2018
0ec8bfa
print insulinEndTime instead of DIA
scottleibrand Jun 4, 2018
2788d58
enforce a maximum insulinEndTime of 12h
scottleibrand Jun 4, 2018
9fa266b
don't reference glucoseDatum unless it exists
scottleibrand Jun 4, 2018
d33d62d
set the right variable
scottleibrand Jun 4, 2018
b3ad718
Compare both RMSD and MAE (#1028)
scottleibrand Jun 8, 2018
3d1f424
print when leaving ISF unchanged
scottleibrand Jun 8, 2018
f15ac24
only uam-exclude when IOB > 2x basal
scottleibrand Jun 8, 2018
8e920cc
add UAM to ISF if needed and keep lowest 50%, like with basal
scottleibrand Jun 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
consider DIAs +/- 2h, and peaks +/- 10m, each run
  • Loading branch information
scottleibrand committed May 21, 2018
commit 620cb0c7dd248b87aa87b4ebaa79358f09736281
10 changes: 7 additions & 3 deletions lib/autotune-prep/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ function generate (inputs) {
let consoleError = console.error;
console.error = function() {};

for (let dia=5; dia < 10; ++dia) {
let startDIA=opts.profile.dia - 2;
let endDIA=opts.profile.dia + 2;
for (let dia=startDIA; dia < endDIA; ++dia) {
let deviations = 0;

opts.profile.dia = dia;
Expand Down Expand Up @@ -76,10 +78,12 @@ function generate (inputs) {
minDeviations = 1000000;

let newPeak = 0;
opts.profile.dia = 6;
//opts.profile.dia = 6;
opts.profile.useCustomPeakTime = true;

for (let peak=55; peak < 120; peak=(peak+5)) {
let startPeak=opts.profile.insulinPeakTime - 10;
let endPeak=opts.profile.insulinPeakTime + 10;
for (let peak=startPeak; peak < endPeak; peak=(peak+5)) {
let deviations = 0;

opts.profile.insulinPeakTime = peak;
Expand Down