Homework 5 (100 pts)
This problem set is due Wednesday (11/2/2016) at 11:59pm. Please turn in your work by uploading to Canvas. f you have questions, please post them on the course forum, rather than emailing the course staff. This will allow other students with the same question to see the response and any ensuing discussion. The goal of this problem set is to review classification by performing “discrete decoding” of some neural data. You should submit both commented code and a write-up for this homework assignment.
Description of data set
The data (in file ReachData.npz
on Canvas) is in a struct array “r” of size 1127. Each
element in the array contains data on one trial. Time stamps for each spike in trial
i and neuron j are given in r(i).unit(j).spikeTimes (in ms relative to trial start). Other
relevant members of the structure for this homework assignment are: r(i).timeTouchHeld (the
time the reach target appears and movement planning nominally begins), r(i).timeGoCue (the time
the animal is cued to move and planning nominally ends), r(i).timeTargetAcquire (the time
movement ends). A big part of all three parts of this assignment will be writing code that
creates spike count vectors. These will be vectors of size , where is the total
number of neurons (i.e., 190). All of the classification will be on these vectors, and you
should combine across neurons by taking the product of probabilities (not by doing anything
that would collapse across neurons or mix their information). There are 8 different reach
targets (locations in the vector targets); the target index for each trial is in the vector
cfr
.
Questions
-
Plan data only vs movement data (30 pts)
Define two windows of spikes, the “plan window” encompassing spikes which were emitted between target onset and the go cue, and the “movement window” encompassing spikes which were emitted between the go cue and the time movement ends (note that both types of window are of different length for different trials). Randomly choose 50 trials per target to be a set of training data (400 trials total). The remaining trials will be used for testing (“test data”). We can describe the number of spikes that a neuron produces in each window (vector of neural counts as and , where , where is the number of neurons) using a wide variety of random process models. Use the training data to estimate the parameters of a target- direction-dependent vector Poisson process, i.e., . In other words, calculate a Poisson model for each neuron and class - the rate for a class will be a vector the size of the number of neurons. For each of remaining test trials estimate the maximum likelihood reach target (do it in log space!). What is the overall decoding accuracy (i.e., what fraction of trials are decoded correctly) using only the data in the plan window? Using only data in the movement window? Combining plan and movement data?
-
Amount of plan data (40 pts)
a. The plan periods in the data set are either 755 or 1005 ms. Consider decoding using less than the full plan period. Generate new models for plan periods of increasing size (50 ms to 750 ms in 50 ms increments, where all plan windows begin at the target onset time). Using maximum likelihood estimation, decode the reach target for the test data using these different sized windows of neural data. (Both train and test with these window sizes!) Plot the decoding accuracy as a function of the size of the decoding window. Briefly describe what you see. (20 pts)
b. Now, instead of using an increasing window size, use a constant 200 ms window, but slide the window start time from target onset (“0”) to 550 ms after target onset (use 50 ms steps). Generate new models for each window location and decode the reach target for the test data. Plot the decoding accuracy as a function of the temporal location of the decoding window. Briefly describe what you see. (20 pts)
-
Number of neurons (30 pts)
Using your model from (1), you decoded maximum likelihood targets using all 190 neurons. Now, perform a “neuron dropping analysis”. Starting with your full model, randomly eliminate neurons and evaluate decoding accuracy in the reduced data set. Eliminate between 20 and 180 neurons (by 20s – so decode using between 10 and 190 neurons in steps of 20) – average each point (number of neurons) by randomly choosing neurons to be dropped 20 times. Plot decoding accuracy as a function of the number of neurons available to the decoder. Briefly describe what you see?