@jasoncalabrese is there an easy way for me to get the actuals that ns is calculating ie given 2 points what is the prediction at x min later and the loss ? I tried to find the prediction that creates the alarms in chrome tools from my site so I could log them but I can't find it in client.js .... Sorry for the noob question
@jasoncalabrese so again sorry for noob question but I see the code in websocket.js in my repo but when I search through sources in chrome tools on my website to put in a break or a watch I don't see websocket.js - is it not being used ?
Im not sure its wrong, the question is which BG at the moment is right and which slope is right. Scott's point on 5 or 10 is a huge debate its why Im trying to do some compares and calc errors etc - accurate slope is the key
but which slope is more accurate? who knows - depends right?
im doing live compares like this - but my results dont look great. This is what I think is the right ar2 from NS versus actual BG (green), predicton (blue) and the loss function... the loss function as Im calcing it basically matches low and high thresholds - because I think the algo lags so badly. That said, I may be doing the calcs wrong which is why I want to confirm my predictor doesnt have a typo
trigger is 0.05 - look at the low and high times versus actual BG -may as well use the thresholds - that said, Im likely doing something wrong
for a given point in time I compute predictions for 30 min (I happened to graph the 15 min one in the plot) and calc the loss function for each point as NS does - it should match the alarms - thats why I want to log NS's calcs to the console I may have a bug
remove the round
right - all predictors - unless you want to only look one timestep ahead - are predicting on forecasted points - thats why the error builds a lot
let me get dev installed so I can get the same graph you showed and I can compare apples to apples
for me and Ryan, Im mostly interested in downside prediction - for rises Im more OK chasing a high bg and not overbolusing
matches the single line in a couple of tests - thanks guys
check out those contrived data examples above - really helps you get a feel for the based on an initial velocity (1 mg/dl/min in the cases I ran) what the results from the AR2 are going to be. I think the biases you see (ie at a high bg and rising BG or a low bg and falling) we predict a VERY small change in BG - this is likely because the data that was used to fit the model were from actuals - if you are high you have likely treated with insulin - if you are low you have likely treated with carbs - therefore the AR2 gives almost no change - this is true in real life for many cases of course - BUT - Im not sure this is what we want for alarms..... kind of scary - if you are 80 and dropping hard it gives you a very small prediction for the drop in 15 or 30 min....
now that I feel better that my ar2 doesnt have a bug Ill try to create some code so you can compare your own actuals from the pebble end point or something and see when alarms would have been triggered....