Skip to content

Datasets ​

livn provides curated datasets hosted on Hugging Face for training and evaluation. Each dataset consists of simulation recordings from a predefined system, capturing spike times, voltage traces, and membrane currents under varying stimulation conditions.

Available datasets ​

Each data sample consists of a 5-second simulation under varying feature inputs.

SystemNeurons (exc./inh.)Train samplesTest samples
S110 (8/2)50,0001,000
S2100 (80/20)50,0001,000
S31,000 (800/200)5,000100
S410,000 (8,000/2,000)50050

Loading a dataset ​

python
from datasets import load_dataset

dataset = load_dataset("livn-org/livn", name="S2")
sample = dataset["train"][0]

# Each sample contains:
# - trial_it: spike neuron IDs per trial
# - trial_t: spike times per trial
# - trial_iv: voltage recording neuron IDs per trial
# - trial_vv: voltage traces per trial

Observing data through an IO device ​

The raw dataset contains neuron-level recordings identified by neuron IDs (GIDs). To observe the data as it would appear in a real experiment, apply an IO transformation:

python
from livn.io import MEA

mea = MEA.from_directory("./systems/graphs/S2")
cit, ct = mea.channel_recording(system.neuron_coordinates, it, t)

# cit and ct are dicts mapping channel_id -> recorded spikes
print("Spikes at channel 0:", ct[0])

See the Using the Dataset example for a complete walkthrough.

Generating your own datasets ​

For advanced users who want to generate datasets with custom systems, models, or stimulation protocols, see the Generating Datasets guide.

Released under the MIT License.