Exemplo n.º 1
0
    def __init__(self, Model):

        self.input = Model.input
        self.output = Model.output
        self.input_test = Model.input_test
        self.output_test = Model.output_test

        self.gradient_ker = diff.gradient_ker(Model)
        self.gradient_NL = diff.gradient_NL(Model)

        self.hessian_ker = diff.hessian_ker(Model)
        self.hessian_NL = diff.hessian_NL(Model)

        self.paramKer = Model.paramKer
        self.paramNL = Model.paramNL

        self.lls = Model.lls
        self.Mds = Model.Mds
        self.switches = Model.switches
        #self.neustd = Model.neustd

        self.likelihood = diff.likelihood(Model)

        self.sub_membrane_potential = diff.subMembPot(Model, 'training')
        self.membrane_potential = diff.MembPot(Model)
Exemplo n.º 2
0
    def renormalize(self):

        std = self.sub_membrane_potential.std()

        self.paramKer = (1. / std) * self.paramKer

        self.membrane_potential = diff.MembPot(self)

        self.update()
Exemplo n.º 3
0
    def update(self):

        self.sub_membrane_potential = diff.subMembPot(self, 'training')
        self.membrane_potential = diff.MembPot(self)

        self.likelihood = diff.likelihood(self)

        self.gradient_ker = diff.gradient_ker(self)
        self.hessian_ker = diff.hessian_ker(self)

        self.gradient_NL = diff.gradient_NL(self)
        self.hessian_NL = diff.hessian_NL(self)
Exemplo n.º 4
0
    def add_data(self, neuron):  #import data from neuron

        Nsteps = neuron.total_time / self.dt

        self.input = neuron.input
        self.output = [neuron.output]

        self.paramKer[-1] = -math.log(
            len(neuron.output) /
            float(neuron.total_time))  #initialize for fit.

        #self.neustd = neuron.sub_memb_pot.std()

        self.sub_membrane_potential = diff.subMembPot(self, 'training')
        self.membrane_potential = diff.MembPot(self)

        self.input_test = neuron.input_test
        self.output_test = neuron.output_test
Exemplo n.º 5
0
    def membpot(self):

        self.sub_membrane_potential = diff.subMembPot(self, 'training')
        self.membrane_potential = diff.MembPot(self)