Amazingly you find that these neurons can only fire a single spike, although they do so very reliably (maybe that’s why sloths are sloths you think to yourself).

- a) How many odors can this sloth discriminate?
- b) Sketch a diagram showing how to construct a network of neurons where each neuron is selective for one of the x odors the sloth can discriminate. Activity of those neurons should be the product of the firing rates of the inputs and the synaptic weights (vary between -1 (inhibition) and 1) with which they are connected; if that product is above some threshold the cell fires, if not it’s silent. Even with neurons that just fire a single spike, you should be able to find a set of synaptic weights where each downstream neuron fires uniquely for one of those x odors. How many layers does your network require to achieve your x different outputs?

Python is a powerful and flexible programming language, created by Guido van Rossum and named after the Monty Python comedy troupe. The core Python language is supplemented by various add-on "packages" that provide advanced functionality. We will be making extensive use of three packages here: Numpy, Scipy, and Matplotlib. The "modules" provided by these packages turn Python into a powerful scientific computing environment. Numpy provides access to things such as matrix operations and linear algebra. Scipy provides mathematical operations such as integration and also statistical tools. Matplotlib provides an environment for producing elegant plots.

To start off, let's import the Numpy package and the Matplotlib package (for plotting). Use the standard abbreviations 'np' and 'plt'.

In [1]:

```
# insert code here
```

In [2]:

```
# insert code here
```

In [3]:

```
# insert code here
```

Plot the data. One convenient way is to represent the data as boxplots.

In [4]:

```
# insert code here
```

In [5]:

```
# insert code here
```

If the sloth chooses odors based on the activity of one neuron at a time, and he discriminates odors using a thresholding mechanism, where should he place that threshold to most accurately discriminate for Neuron1 & Neuron2? Justify your answer by determining how often the sloth will mis-identify eucalyptus smell as fig (& vice versa) with different thresholds.

- e) Plot the frequency of mis-identifications a function of threshold for Neuron1 & Neuron2. Plot results using 5 different thresholds, including the one you think is 'optimal'.

In [6]:

```
# insert code here
```

In [7]:

```
# insert code here
```

- g) Plot the 2D response vector i.e. where both neurons contribute to the choice.

In [8]:

```
# insert code here
```

- h) How often will the sloth mis-identify the odors under these circumstances?

For this question think in terms of distance between individual points (i.e. individual trials) and the mean response. Use Pythagoras’ theorem to measure that distance for each point and see which mean response it is close to.

In [9]:

```
# insert code here
```

- i) Give an intuitive explanation for why discrimination accuracy is higher in the 2D situation.