braindecode.samplers.SequenceSampler

class braindecode.samplers.SequenceSampler(metadata, n_windows, n_windows_stride, random_state=None)

Sample sequences of consecutive windows.

Parameters
metadatapd.DataFrame

See RecordingSampler.

n_windowsint

Number of consecutive windows in a sequence.

n_windows_strideint

Number of windows between two consecutive sequences.

random_statenp.random.RandomState | int | None

Random state.

Attributes
infopd.DataFrame

See RecordingSampler.

file_idsnp.ndarray of ints

Array of shape (n_sequences,) that indicates from which file each sequence comes from. Useful e.g. to do self-ensembling.

Examples using braindecode.samplers.SequenceSampler