IBLBrainWideBenchTS2#
- class ts2.IBLBrainWideBenchTS2(root, split, recording_id, dirname='ibl_brain_wide_bench_2026', transform=None, task=None, mask_token=nan, mask_input=True, context_length=1.0)[source]#
Bases:
core.dataset.VariableContextMixin,core.dataset.IBLBrainWideBench2026Dataset for the IBL BrainWideBench benchmark.
- Parameters:
root (
str) – The root directory of the dataset.split (
Literal['train','val','test']) – The split of the dataset (train, val, test).dirname (
str) – The name of the dataset (and the directory containing its data).recording_ids – The recording ids to include in the dataset. If None, all recordings in the dataset related to the regime are included.
transform (
Optional[Any]) – The transform(s) to apply to the data.task (
Optional[Literal['co_smoothing','forecasting']]) – The task to include in the dataset.mask_token (
float) – Placeholder value for masked entries, for models that need one.mask_input (
bool) – Whether the held-out spikes are removed from the model input. Only honored onval: False leaks the held-out activity into the input, for models that cannot take a corrupted one (AEs).context_length (
float) – Total sampled window size in seconds (preceding context plus the fixed 1s target). Defaults to 1.0 (no extra context).
- dataset_transform(data)[source]#
Defines dataset-level transformations that are applied to all recordings in the Dataset.
This method can be applied on an entire recording or a single slice.
- Parameters:
data (
Data) – The Data object to apply the transformations to.- Return type:
Data- Returns:
The Data object with the transformations applied.
Example
>>> dataset = IBLBrainWideBench2026(...) >>> data = dataset.get_recording(...) >>> data = dataset.dataset_transform(data) >>> slice = data.slice(0.5, 1.5) >>> slice = dataset.dataset_transform(slice)