pyhealth.datasets.SampleSignalDataset#

This class the takes a list of samples as input (either from BaseSignalDataset.set_task() or user-provided json input), and provides a uniform interface for accessing the samples.

class pyhealth.datasets.SampleSignalDataset(samples, dataset_name='', task_name='')[source]#

Bases: SampleBaseDataset

Sample signal dataset class.

This class the takes a list of samples as input (either from BaseDataset.set_task() or user-provided input), and provides a uniform interface for accessing the samples.

Parameters:
  • samples (List[Dict]) – a list of samples, each sample is a dict with patient_id, record_id, and other task-specific attributes as key.

  • classes – a list of classes, e.g., [“W”, “1”, “2”, “3”, “R”].

  • dataset_name – the name of the dataset. Default is None.

  • task_name – the name of the task. Default is None.

stat()[source]#

Returns some statistics of the task-specific dataset.

Return type:

str