-
Notifications
You must be signed in to change notification settings - Fork 0
/
parameters.py
266 lines (227 loc) · 6.78 KB
/
parameters.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 25 20:39:04 2016
@author: daniel
"""
#from math import sqrt
results_directory = './results'
#-----------------------------------------------------------#
# 1. General recording and simulation parameters #
#-----------------------------------------------------------#
step = 20.0
record_step = 1
record_step_v = 1
record_step_PDC = 1000
skip_first_x_ms = 100
nrn_dots_per_1ms = 1.0/record_step
time_to_avg_over = 20 # in seconds
simtime = 600
training_mode = 'supra'
num_trials = 20
NUMBER_OF_PROCESSES = 7
#-----------------------------------#
# 2. Synaptic parameters #
#-----------------------------------#
esyn_tau = 6
isyn_tau = 6
isyn_plateau_tau = 10
e_esyn = 0
e_gaba = -60
erev_NMDA = 15
erate = 0.2
irate = 0.2
pos = 0.05
# NMDA parameters
#Mg = 1.0
#alpha = 0.072
#eta = 0.28
#
Mg = 1.0
alpha = 0.062
eta = 0.381679389
#Mg = 1.4
#alpha = 0.099
#eta = 1.0/12
g_ramp_max = 0.000255
nmda_ampa_ratio = 1
gAMPAmax = 1.0e-3
gNMDAmax = gAMPAmax*nmda_ampa_ratio
gGABAmax = 1.5e-3
g_expsyn_max = 0.1e-3
g_inhexpsyn_max = gGABAmax
U = 0.3
u0 = 0.0
tauF = 5.0
gAMPAmax_plateau = 3.0*1.0e-3#0.75*1.0e-3
gNMDAmax_plateau = 3.0*1.0e-3#4.5*1.0e-3
gGABAmax_plateau = 1.5e-3
nmda_ampa_ratio = gNMDAmax_plateau/gAMPAmax_plateau
ratio_glutamate_syn = 1.0
ratio_distributed_synapses = 0.2
nmda_ca_fraction = 0.175
gmaxAMPA_spillover = 15e-3 #0.015
gmaxNMDA_spillover = 2.5e-3
gmaxNMDAe_spillover = 5.0e-3 #0.0075
gmaxAMPA_pf = 2.5e-3
gmaxNMDA_pf = 4.5e-3
Beta = 0.01
weight = 0.25
Cdur = 1.
Cdur_pf = 50
eCdur_init = 50
eCdur_factor = 200
eCdur = eCdur_init + eCdur_factor*weight
width = 0.05
delay_exnmda = 5
random_initial_weights = False
start_weight = 0.15
end_weight = 0.25
distribution = 'uniform'
deterministic_interval = 1
net_con_interval = 0
num_spikes = 1
exglu_weight = 0.37
exglu_tau = simtime
exglu_norm_factor = 0.25*1/num_spikes
tau1_NMDA = 2.76
tau2_NMDA = 115.5
tau1_exp2syn = 1.9
tau2_exp2syn = 4.8
tau1_inhexp2syn = 1
tau2_inhexp2syn = 10
tau_cadyn_nmda = 100
tau_caldyn = 100
tau_catdyn = 100
#-----------------------------------------#
# 3. Synaptic input parameters #
#-----------------------------------------#
plateau_syn_rate = 400
plateau_burst_start = 100
plateau_burst_end = 130
plateau_cluster_size = 20
plateau_cluster_size_max = 41
cluster_start_pos = 0.45
cluster_end_pos = 0.60
xor_input_window = 35
xor_input_size = 30
syns_per_feature = 5
pf_input_rate = 1
pf_input_start = plateau_burst_start
pf_input_window = 70
pf_input_end = plateau_burst_end+pf_input_window
pf_input_size = 10
pf_num_spikes = 3
pf_input_interval = 1
inhibitory_syn_rate = 105.0
inhibitory_burst_start = 180
inhibitory_burst_end = 230
inhibitory_cluster_size = 5
inh_cluster_start_pos = 0.45
inh_cluster_end_pos = 0.60
distributed_input_rate = 1000.0/40
distributed_input_start = 130
distributed_input_end = 200
distributed_input_size = 0
distributed_input_window = 50
correlated_distributed_inputs = False
ramp_syn_rate = 100.0
ramp_slope = 0.5 # Hz/ms
ramp_burst_start = 200
ramp_burst_end = 1000
e_interval = 1.0/erate*(10**3)
i_interval = 1.0/irate*(10**3)
plateau_syn_interval = 1.0/plateau_syn_rate*(10**3)
distributed_input_interval = 1.0/distributed_input_rate*(10**3)
ramp_syn_interval = 1.0/ramp_syn_rate*(10**3)
inhibitory_syn_interval = 1.0/inhibitory_syn_rate*(10**3)
#--------------------------------#
# 4. Spine parameters #
#--------------------------------#
head_L = 0.5
head_diam = 0.5
neck_L = 0.5
neck_diam = 0.125
neck_Ra = 1130.0
head_Ra = 150
kb_cadyn_nmda = 96
kt_cadyn_nmda = 1e-4
kd_cadyn_nmda = 1e-4#0.3e-3
include_empty_spines = False
#-----------------------------------------------------------#
# 5. XOR problem and adaptive synapse parameters #
#-----------------------------------------------------------#
event_times = [200, 500, 900]
x5_training_file = 'data_fig3_red_banana.dat'
save_weights_file = 'one_neuron.dat'
load_weights_file = 'one_neuron.dat'
random_training_sequence = False
adaptive_distributed_inputs = True
long_simulation = False
training_set_size_per_group = 40
training_set_size = training_set_size_per_group*4
training_input_length = 30
first_training_input_start = 200
time_to_reward = 400 - training_input_length
reward_length = 20
session_length = 800
test_set_size_per_group = 1
test_set_size = test_set_size_per_group*4
window_error = 2
record_step_thresh = session_length/2
#learning_rate_w_LTP = 0.000015#0.01
#learning_rate_w_LTD = 0.003#0.035
#learning_rate_w_LTD_pf = 0#0.05
#learning_rate_thresh_LTP = 0.0000001#0.00035
#learning_rate_thresh_LTD = 0.0000004#0.00035*4
#learning_rate_thresh_KD_LTD = 0.05
#lthresh_LTP_min = 0.01
learning_rate_w_LTP = 0#0.035
learning_rate_w_LTD = 0#0.035
learning_rate_w_LTD_pf = 0#0.05
learning_rate_thresh_LTP = 0#0.00035
learning_rate_thresh_LTD = 0#0.00035
learning_rate_thresh_KD_LTD = 0# 0.05
lthresh_LTP_min = 0.01
n1 = 6000
n2 = 1000
KD1 = 0.0022
KD2 = 0.02
KD_LTD = 0.001
n_LTD = 3000
KD_LTD_pf = 0.0001
n_LTD_pf = 1000
random_weights = False
read_input_config_from_file = False
input_config_file = 'xor_inputs_to_dends.dat'#'xor_dense.dat'
input_dends = [5, 14] #[3, 5, 8, 12, 15, 22, 26, 35, 41, 47, 53, 57]#
pf_input_dends = []#[5, 22] #[12, 22, 26, 35, 41, 53] #
independent_dends = [3, 5, 8, 12, 14, 15, 22, 26, 41, 47, 52]
input_dends = independent_dends
cluster_start_poss = [0.55, 0.45, 0.4, 0.55, 0.75, 0.3, 0.3, 0.4, 0.85, 0.4, 0.25]
cluster_end_poss = [0.7, 0.7, 0.5, 0.7, 0.95, 0.5, 0.45, 0.55, 0.95, 0.6, 0.45]
params_for_learning_functions = 'params_for_learning_funtions.dat'
input_dends_dict = {'loc': input_dends,#[3, 5, 15, 22, 53],
'pos': cluster_start_poss,#, 0.55, 0.05, 0.55],
'end_pos': cluster_end_poss,
'start': [plateau_burst_start]*2,
'end': [plateau_burst_end]*2 }
pf_input_dends_dict = {'loc': pf_input_dends,#[5, 15, 22],
'pos': cluster_start_poss,
'end_pos': cluster_end_poss,#, 0.05],
'start': [plateau_burst_start]*2,
'end': [plateau_burst_end]*2 }
#simtime = first_training_input_start + training_set_size*session_length
#simtime = first_training_input_start + test_set_size*session_length
#simtime = first_training_input_start + training_set_size*(training_input_length+
# time_to_reward + reward_length)
#----------------------------------#
# 6. Plotting parameters #
#----------------------------------#
#-----------------------------------#
# 6.1. For XOR experiment #
#-----------------------------------#
#-------------------------------------------------------#
# 7. Miscellaneous and parameter dictionaries #
#-------------------------------------------------------#
dends_per_plot = 1
scale_conductance = 1000