代写18-698 / 42-632 Neural Signal Processing Spring 2025 Problem Set 2帮做Matlab编程

18-698 / 42-632

Neural Signal Processing

Spring 2025

Problem Set 2

This problem set is due on Tuesday, February 25, 11:59pm.

Be sure to show your work and include all Matlab code and plots. Also, please carefully label the plot axes with units.

If you have questions, please post them on the Piazza Q&A webpage, rather than emailing the course staff. This will allow other students with the same question to see the response and any ensuing discussion.

Please submit your work as a single PDF file on Gradescope, which is linked from Canvas. When preparing your solutions, please complete each problem on a separate page. Grade-scope will ask you select the pages that contain the solution to each problem.

Submissions can be written in LaTeX or they can be handwritten and scanned. Handwritten work should be clearly labeled and legible.

1. Please justify each answer below with a short mathematical explanation.

(a) (5 points) For a homogeneous Poisson process,

i. Are the inter-spike intervals (t1, t2, . . .) independent?

ii. Are the spike times (T1, T2, . . .) independent?

iii. Are the inter-spike intervals (t1, t2, . . .) independent given that N spikes were observed in [0, T ]?

iv. Are the spike times (T1, T2, . . .) independent given that N spikes were ob-served in [0, T ]?

(b) (10 points) For an inhomogeneous Poisson process,

i. Are the inter-spike intervals (t1, t2, . . .) independent?

ii. Are the spike times (T1, T2, . . .) independent?

iii. Are the inter-spike intervals (t1, t2, . . .) independent given that N spikes were observed in [0, T ]?

iv. Are the spike times (T1, T2, . . .) independent given that N spikes were ob-served in [0, T ]?

2. Homogeneous Poisson process

We will consider a simulated neuron that has a cosine tuning curve described in equa-tion (1.15) in TN:

                             (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 = 30, rmax = 50, and smax = π/2.

(a) (5 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.

(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) (5 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 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) (5 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) (5 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. 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.

                          (2)

where t ranges between 0 and 1 second.

(a) (5 points) Spike trains

Generate 100 spike trains, each 1 second in duration, according to an inhomoge-neous 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 (1) and (2) on the same plot. Does the spike histogram agree with the expected firing rate profile?

(c) (5 points) Count distribution

For each trial, count the number of spikes across the entire trial. Plot the nor-malized 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. Real neural data

We will analyze real neural data recorded using a 100-electrode array in premotor cortex of a macaque monkey. The dataset can be found on Canvas under “Files → Data sets → ps2 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 respectively. The reaching angles are not evenly spaced around the circle due to experimental constraints that are beyond the scope of this problem set.

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) (5 points) Spike trains

Plot 5 spike trains for each reaching angle in the same format as shown in Fig-ure 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 8 resulting spike histograms around a circle, as in part (a).

(c) (5 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.

Then, fit the cosine tuning curve (1) to the 8 red points by minimizing the sum of squared errors

with respect to the parameters r0, rmax, and smax. (Hint: this can be done using linear regression.) Plot the resulting tuning curve of this neuron in green on the same plot.

(d) (5 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) (5 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?





热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图