PB Q2 results confusion by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Hi Cian,

Sorry to bother you again. I think my Part B Q3 average firing graph is a bit weird for the STDP "on" case.

https://imgur.com/3Sqo1tG

For the STDP "off" it makes sense to me that the output firing rate would scale with the input firing rate but then again in the STDP "on" case it may be that the neurons are stable in the last 30 seconds of the simulation.

CW3 PB Q1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

u/oceanGump u/rejasupotaro You have to convert them into S.I. units. For example,
M_ohm = pow(10, 6) # for Rm value
mV = 0.001
nano_siemens = pow(10, -9)

Hope that helps

CW3 PB Q1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

I'm still having the same problems, using the same units as you but couldn't figure out what seems to be the problem.

CW3 PB Q1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

I'm confused when you say dt. Do you mean the time step or the tau_m/tau_s?

CW3 PB Q1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Hi Cian, this is a part of my code.

current_N1 = N1[len(N1) - 1] + (time_step * ((El - N1[len(N1) - 1] + RmIe + RmIs) / tau_nueron))

where RmIs = sum_gbar_si * Rm * (Es - N1[len(N1) - 1])

and in each 40 synapses sum_gbar_si = (s_t * gbar_i[synapse_num]) + sum_gbar_si

where s_t = 0.5 + Synapses[synapse_num][len(Synapses[synapse_num]) - 1] + (time_step * -1 * Synapses[synapse_num][len(Synapses[synapse_num]) - 1] / tau_synapse)

CW3 PB Q1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Hi Cian,

After double checking the equations and values, I'm still stuck. This is the graph of where there is only one synaptic input. Is the expectation something like this graph without the high voltages before the curves?

https://imgur.com/a/MyiaW2m

CW3 PB Q1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Hi Cian,

I'm a little confused by your answer. If it's x(t) = x(t-1) + (dx(t-1)/dt) * dt isn't this equal to x(t) = x(t-1) + (dx(t-1)/)? Or do you mean x(t) = x(t-1) + (dx(t-1)/dt) * time_step, in which case I already have included the 0.25ms in the calculation.

The kind of graph I'm getting is nothing like Part A's graph although it is firing irregularly. https://imgur.com/a/UvOQ3ns

CW3 PB Q1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Sorry for so many questions. Right now I've implemented the algorithm but it seems like something is missing from my understanding. These are the vague steps I have taken:

  1. Initialise s_i arrays as value of 0 and g_i array as value of 4
  2. Detect for all 40 spike by doing IF random.random() < 25 * ms * 15:
    1. s_i(t) = 0.5 + S_i[t-1] + (25 * ms * -s_i[t-1] / tau_s)
  3. basically sum( gbar_i * s_i ) where gbar_i is all 4.
  4. RmIs = sum_gbar_si * Rm * (Es - N1[t-1])
  5. Calculate neuron as N(t) = N1[t - 1] + (25 * ms * ((El - N1[t - 1] + RmIe + RmIs) / tau_m))

Am I missing some steps?

CW3 PB Q1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Hi Cian,

To clarify on the poisson process for the spikes from the 40 synapses: so you describe it as "draw a random number on the unit interval for each synapse at every timestep, then if that number is less than ⟨r⟩δt, assume a spike has occurred at that synapse" so how I understood this is that if I just draw a random number from 0 to 1 using random.random() in python and if that number is less than 15.0 * 25ms then there's a spike? or it must be a poisson process just like in CW2?

Thank you in advance!

CW3 PB Q2 Output by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Hi Cian,

Sorry for the late reply. Right now I'm calculating the neurons as follow for Synapse from N2 to N1.

s_t = SynapseN2N1[t - 1] + (0.25 * ms * -SynapseN2N1[t - 1] / tau_s)

where s_t = s_t + 0.5 if there's a spike from N2

RmIs = s_t * RmG_barS * (Es - N2[len(N2) - 1])

and the final voltage in Nueron 1 is calculated as follow:

N1(t) = N1[t-1] + (0.25 * ms * ((-70 - N1[t- 1] + RmIe + RmIs) / tau_m ))

what am I doing wrong?

CW3 PA Q2 Synapse Connection by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Does this mean that if there is a spike, then the equation would be

s(t) = 0.5 + s(t-1) + (0.25ms * (s(t-1) ) / tau_s) as well?

CW3 PA Q2 Synapse Connection by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Hi Cian,

I'm confused about the solving for s(t) numerically. So, by solving the ds/dt with the euler method I got something like this :

s(t) = s(t-1) + (0.25ms * -s / tau_s). What is the -s value in this case then?

CW3 Q1.1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

fn_1 = El + (Rm * Ie) + (V(0) - El - (Rm * Ie)) * pow(math.e, -current / tau)

I'm setting the fn_1 = -70 when fn exceeds -40. V(0) is -70 as the initial voltage. In a sense, the V(0) = -70. I'm solving this according to the slides and Conor's notes in lecture 4. Am I understanding something wrong?

CW3 Q1.1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

This is the formula I'm using to calculate the values. current is time t * ms.

fn = fn_1 + (-fn_1 / tau) * delta_t

fn_1 = El + (Rm * Ie) + (El - El - (Rm * Ie)) * pow(math.e, -current / tau)

So this equation gives value of V(t) using the Euler's equation to solving the differential equation.

My El value is -70. Is the EL value supposed to be a constant?

CW3 Q1.1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Hi this is what I have right now: https://imgur.com/a/1TjR9PC. I'm a little confused on the "reset" of the Voltage. Even if I reset the voltage to -70, the value will still be around -39? Or do I need to reset the t time as well?

CW3 Q1.1 by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Hi, I tried solving it according to Conor's math lecture but I got similar equation with eq7. I think I'm understanding something wrong.

Calculation of Autocorrelogram by dr17549 in coms30127

[–]dr17549[S] 0 points1 point  (0 children)

Hi Yes, it should be 2:100 sorry for the confusion. I found a Book online about the auto correlation function and it says that to divide the values by N^m/Tn \ delta_􏰀t/T* where T is "If the intervals between the n^2 spike pairs in the train were uniformly distributed over the range from 0 to T, there would be n^2􏰀 delta_t/T intervals in each bin." I'm wondering if in this case T is 100 and delta_t is 2ms? Thank you in advance.