Closed mountrcg closed 5 months ago
In my view it is better to filter with less data. SG filter will use forecast into future for current reading, the longer the window width used for filtering the longer also the forecast time frame, introducing more uncertainty into the current smoothed value. If the smoothing result is ok with shorter window, that should be preferred.
Not really relevant.
@avouspierre : Suggestion to use the Savitzky-Golay filter for smoothing only across 10min (3 values) instead of 30min (7 values)
I played around with the Smoothing algorithm and found out that it uses quite a large timeframe to base the filter on. It is 30 min at the moment. I created a rather noise Glucose simulation in the integrated GlucoseSimulator with a rather broader target goal of 70 - 150 to get more noise at https://github.com/nightscout/Open-iAPS/blob/f404fc49bfe4732dbb61c3a1b202d5b1f22ce178/FreeAPS/Sources/APS/CGM/GlucoseSimulatorSource.swift#L157
The smoothing result with a 10 minute window is suffficient in my view. Changed the graph settings a bit for better visual of smoothing effect.