pyhealth.tasks.sleep_staging_v2#

class pyhealth.tasks.sleep_staging_v2.SleepStagingSleepEDF(chunk_duration=30.0)[source]#

Bases: BaseTask

Multi-class classification task for sleep staging on Sleep EDF dataset.

This task predicts sleep stages (Awake, REM, N1, N2, N3, N4) based on multichannel EEG signals. The task is defined as a multi-class classification.

task_name#

The name of the task, set to “SleepStaging”.

Type:

str

input_schema#

The input schema specifying the required input format. Contains: - “signal”: “tensor”

Type:

Dict[str, str]

output_schema#

The output schema specifying the output format. Contains: - “label”: “multiclass”

Type:

Dict[str, str]

task_name: str = 'SleepStaging'#
input_schema: Dict[str, str] = {'signal': 'tensor'}#
output_schema: Dict[str, str] = {'label': 'multiclass'}#
pre_filter(df)#
Return type:

LazyFrame