EE239AS.2, Homework #3

$30.00

Category: Tags: , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (3 votes)

1. (13 points) You are recording the activity of a neuron, which is spiking according to a Poisson
process with rate λ. At some point during your experiment, the recording equipment breaks
down and begins dropping spikes randomly with probability p.
(a) (10 points) Let the random variable M be the number of recorded spikes with the broken
equipment. Show that the distribution of M is Poisson((1 − p)λs). (Hint: If N is a
random variable denoting the number of actual spikes, what is Pr(M = m|N = n)?)
(b) (1 points) What is the rate of the Poisson process in part (a)?
(c) (2 points) What is the distribution on the number of spikes dropped within a τ second
interval?
2. (35 points) Homogeneous Poisson process
We will consider a simulated neuron that has a cosine tuning curve described in equation
(1.15) in TN 1
:
λ(s) = r0 + (rmax − r0) cos(s − smax), (1)
where λ is the firing rate (in spikes per second), s is the reaching angle of the arm, smax is
the reaching angle associated with the maximum response rmax, and r0 is an offset that shifts
the tuning curve up from the zero axis. Let r0 = 35, rmax = 60, and smax = π/2.
(a) (6 points) Spike trains
For each of the following reaching angles (s = k · π/4, where k = 0, 1, . . . , 7), generate
100 spike trains according to a homogeneous Poisson process. Each spike train should
have a duration of 1 second. Plot 5 spike trains for each reaching angle in the same
format as shown in Figure 1.6(A) in TN. (To do this, make a subplot of dimension
5 × 3 and populate the appropriate subplots) (To further simplify things, we have also
provided the helper function PlotSpikeRaster.m; this will likelys simplify your raster
plotting.)
(b) (5 points) Spike histogram
For each reaching angle, find the spike histogram by taking spike counts in non-overlapping
20 ms bins, then averaging across the 100 trials. Plot the 8 resulting spike histograms
around a circle, as in part (a). The spike histograms should have firing rate (in spikes
/ second) as the vertical axis and time (in msec, not time bin index) as the horizontal
axis. The bar command in Matlab can be used to plot histograms.
(c) (4 points) Tuning curve
For each trial, count the number of spikes across the entire trial. Plots these points on
1TN refers to Theoretical Neuroscience by Dayan and Abbott.
1
the axes like shown in Figure 1.6(B) in TN, where the x-axis is reach angle and the
y-axis is firing rate. There should be 800 points in the plot (but some points may be on
top of each other due to the discrete nature of spike counts). For each reaching angle,
find the mean firing rate across the 100 trials, and plot the mean firing rate using a red
point on the same plot. Now, plot the tuning curve (defined in (1)) of this neuron in
green on the same plot. Do the mean firing rates lie near the tuning curve?
(d) (6 points) Count distribution
For each reaching angle, plot the normalized distribution (i.e., normalized so that the
area under the distribution equals one) of spike counts (using the same counts from
part (c)). Plot the 8 distributions around a circle, as in part (a). Fit a Poisson distribution to each empirical distribution and plot it on top of the corresponding empirical
distribution. Are the empirical distributions well-fit by Poisson distributions?
(e) (4 points) Fano factor
For each reaching angle, find the mean and variance of the spike counts across the 100
trials (using the same spike counts from part (c)). Plot the obtained mean and variance
on the axes shown in Figure 1.14(A) in TN. There should be 8 points in this plot – one
per reaching angle. Do these points lie near the 45 deg diagonal, as would be expected
of a Poisson distribution?
(f) (5 points) Interspike interval (ISI) distribution
For each reaching angle, plot the normalized distribution of ISIs. Plot the 8 distributions around a circle, as in part (a). Fit an exponential distribution to each empirical
distribution and plot it on top of the corresponding empirical distribution. Are the
empirical distributions well-fit by exponential distributions?
(g) (5 points) Coefficient of variation (CV )
For each reaching angle, find the average ISI and CV of the ISIs. Plot the resulting
values on the axes shown in Figure 1.16 in TN. There should be 8 points in this plot.
Do the CV values lie near unity, as would be expected of a Poisson process?
3. (22 points) Inhomogeneous Poisson process
In this problem, we will use the same simulated neuron as in Problem 2, but now the reaching
angle s will be time-dependent with the following form:
s(t) = t
2
· π, (2)
where t ranges between 0 and 1 second.
(a) (6 points) Spike trains
Generate 100 spike trains, each 1 second in duration, according to an inhomogeneous
Poisson process with a firing rate profile defined by (1) and (2). Plot 5 of the generated
spike trains.
(b) (5 points) Spike histogram
Plot the spike histogram by taking spike counts in non-overlapping 20 ms bins, then
averaging across the 100 trials. The spike histogram should have firing rate (in spikes
/ second) as the vertical axis and time (in msec, not time bin index) as the horizontal
axis. Plot the expected firing rate profile defined by equations (1) and (2) on the same
plot. Does the spike histogram agree with the expected firing rate profile?
2
(c) (6 points) Count distribution
For each trial, count the number of spikes across the entire trial. Plot the normalized
distribution of spike counts. Fit a Poisson distribution to this empirical distribution
and plot it on top of the empirical distribution. Should we expect the spike counts to
be Poisson-distributed?
(d) (5 points) ISI distribution
Plot the normalized distribution of ISIs. Fit an exponential distribution to the empirical
distribution and plot it on top of the empirical distribution. Should we expect the ISIs
to be exponentially-distributed?
4. (30 points) Real neural data
We will analyze real neural data recorded using a 100-electrode array in premotor cortex of
a macaque monkey2
. The dataset can be found on CCLE as ‘ps3 data.mat’.
The following describes the data format. The .mat file has a single variable named trial,
which is a structure of dimensions (182 trials) × (8 reaching angles). The structure contains
spike trains recorded from a single neuron while the monkey reached 182 times along each of 8
different reaching angles (where the trials of different reaching angles were interleaved). The
spike train for the nth trial of the kth reaching angle is contained in trial(n,k).spikes,
where n = 1, . . . , 182 and k = 1, . . . , 8. The indices k = 1, . . . , 8 correspond to reaching
angles 30
180π,
70
180π,
110
180π,
150
180π,
190
180π,
230
180π,
310
180π,
350
180π, respectively. The reaching angles are
not evenly spaced around the circle due to experimental constraints that are beyond the
scope of this homework.
A spike train is represented as a sequence of zeros and ones, where time is discretized in 1 ms
steps. A zero indicates that the neuron did not spike in the 1 ms bin, whereas a one indicates
that the neuron spiked once in the 1 ms bin. Due to the refractory period, it is not possible
for a neuron to spike more than once within a 1 ms bin. Each spike train is 500 ms long and
is, thus, represented by a 1 × 500 vector.
(a) (6 points) Spike trains
Plot 5 spike trains for each reaching angle in the same format as shown in Figure 1.6(A)
in TN.
(b) (5 points) Spike histogram
For each reaching angle, find the spike histogram by taking spike counts in non-overlapping
20 ms bins, then averaging across the 182 trials. The spike histograms should have firing
rate (in spikes / second) as the vertical axis and time (in msec, not time bin index) as
the horizontal axis. Plot the histogram for 500ms worth of data. Plot the 8 resulting
spike histograms around a circle, as in part (a).
(c) (4 points) Tuning curve
For each trial, count the number of spikes across the entire trial. Plots these points on
the axes shown in Figure 1.6(B) in TN. There should be 182 · 8 points in the plot (but
some points may be on top of each other due to the discrete nature of spike counts).
For each reaching angle, find the mean firing rate across the 182 trials, and plot the
mean firing rate using a red point on the same plot.
2The neural data have been generously provided by the laboratory of Prof. Krishna Shenoy at Stanford
University. The data are to be used exclusively for educational purposes in this course.
3
Then, fit the cosine tuning curve (1) to the 8 red points by minimizing the sum of
squared errors
X
8
i=1

λ(si) − r0 − (rmax − r0) cos(si − smax)
2
with respect to the parameters r0, rmax, and smax. (Hint: this can be done using linear
regression; refer to Homework # 2.) Plot the resulting tuning curve of this neuron in
green on the same plot.
(d) (6 points) Count distribution
For each reaching angle, plot the normalized distribution of spike counts (using the
same counts from part (c)). Plot the 8 distributions around a circle, as in part (a). Fit
a Poisson distribution to each empirical distribution and plot it on top of the corresponding empirical distribution. Why might the empirical distributions differ from the
idealized Poisson distributions?
(e) (4 points) Fano factor
For each reaching angle, find the mean and variance of the spike counts across the 182
trials (using the same spike counts from part (c)). Plot the obtained mean and variance
on the axes shown in Figure 1.14(A) in TN. There should be 8 points in this plot – one
per reaching angle. Do these points lie near the 45 deg diagonal, as would be expected
of a Poisson distribution?
(f) (5 points) Interspike interval (ISI) distribution
For each reaching angle, plot the normalized distribution of ISIs. Plot the 8 distributions around a circle, as in part (a). Fit an exponential distribution to each empirical
distribution and plot it on top of the corresponding empirical distribution. Why might
the empirical distributions differ from the idealized exponential distributions?