odynn.coptim module¶
-
class
odynn.coptim.
CircuitOpt
(circuit)[source]¶ Bases:
odynn.optim.Optimizer
Class for optimization of a neuronal circuit
Methods
optimize
(subdir[, train, test, w, w_n, …])Optimize the neuron parameters settings
(w, train)Give the settings of the optimization plot_out -
optimize
(subdir, train=None, test=None, w=(1, 0), w_n=None, epochs=700, l_rate=(0.9, 9, 0.95), suffix='', n_out=[1], evol_var=True, plot=True)[source]¶ Optimize the neuron parameters
Parameters: - dir (str) – path to the directory for the saved files
- train (list of ndarray) –
list containing [time, input, voltage, ion_concentration] that will be used fitted dimensions : - time : [time]
- input, voltage and concentration : [time, batch, neuron]
- test (list of ndarray) – same as train for the dimensions These arrays will be used fo testing the model (Default value = None)
- w (list) – list of weights for the loss, the first value is for the voltage and the following ones for the ion concentrations defined in the model. (Default value = [1, 0]:
- epochs (int) – Number of training steps (Default value = 700)
- l_rate (tuple) – Parameters for an exponential decreasing learning rate : (start, number of constant steps, exponent) (Default value = [0.1, 9, 0.92]:
- suffix (str) – suffix for the saved files (Default value = ‘’)
- n_out (list of int) – list of neurons corresponding to the data in train and test
Returns: neuron attribute after optimization
Return type:
-