Skip to content

Commit

Permalink
move Optimum/Best logging to autotune/index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
scottleibrand committed Jun 4, 2018
1 parent 90ddd23 commit 555fb8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/autotune-prep/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function generate (inputs) {
}
}

consoleError('Optimum insulinEndTime', newDIA, 'mean deviation:', Math.round(minDeviations/basalGlucose.length*1000)/1000, '(mg/dL)');
// consoleError('Optimum insulinEndTime', newDIA, 'mean deviation:', Math.round(minDeviations/basalGlucose.length*1000)/1000, '(mg/dL)');
//consoleError(diaDeviations);

minDeviations = 1000000;
Expand Down Expand Up @@ -160,7 +160,7 @@ function generate (inputs) {
}
}

consoleError('Optimum insulinPeakTime', newPeak, 'mean deviation:', Math.round(minDeviations/basalGlucose.length*1000)/1000, '(mg/dL)');
//consoleError('Optimum insulinPeakTime', newPeak, 'mean deviation:', Math.round(minDeviations/basalGlucose.length*1000)/1000, '(mg/dL)');
//consoleError(peakDeviations);
autotune_prep_output.peakDeviations = peakDeviations;

Expand Down
2 changes: 2 additions & 0 deletions lib/autotune/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ function tuneAllTheThings (inputs) {
var RMSBest = i;
}
}
console.error("Best insulinEndTime for meanDeviations:",meanBest,"hours");
console.error("Best insulinEndTime for RMSDeviations:",meanBest,"hours");
if ( meanBest < 2 && RMSBest < 2 ) {
if ( diaDeviations[1].meanDeviation < currentDIAMeanDev * 0.99 && diaDeviations[1].RMSDeviation < currentDIARMSDev * 0.99 ) {
newDIA = diaDeviations[1].dia;
Expand Down

0 comments on commit 555fb8d

Please sign in to comment.