raphaelvallat/yasa

how to classify apnea?

TTyb opened this issue · 2 comments

TTyb commented

I have a batch of edf data,
which includes Airflow, Resp Chest, Resp Abdomen, and SaO2 SpO2 annotations as x,
and central apnea, mixed apnea, obstructive apnea, and central hyporespiration are used as labels.
I want to classify them. It's kind of like sleep staging,
how to use yasa for feature extraction and multiple classification?
Thank you

labels is :

start_time = np.around(raw.annotations.onset, decimals=3)
annotation_name = raw.annotations.description
duration_time = raw.annotations.duration

print(start_time)
print(annotation_name)
print(duration_time)

X is:
image

If you need the sample of edf data, can use mne. Datasets. Testing. Data_path () to get test edf,

Hi,

I am afraid this is too complicated of a question for a simple and straightforward answer. Sleep apnea classification is something that I've worked on in the past and it's really not that easy. Re-using the features from the sleep staging algorithm will not work, and you will need to manually craft features from the SpO2 signal, respiration and ECG signals.

There are a few peer-reviewed scientific articles on the topic, which you can find on Google Scholar. I suggest you have a look at those and try to re-implement some of their step, including features calculation and machine-learning classification.

Thanks,
Raphael

TTyb commented