Demo Notebooks#
We provide a set of demo notebooks to get started with using CEBRA. To run the notebooks, you need a working Jupyter notebook server, a CEBRA installation, and the datasets required to run the notebooks, available on FigShare.

















The demo notebooks can also be found on GitHub.
Installation#
Before you can run these notebooks, you must have a working installation of CEBRA.
Please see the dedicated Installation Guide for information on installation options using conda
, pip
and docker
.
Synthetic Experiment Demo (CEBRA, piVAE, tSNE, UMAP):
This demo requires several additional packages that have differing
requirements to CEBRA. Therefore, we recommend using the supplied
docker
container or conda
cebra-full env.
Demo Data#
We host prepackaged data on figshare. And several of the demo notebooks have an automatic data download function.
If you don’t see the auto-download, and you use Google Colaboratory, you can easily add the following code into an early cell in the notebook to directly download and use:
#for google colab only, run this cell to download and extract data:
!wget --content-disposition https://figshare.com/ndownloader/files/36869049?private_link=60adb075234c2cc51fa3
!mkdir data
!tar -xvf "/content/data.tgz" -C "/content/data"
For different paths, you can specify the CEBRA_DATADIR=...
environment variable. You can do this by placing
import os; os.environ['CEBRA_DATADIR'] = "path/to/your/data"
at the
top of your notebook.
Contributing#
We welcome Demo notebooks from others! Please fork the repo, add your notebook, check that it works on Google Colaboratory (remove the launch button within your PR), and then open a PR! Please also edit the “gallery” list (see the soure code for this page), and finally, add an icon here, then a path to the icon here.
For reference, the original open-source data we used in Schneider, Lee, Mathis 2023 is available at:
Hippocampus dataset, using a preprocessing script.
Allen Institute Neuropixels dataset and 2P dataset.