fixed initial condition of IF models

This commit is contained in:
Jan Benda 2017-02-01 15:32:05 +01:00
parent 768d5bb7e6
commit 24bcd70864
11 changed files with 24 additions and 19 deletions

View File

@ -1,5 +1,5 @@
\setlength{\fboxsep}{2ex} \setlength{\fboxsep}{2ex}
\fbox{\parbox{1\linewidth}{ \small \fbox{\parbox{1\linewidth}{\small
{\bf Evaluation criteria:} {\bf Evaluation criteria:}
@ -48,7 +48,9 @@
and discussing your results, and (iii) explain how you solved and discussing your results, and (iii) explain how you solved
the problem algorithmically (don't show your entire code). All the problem algorithmically (don't show your entire code). All
data-related figures you show in the presentation should be data-related figures you show in the presentation should be
produced by your program. It is always a good idea to illustrate produced by your program --- no editing or labeling by
the problem with basic plots of the raw-data. Make sure the axis PowerPoint or other software. It is always a good idea to
labels are large enough! illustrate the problem with basic plots of the raw-data. Make
}} sure the axis labels are large enough!
}}

View File

@ -20,7 +20,7 @@ function spikes = lifboltzmannspikes(trials, input, tmax, gain)
for k=1:trials for k=1:trials
times = []; times = [];
j = 1; j = 1;
v = vreset; v = vreset + (vthresh - vreset) * rand();
noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt);
for i=1:n for i=1:n
v = v + (- v + noise(i) + inb)*dt/tau; v = v + (- v + noise(i) + inb)*dt/tau;

View File

@ -76,7 +76,8 @@ plot(false2s, true1s);
T = 0.1; T = 0.1;
gains = 0.01:0.01:1.0; gains = 0.01:0.01:1.0;
cmax = 100; cmax = 100;
ds = zeros(length(gains), 1); dstt = zeros(length(gains), 1);
dsff = zeros(length(gains), 1);
for k = 1:length(gains) for k = 1:length(gains)
gain = gains(k); gain = gains(k);
spikes1 = lifboltzmannspikes(trials, I1, tmax, gain); spikes1 = lifboltzmannspikes(trials, I1, tmax, gain);
@ -84,9 +85,11 @@ for k = 1:length(gains)
[c1, b1] = counthist(spikes1, 0.0, tmax, T, cmax); [c1, b1] = counthist(spikes1, 0.0, tmax, T, cmax);
[c2, b2] = counthist(spikes2, 0.0, tmax, T, cmax); [c2, b2] = counthist(spikes2, 0.0, tmax, T, cmax);
[d, thresholds, true1s, false1s, true2s, false2s, pratio] = discriminability(spikes1, spikes2, tmax, T, cmax); [d, thresholds, true1s, false1s, true2s, false2s, pratio] = discriminability(spikes1, spikes2, tmax, T, cmax);
ds(k) = d; dstt(k) = d;
dsff(k) = min(false1s + false2s);
end end
figure() figure()
plot(gains, ds) plot(gains, dstt);
hold on;
plot(gains, dsff);
hold off;

View File

@ -20,7 +20,7 @@ function spikes = lifboltzmannspikes(trials, input, tmax, gain)
for k=1:trials for k=1:trials
times = []; times = [];
j = 1; j = 1;
v = vreset; v = vreset + (vthresh - vreset) * rand();
noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt);
for i=1:n for i=1:n
v = v + (- v + noise(i) + inb)*dt/tau; v = v + (- v + noise(i) + inb)*dt/tau;

View File

@ -19,7 +19,7 @@ function spikes = lifspikes(trials, input, tmax)
for k=1:trials for k=1:trials
times = []; times = [];
j = 1; j = 1;
v = vreset + (vthresh-vreset)*rand(1); v = vreset + (vthresh-vreset)*rand();
noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt);
for i=1:length(noise) for i=1:length(noise)
v = v + (- v + noise(i) + input)*dt/tau; v = v + (- v + noise(i) + input)*dt/tau;

View File

@ -19,7 +19,7 @@ function spikes = lifspikes(trials, input, tmax)
for k=1:trials for k=1:trials
times = []; times = [];
j = 1; j = 1;
v = vreset + (vthresh-vreset)*rand(1); v = vreset + (vthresh-vreset)*rand();
noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt);
for i=1:length(noise) for i=1:length(noise)
v = v + (- v + noise(i) + input)*dt/tau; v = v + (- v + noise(i) + input)*dt/tau;

View File

@ -32,7 +32,7 @@ function spikes = lifadaptspikes( trials, input, tmaxdt, D, tauadapt, adaptincr
for k=1:trials for k=1:trials
times = []; times = [];
j = 1; j = 1;
v = vreset; v = vreset + (vthresh-vreset)*rand();
a = 0.0; a = 0.0;
noise = sqrt(2.0*D)*randn( length( input ), 1 )/sqrt(dt); noise = sqrt(2.0*D)*randn( length( input ), 1 )/sqrt(dt);
for i=1:length( noise ) for i=1:length( noise )

View File

@ -28,7 +28,7 @@ function spikes = lifouspikes( trials, input, tmaxdt, D, outau )
times = []; times = [];
j = 1; j = 1;
n = 0.0; n = 0.0;
v = vreset; v = vreset + (vthresh-vreset)*rand();
noise = sqrt(2.0*D)*randn( length( input ), 1 )/sqrt(dt); noise = sqrt(2.0*D)*randn( length( input ), 1 )/sqrt(dt);
for i=1:length( noise ) for i=1:length( noise )
n = n + ( - n + noise(i))*dt/outau; n = n + ( - n + noise(i))*dt/outau;

View File

@ -28,7 +28,7 @@ function spikes = pifouspikes( trials, input, tmaxdt, D, outau )
times = []; times = [];
j = 1; j = 1;
n = 0.0; n = 0.0;
v = vreset; v = vreset + (vthresh-vreset)*rand();
noise = sqrt(2.0*D)*randn( length( input ), 1 )/sqrt(dt); noise = sqrt(2.0*D)*randn( length( input ), 1 )/sqrt(dt);
for i=1:length( noise ) for i=1:length( noise )
n = n + ( - n + noise(i))*dt/outau; n = n + ( - n + noise(i))*dt/outau;

View File

@ -18,7 +18,7 @@ function spikes = lifspikes(trials, input, tmax, D)
for k=1:trials for k=1:trials
times = []; times = [];
j = 1; j = 1;
v = vreset; v = vreset + (vthresh-vreset)*rand();
noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt);
for i=1:n for i=1:n
v = v + (- v + noise(i) + input)*dt/tau; v = v + (- v + noise(i) + input)*dt/tau;

View File

@ -18,7 +18,7 @@ function spikes = lifspikes(trials, input, tmax, D)
for k=1:trials for k=1:trials
times = []; times = [];
j = 1; j = 1;
v = vreset; v = vreset + (vthresh-vreset)*rand();
noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt); noise = sqrt(2.0*D)*randn(n, 1)/sqrt(dt);
for i=1:n for i=1:n
v = v + (- v + noise(i) + input)*dt/tau; v = v + (- v + noise(i) + input)*dt/tau;