Closed cyberfag closed 3 years ago
I added a print() in the staging.py and figured out that path is correct but there is just no such classifier that could use eeg+emg without eog. Deleting emg_name="EMG1" from yasa.SleepStaging() call solved the issue.
Hi @cyberfag,
Good catch -- I'll make sure to add a classifier for eeg+emg
in the next release to avoid such errors in the future.
Thanks! Raphael
Fixed in release 0.5.0.
Hi. I was trying to get the automatically extracted sleep stages, but, while executing sls.predict() command, Python (Jupyter Lab) returned the following error. I used an edf file loaded
via mne.io.read_raw_edf function(...preload=True...)
: 4 channels (2 EEG, 2 EMG) with the same sf (200 Hz), then I executedsls = yasa.SleepStaging(raw, eeg_name="EEG1", emg_name="EMG1")
which worked without errors for ~5 seconds, though the file is 26 hours long. I use the newest version of yasa (0.4.1), lightGBM (3.2.1) and antropy (0.1.4) are also installed. Seems like it cannot find the files containing pretrained classifiers. What could it be due to? Because manually I could find the files int the file system. Thanks in advance.