API Reference¶
This is the reference for classes (CamelCase
names) and functions
(underscore_case
names) of Braindecode.
Classifier¶
braindecode.classifier
:
|
Classifier that does not assume softmax activation. |
Regressor¶
braindecode.regressor
:
|
Regressor that calls loss function directly. |
Models¶
braindecode.models
:
|
Shallow ConvNet model from [R9432a19f6121-2]. |
|
Deep ConvNet model from [Rb8ef6c2733ce-1]. |
|
EEGNet model from [Rcbe3da2652d4-EEGNet]. |
|
EEGNet v4 model from [Rbd7837e27d7f-EEGNet4]. |
|
Hybrid ConvNet model from [R4d1af390a17e-3]. |
|
Residual Network for EEG. |
|
Temporal Convolutional Network (TCN) as described in [Rcfca6ae7a220-1]. Code adapted from https://github.com/locuslab/TCN/blob/master/TCN/tcn.py Parameters ———- n_in_chans: int number of input EEG channels n_outputs: int number of outputs of the decoding task (for example number of classes in classification) n_filters: int number of output filters of each convolution n_blocks: int number of temporal blocks in the network kernel_size: int kernel size of the convolutions drop_prob: float dropout probability add_log_softmax: bool whether to add a log softmax layer References ———- .. [Rcfca6ae7a220-1] Bai, S., Kolter, J. Z., & Koltun, V. (2018). An empirical evaluation of generic convolutional and recurrent networks for sequence modeling. arXiv preprint arXiv:1803.01271. |
Training¶
braindecode.training
:
|
Compute Loss after averaging predictions across time. |
|
Class to compute scores for trials from a model that predicts (super)crops. |
|
Epoch Scoring class that recomputes predictions after the epoch on the training in validation mode. |
|
Assigning window predictions to trials while removing duplicate predictions. |
Datasets¶
braindecode.datasets
:
|
A base dataset holds a mne.Raw, and a pandas.DataFrame with additional description, such as subject_id, session_id, run_id, or age or gender of subjects. |
|
A base class for concatenated datasets. |
|
Applies a windower to a base dataset. |
|
A class for moabb datasets. |
Data Utils¶
braindecode.datautil
:
|
Create a BaseConcatDataset of WindowsDatasets from X and y to be used for decoding with skorch and braindecode, where X is a list of pre-cut trials and y are corresponding targets. |
|
Create WindowsDatasets from mne.RawArrays |
|
Create WindowsDatasets from mne.Epochs |
|
Windower that creates sliding windows. |
|
Create windows based on events in mne.Raw. |
|
Perform exponential moving demeanining. |
|
Perform exponential moving standardization. |
|
Zscore normalize continuous or windowed data in-place. |
|
Scale continuous or windowed data in-place |
|
Applies multiple bandpass filters to the signals in raw. |
|
Save a BaseConcatDataset of BaseDatasets or WindowsDatasets to files |
|
Load a stored BaseConcatDataset of BaseDatasets or WindowsDatasets from files |
Utils¶
braindecode.util
:
|
Set seeds for python random module numpy.random and torch. |