Example #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)
Example #2
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)
Example #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)
Example #4
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)
Example #5
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
Example #6
0
    def test(self):

        Nb = self.basisKer.shape[0]

        self.out_model_test = []
        self.sub_memb_pot_test = diff.subMembPot(self, 'test')

        print "testing ..."

        for i in range(100):

            self.out_model_test = self.out_model_test + [
                mech.run_model(self.input_test, self)
            ]

        self.delta_md = 4.

        self.Md = fun.SimMeas(self.out_model_test, self.output_test, self,
                              self.delta_md)
Example #7
0
    def membpot(self):

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