Open brutusyhy opened 1 week ago
Hi, Thanks for making this issue, we hadn't considered it just yet. At the moment we are working on incorporating our own sleep prediction models and that will take priority. We have not seen much use of modifying this parameter in practice, however if it becomes something that is requested we will consider implementing it. Thanks for pointing it out!
Description
Currently,
GGIRSleepDetection._spt_window()
follows the GGIR default behavior of using 0.2 as the threshold value in the Step 6 of the van Hees et al. (2018) algorithm. However, According to the GGIR documentation (https://wadpac.github.io/GGIR/articles/GGIRParameters.html?q=0.2#hdcza_threshold):The original van Hees et al. paper also provided a convincing argument for a dynamic threshold:
Since the patterns of posture change for different individuals and individuals at different nights could be highly varied, using a dynamic method might be better than a fixed threshold. Furthermore, it would also make the function line up with the GGIR, which also provides the option for dynamic thresholding.
Tasks
GGIRSleepDetection._spt_window()
to accept either a float or a length-2 tuple for thethreshold
parameter. When it is float, the current behavior applies; otherwise, the tuple will determine the percentile and multiplier used for the dynamic thresholding.Freeform Notes
No response