Decodanda
Best practices made easy for decoding and geometrical analysis of neural activity.
Decoding neural activity is a standard practice in neuroscience, often used to claim that a particular population represents a specific variable. Unfortunately, decoding has many pitfalls that, if not avoided carefully, can lead to false negative or, even worse, false positive results.
In the last few years, I had the privilege to work in collaboration with several experimental laboratories, which led me to apply decoding-related methods to dozens of experimental data sets from a wide variety of recording techniques, species, and tasks.
Decodanda is the result of this accumulated experience in combination with the precious interaction with my colleagues and mentors at the Center for Theoretical Neuroscience at Columbia University.
Decodanda (dog-Latin for βto be decodedβ, as in β[this] data decodanda estβ) is a Python package designed to expose a user-friendly and flexible interface for population activity decoding, avoiding the most common pitfalls by a series of built-in best practices. For example:
Cross-validation is automatically implemented using a default or specified trial structure
All analyses come with a built-in null model to test the significance of the data performance (notebook)
Multi-sessions pooling to create pseudo-populations is supported out of the box (notebook)
The individual contributions of multiple correlated experimental variables are isolated by cross-variable data balancing, avoding the confounding effects of correlated variables (notebook)
In addition, Decodanda exposes a series of functions to compute the Cross-Condition Generalization Performance (CCGP, Bernardi et al. 2020) for the geometrical analysis of neural population activity (notebook).
Please refer to the notebooks linked below for some examples and use cases.
For a guided explanation of some of the best practices implemented by Decodanda, you can refer to my teaching material for the Advanced Theory Course in Neuroscience at Columbia University.
Have fun, drink water, and decode safely!
-
Null model for decoding performance
All analyses in Decodanda come with a built-in null model to test the significance of the data performance.
-
Decoding in time
Decodanda implements a balanced, cross-validated decoding with a slding time window as a function of time from a given onset.
-
Balancing out correlated variables
When two variables are very correlated (e.g. stimulus and action in a trained subject) it is hard to disentangle their individual contributions to the neural code. Decodanda does that by cross-variable condition balacing.
-
CCGP and geometrical investigation of population coding
Decodanda exposes a series of function to compute the cross-condition generalization performance (CCGP) to reveal the geometrical properties of population coding.