IBLBrainWideBenchSingleTaskBehavior#

class pretrain.datasets.IBLBrainWideBenchSingleTaskBehavior(root, split, task, dirname='ibl_brain_wide_bench_2026', recording_ids=None, transform=None, normalize_behavior=True)[source]#

Bases: core.dataset.IBLBrainWideBench2026

Spikes aligned to one behavioral target.

__getitem__ returns an (input, target) pair, the target being task.

Parameters:
  • root (str) – Directory holding the build.

  • split (Literal['train', 'val', 'test']) – Which pretrain split to read, train or val.

  • dirname (str) – Name of the build directory under root.

  • recording_ids (Union[str, list[str], None]) – Recordings to load, or None for every pretrain recording.

  • transform (Optional[Any]) – Applied to each item, the model’s input_fn among them.

  • task (Literal['choice', 'reward', 'stimulus_contrast', 'whisker_motion_energy', 'wheel_speed', 'right_paw_speed', 'left_paw_speed', 'licking_rate']) – The TS1 task whose behavioral signal is the target.

  • normalize_behavior (bool) – Whether to normalize the target. Timestep-level signals are z-scored against the recording’s pretrain statistics, wheel_speed excepted; licking_rate is rounded into counts instead.

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)