neuralset¶
neuralset
neuralset turns raw neural recordings and stimuli into PyTorch-ready datasets. Define a study, load events into a flat DataFrame, apply transforms, extract features with configurable extractors, and segment everything into batches — all lazy, typed with pydantic, and cacheable.
pip install neuralset
The base package includes the full pipeline — events, transforms, extractors,
segmenters, and dataloaders. Some extractors require optional dependencies
(e.g., transformers, torchaudio) which can be installed individually
or all at once:
pip install 'neuralset[all]'
To access the curated catalog of public brain datasets, also install neuralfetch:
pip install neuralfetch
Quickstart¶
From study to PyTorch batch — pick an example to see the code.
Load study data, configure extractors & segment
Tutorials¶
Each tutorial walks through one building block of the pipeline.
↓
↓
↓
↓
Segmenter & Dataset
Create time-locked segments and iterate with a PyTorch DataLoader.
segmenter = ns.dataloader.Segmenter(
start=-0.1, duration=0.5,
trigger_query='type=="Word"',
extractors=dict(meg=meg),
drop_incomplete=True)
dataset = segmenter.apply(events)
loader = DataLoader(dataset, batch_size=8,
collate_fn=dataset.collate_fn)
↓