IBLBrainWideBenchTS1#
- class ts1.IBLBrainWideBenchTS1(root, split, task, recording_id, dirname='ibl_brain_wide_bench_2026', transform=None, normalize_behavior=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).task (
Literal['choice','reward','stimulus_contrast','whisker_motion_energy','wheel_speed','right_paw_speed','left_paw_speed','licking_rate']) – The task to include in the dataset. One task at a time.recording_id (
str) – The recording id to include in the dataset.dirname (
str) – The name of the dataset (and the directory containing its data).transform (
Optional[Any]) – The transform(s) to apply to the data.normalize_behavior (
bool) – Whether to normalize the behavior data. This should be set to True unless the user wants to use custom target preprocessing.context_length (
float) – Total sampled window size in seconds (preceding context plus the fixed 1s target). Defaults to 1.0 (no extra context).
- classmethod get_ts1_supported_tasks(target_resolution=None)[source]#
Returns the tasks the benchmark supports, as the string values of TS1Task.
- Parameters:
target_resolution (
Optional[TargetResolution]) – If given, keep only the tasks with this target resolution.- Returns:
The supported tasks.
- Return type:
list[TS1Task]
Example
>>> tasks = IBLBrainWideBenchTS1.get_ts1_supported_tasks() >>> print(tasks) ['choice', ...]
- 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 = IBLBrainWideBenchTS1(...) >>> data = dataset.get_recording(...) >>> data = dataset.dataset_transform(data) >>> slice = data.slice(0.5, 1.5) >>> slice = dataset.dataset_transform(slice)