Experiments#

All experiments are inherited from the base class. Therefore, after initializing the corresponding experiment, you can start it by simply calling the run function.

Experiment.run(dataset: BaseDataset, transforms: Transforms | None = None, dataset_name: str | None = None, desc: str | None = None) dict[source]#

Train models separately for each subject.

This function will internally call the _run_sub function for each subject, and save the final results together.

Parameters:
  • dataset (EEG Data or Dataset) – The dataset used for the experimental test.

  • transforms (Transforms, optional) – Apply pre-transforms on dataset. Transformations will be apply during the experiment on each subject’s dataset. The rationable behind this method lies in deferring data manipulation, especially for certain transformations that could potentially enlarge the dataset’s memory footprint. This delay allows for the execution of data manipulation after subject-independent experiment have concatenated the relevant data (Time for Space) or the experiment subject are ready, mitigating the risk of memory overflow.

  • dataset_name (str, optional) – The dataset name to use. If None, The default name of the dataset will be used as the folder to save experimental results.

  • desc (str, optional) – Add a short description to the current experiment.

Return type:

Return a dict of all subjects and corresponding experimental results.

Classification Experiments#

HoldOut

Holdout cross validation experiment.

KFold

K-Fold cross validation experiment.

LOSO_HoldOut

Leave-One-Subject-Out Holdout cross validation experiment.

LOSO_KFold

Leave-One-Subject-Out K-Fold cross validation experiment.