Homework #1: Neural Encoding and Decoding
Due Date: Friday, April 22, 2011 (midnight)
 
Submission Procedure:
Create a Zip file called "528-hw2-lastname-firstname" containing the following:
(1) Document containing your answers to any questions asked in each exercise, 
     as well as any figures, plots, or graphs supporting your answers,
(2) Your Matlab program files,
(3) Any other supporting material needed to understand/run your solutions in Matlab.
 
Upload your Zip file to this dropbox.
 
Upload your file by 11:59pm Friday, April 22, 2011. 
Late submission policy is here.
 
 
This homework is based on the list of exercises for Chapters 1 and 2 in the Dayan and Abbott book that can 
be downloaded from: http://www.gatsby.ucl.ac.uk/~dayan/book/exercises.html 
 
Download the exercises for Chaps. 1 and 2 from the link above, and solve the 5 problems below using Matlab. 
 
1.  (20 points) Exercise #1 in Chapter 1 (Read page 30 of the text for ideas)
2.  (20 points) Exercise #8 in Chapter 1 (Meet the eminent H1 neuron in the fly!)
3.  (20 points) Exercise #9 in Chapter 1 (Get to know the H1 neuron)

4.  (20 points) (Imitate the H1 neuron!) Set aside the last 20% of the data you used in Exercise 2 above as “test data” and recompute the spike-triggered average for the rest of the data (the “training data”). Construct a linear kernel from this average and use it in Equation 2.1 to construct a model of the response of the H1 neuron. Choose r0 so that the average firing rate predicted by the model in response to the stimulus used for the training data matches the actual average firing rate. Use a Poisson generator to generate a synthetic spike train from the linear estimate of the firing rate in response to the stimulus in the test data. Plot examples of the actual and synthetic spike trains for portions of the test data stimulus. How well does your model predict the arrival times of spikes? Try to quantify the overall performance of your model on the test data.

5.  (20 points) Compute the covariance matrix and its eigenmodes for the fly data 
     in Exercise 2 above and make a scatter plot of the projections of the spike-triggered 
     stimuli onto the two leading eigenmodes.  Find the threshold (nonlinear decision) functions 
     as defined in class, both with respect to the two leading eigenmodes separately, and
      jointly, i.e., the two-dimensional threshold function.  Can the two-dimensional distribution 
     of projections be approximated by the product of the one-dimensional distributions 
     (i.e. do the two features contribute independently?). 
     Suggested background reading: Lecture slides and the paper by Arcas, Fairhall, 
     and Bialek on the class website: 
     http://www.cs.washington.edu/education/courses/528/11sp/AgueraFairhallBialek2001.pdf 
      For this problem, assume all spikes are “isolated” (in the terminology of the paper) 
     and use all spikes for your analysis.