-
Notifications
You must be signed in to change notification settings - Fork 115
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
Possibility of detect the sleep stages on less than 5min of data #158
Comments
Hi @nabilalibou, Your intuition was right: the main reason for such a duration threshold is that YASA uses 7:30 min smoothing windows. I don't think we want to completely disable this duration threshold in YASA, but you can manually do it by to cloning YASA, installing it from the source ( Line 204 in ae9ccc7
|
Ok so removing the assertion allows yasa to function without any other errors on <5min data even if there is a 7:30 min smoothing windows that will be applied ? Thx for the tips but I admit that if the only blocker is the assertion, I'd be very happy if this was replaced by a warning so that I can use the source version of yasa directly on data less than 5 minutes old 😁. |
I actually have never tried it so I don't know, but I think most likely yes, although the output might be unreliable.
Indeed, but feel free to submit a PR to replace the assertion by a warning 👍 |
Will do! |
Hello,
I am using the automatic sleep staging module to detect sleeping subjects on 5 minutes of data (i know the model has been trained on long night sleep but the accuracy looks good enough in my case) but sometimes because of some cropping I have subjects with 4min58 of data and so they are left out.
Is there a reason why
SleepStaging()
cannot be instantiated on raw instance containing less than 5 minutes of data ?I was wondering if it was possible to turn the 'not enough data' error into a warning but maybe there are technical issues (for example some smoothing windows with an hardcoded minimum length etc) that would make the possibility tedious to enable ?
The text was updated successfully, but these errors were encountered: