Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

AMATH 342

HW 3

Working together is encouraged. Please do not refer to previous yearssolutions.

Turn in a write-up of your solutions including discussion/analysis AND plots, neatly organized together with all code you wrote/used for the assignment. When the assignment says to compute” something, please make sure you print out or write down the value and show as part of your writeup. Full points require that writeup be legible, understandably explained, and reasonably organized .

Running the same code generate_noisy_data_cockroach.ipynb as in the first HW, you will be able to run an experiment giving you a 300 ms spike train in response to your input. Think of the input as the direction in which you have deflected a cockroach spine (analogous to a hair from the cricket cercal ganglion discussed in class), measured in degrees, and use values between 0 and 90. You can ask for as many trials as you like. The data will be in the variable spiketrain” and will consist of an array of trials, each of which has millisecond timebins which are either zero if there was no spike in that bin, or one if there was.

1.   Take one of your inputs to be 50, and study cell number 1. In this exercise, we will explore how discriminable two responses to stimuli close to 50 are, given the spiking output:  in particular, we will use maximum likelihood discrimination to distinguish responses to stimulus 50 and a stimulus close to 50 (specifically, 50+x). We will experiment by computing error probabilities under maximum likelihood discrimination for a few values of x.

(a) Start by plotting the normalized histograms, or distributions, of the spike counts, summed over the full trial, in response to 50 and in response to 50 + x, where you choose x.

Produce three histogram plots, each for a different value of x.  For each value of x, compute and report the error probability, using maximum likelihood discrimination between the stimulus 50 and the stimulus 50 + x.

To compute the error probabilites, you may either use a gaussian (normal) distribution fit to the distributions, or use a direct comparison of histogram” probabilities in each bin.

(b) How much higher does the closeby stimulus 50+x need to be to get an error probability of 10% (i.e., for what value of x is the error probability 10%)?

(c) Repeat (a,b) when the starting” input is 20 rather than 50?  Write two sentences describing if, how, and why your results differ.

Show all code and plots, and explain what you did in a few sentences for each problem part.

A hint / review:  to think about what this means, make sure you are taking the “organism’s point of  view:”  that is, you have only the summed spike count that occurred over a single trial, and you must make an inference as to whether one stimulus (“50”) vs another (“50+x”) occurred.

2.   Can you change the tuning curve for cell number 1 so that the neural system gives a more discriminable response near the input value 20:  meaning that, the stimuli 20 and 20+x can be distinguished with 10% error probability for a smaller value of x?  To do this, edit the tuning curve at the top of the file generate_noisy_data_cockroach.ipynb.  Demonstrate your findings with (generated) data, and give a complete description in a paragraph of what you did and why it worked.