Skip to content
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

Extra eeg channels in automatic sleep staging #40

Open
zixiao-yin opened this issue Oct 4, 2021 · 11 comments
Open

Extra eeg channels in automatic sleep staging #40

zixiao-yin opened this issue Oct 4, 2021 · 11 comments
Assignees
Labels
enhancement 🚧 New feature or request question 🙋 Further information is requested

Comments

@zixiao-yin
Copy link

Fantastic work! I was wondering if it's possible to feed extra EEG channels (e.g., frontal and occipital channels) to yasa.SleepStaging.
Will this further improve the staging accuracy? I read the preprint paper but only central EEG is mentioned.
Thanks!

@raphaelvallat raphaelvallat self-assigned this Oct 4, 2021
@raphaelvallat raphaelvallat added the question 🙋 Further information is requested label Oct 4, 2021
@raphaelvallat
Copy link
Owner

Hi @zixiao-yin, thank you :-)

For now only a single EEG channel is supported, preferentially C4-M1 or C3-M2. Adding support for multiple EEG channels in the core algorithm should be pretty straightforward, however we'll also need to retrain the classifier (see https://github.com/raphaelvallat/yasa_classifier). I don't think this will be implemented in the near future.

Thanks,
Raphael

@zixiao-yin
Copy link
Author

Got it, Thanks Raphael!

@zixiao-yin
Copy link
Author

Hi Raphael,
Sorry to disturb. One more stupid question. Is yasa also supportable in detecting k-complexes and vertex sharp waves?
Or I should switch to other tools to achieve this aim?

Thank you very much!
Zixiao

@raphaelvallat
Copy link
Owner

Hi @zixiao-yin,

You should be able to detect k-complexes with the yasa.sw_detect function. Make sure that you limit the detection to N2 sleep. Detection of sharp waves is not implemented.

Thanks!
Raphael

@raphaelvallat raphaelvallat added the enhancement 🚧 New feature or request label Feb 20, 2022
@umair-hassan
Copy link

@raphaelvallat Just adding some weight to this issue. I think it will be quite useful to have the sleep stage in this way.

I was thinking we may also generate two different hypnograms (using two different channels, one at a time of course given the current limitation) and combine the hypnograms on base of this probability index to yield in one final hypnogram? What do you think?

@raphaelvallat
Copy link
Owner

Thanks @umair-hassan — I think this is a great idea. It will be better than having to re-train a separate classifier for 2, 3, ... n EEG channels, both in terms of ease-of-implementation, maintenance of the algorithm and maybe even accuracy.

This should be pretty straightforward to do outside of YASA with the current implementation btw, but we could automatize this "majority voting" step within the SleepStaging class.

@umair-hassan
Copy link

@raphaelvallat Thankyou for your assertion. I would write a pull request for this soon if no one has been assigned this issue yet then.

@umair-hassan
Copy link

@raphaelvallat has this been completed? Otherwise I have time now to work on it!

@raphaelvallat
Copy link
Owner

Hi @umair-hassan,

Please do feel free to work on a PR. I appreciate it!

Thanks
Raphael

@Jhanyi
Copy link

Jhanyi commented Dec 8, 2024

Thanks for the great package :)

Reviving the question on K-complexes, are there consensus to say that K-complexes are simply N2 slow oscillations? while I do find some papers supporting this point, there are many others saying otherwise. There are also definitions for the KC waveform to be of complete reverse shape i.e. strong surface positive followed by strong surface negative) I have attached some screengrab from papers

GetImage (1)

image

Halasz1998_Hierarchy_of_micro_arousals_and_the_microstructure_of_sleep.pdf

GetImage

https://www.scientificbulletin.upb.ro/rev_docs_arhiva/full782_186975.pdf

of course they could easily be montage choices etc, but would be great if the detection could also take the reverse shaped waveform into accounrt. Happy to contribute of course

@remrama
Copy link
Collaborator

remrama commented Dec 8, 2024

I just copy/pasted the K-complex detection posts into a new Issue in #184 so that we can keep the conversation here limited to automatic sleep staging with extra EEG channels. 🤠

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🚧 New feature or request question 🙋 Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants