IBLBrainWideBenchMultiTaskBehavior#
- class pretrain.datasets.IBLBrainWideBenchMultiTaskBehavior(root, split, tasks, dirname='ibl_brain_wide_bench_2026', recording_ids=None, transform=None, normalize_behavior=True)[source]#
Bases:
core.dataset.IBLBrainWideBench2026Spikes aligned to several behavioral targets at once.
__getitem__returns a single dict rather than an(input, target)pair, since the model’sinput_fnemits the targets. Two samplings are offered:get_task_align_intervals()stacks one window per (task, trial), andget_trial_intervals()merges the regions where any task has data.- Parameters:
root (
str) – Directory holding the build.split (
Literal['train','val','test']) – Which pretrain split to read,trainorval.dirname (
str) – Name of the build directory underroot.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’sinput_fnamong them.tasks (
Union[Literal['choice','reward','stimulus_contrast','whisker_motion_energy','wheel_speed','right_paw_speed','left_paw_speed','licking_rate'],list[Literal['choice','reward','stimulus_contrast','whisker_motion_energy','wheel_speed','right_paw_speed','left_paw_speed','licking_rate']]]) – The TS1 tasks to align to, one or a list of them.normalize_behavior (
bool) – Whether to normalize the targets. Timestep-level signals are z-scored against the recording’s pretrain statistics,wheel_speedexcepted;licking_rateis 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)