Distribution Alignment Decoder (DAD)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
code
data
images
.DS_Store
.gitignore
README.md
script_runDAD.m
script_runDAD_comparewithsup.m

README.md

Distribution Alignment Decoder (DAD)

This repo contains code to run the Distribution Alignment Decoder (DAD) method described in this paper.

Dyer, E. L., Azar, M. G., Perich, M. G., Fernandes, H. L., Naufel, S., Miller, L. E., & Körding, K. P. (2017). A cryptography-based approach for movement decoding. Nature Biomedical Engineering, 1(12), 967. doi:10.1038/s41551-017-0169-7

If you use any of the datasets and/or code in this repository, please cite this paper. If you have questions, please contact evaLdyer{at}gmail{dot}com.


Overview

The main idea behind DAD is to decode movement kinematics from a neural dataset consisting of the firing rates of d neurons at N points in time. Typically, the number of time points exceeds the number of neurons.

DAD takes a neural dataset Y as its input, along with a target kinematics dataset X to align Y to. In our implementation, we assume X is a Tx2 matrix and Y is a Nxd matrix, where N and T are not assumed to be equal.


What's here...

  • code
    • main. this folder contains the main codes and helper tools needed to run DAD.
    • supdecoder. this folder contains code to implement a supervised decoder trained via 10-fold cross-validation to fit the regularization parameter in the supervised case.
    • utils. this folder contains helper functions (i.e., compute R2 scores, plot data, bin and split neural datasets).

Running DAD on data from Subject M ...

  1. To run this demo, you will need the Statistics toolbox in Matlab. If you don't have this toolbox, skip ahead to run the next demo on data collected from Subject C.
  2. In Matlab, add all of the folders in this repo to your path and then run our demo:
script_runDAD

This script will run DAD on data collected from Subject M and visualize the results.

Running DAD on data from Subject C ...

  1. Our alignment approach can be used with a variety of dimensionality reduction methods. To run this demo, you will need to download Laurens van der Maaten's dimensionality reduction toolbox. If you have difficulties running the mex files in the dimensionality reduction toolbox, please see the Section entitled "Pitfalls" in the Readme.txt in the drtoolbox.
  2. After downloading the dimensionality reduction toolbox, in Matlab, include all of the folders in this repo to your path and then run our demo:
script_runDAD_comparewithsup

This script will run DAD, the oracle decoder, linear supervised method, and a Kalman filter on data collected from Subject C. The output will be a figure which shows the final decoded outputs obtained by all the approaches and also plots the decoding (moment-by-moment) and target prediction accuracy of each method.

Running DAD on additional datasets...

  1. To run the other scripts and examples in this repository, you will need to download the data here. Once you download and unzip this folder, put both of the folders (data and parameter_matfiles) in the /data folder.