Write a program that implements a neural representation of a scalar value $x$. For the neuron model, use a rectified linear neuron model ($a=max(J,0)$). Choose the maximum firing rates randomly (uniformly distributed between 100Hz and 200Hz at x=1), and choose the x-intercepts randomly (uniformly distributed between -0.95 and 0.95). Use those values to compute the corresponding $\alpha$ and $J^{bias}$ parameters for each neuron. The encoders $e$ are randomly chosen and are either +1 or -1 for each neuron. Go through the following steps:
Use the program you wrote in 1.1 to examine the sources of error in the representation.
Change the code to use the LIF neuron model:
$$ a_i = \begin{cases} {1 \over {\tau_{ref}-\tau_{RC}ln(1-{1 \over J})}} &\mbox{if } J>1 \\ 0 &\mbox{otherwise} \end{cases} $$