Beispiel #1
0
Datei: ann.py Projekt: Hydex/ann
    def setSynapse(self, axon, dendrite, weight):
        axon_id = mutil.extractNeuronId(axon)
        dendrite_id = mutil.extractNeuronId(dendrite)

        #print 'setting synapse from', axon_id, 'to', dendrite_id, 'with weight', weight
        mutil.makeDictIfNot(self.synapses_by_dendrite, dendrite_id)
        mutil.makeDictIfNot(self.synapses_by_axon, axon_id)
        self.synapses_by_dendrite[dendrite_id][axon_id] = weight
        self.synapses_by_axon[axon_id][dendrite_id] = weight
Beispiel #2
0
Datei: ann.py Projekt: Hydex/ann
    def setSynapse(self, axon, dendrite, weight):
        axon_id = mutil.extractNeuronId(axon)
        dendrite_id = mutil.extractNeuronId(dendrite)

        #print 'setting synapse from', axon_id, 'to', dendrite_id, 'with weight', weight
        mutil.makeDictIfNot(self.synapses_by_dendrite, dendrite_id)
        mutil.makeDictIfNot(self.synapses_by_axon, axon_id)
        self.synapses_by_dendrite[dendrite_id][axon_id] = weight
        self.synapses_by_axon[axon_id][dendrite_id] = weight
Beispiel #3
0
Datei: ann.py Projekt: Hydex/ann
 def weightAtSynapse(self, axon, dendrite):
     axon_id = mutil.extractNeuronId(axon)
     dendrite_id = mutil.extractNeuronId(dendrite)
     return self.synapses_by_axon[axon_id][dendrite_id]
Beispiel #4
0
Datei: ann.py Projekt: Hydex/ann
 def getAllSynapsesByAxon(self, axon):
     neuron_id = mutil.extractNeuronId(axon)
     if self.synapses_by_axon.has_key(neuron_id):
         return self.synapses_by_axon[neuron_id]
     #print 'no synapses found'
     return {}
Beispiel #5
0
Datei: ann.py Projekt: Hydex/ann
 def getAllSynapsesByDendrite(self, dendrite):
     neuron_id = mutil.extractNeuronId(dendrite)
     if self.synapses_by_dendrite.has_key(neuron_id):
         return self.synapses_by_dendrite[neuron_id]
     #print 'no synapses found'
     return {}
Beispiel #6
0
Datei: ann.py Projekt: Hydex/ann
 def setErrorAt(self, neuron, error):
     neuron_id = mutil.extractNeuronId(neuron)
     if self.neurons.has_key(neuron_id):
         #print 'setting error at', neuron_id, 'to', error
         self.neurons[neuron_id].error = error
Beispiel #7
0
Datei: ann.py Projekt: Hydex/ann
 def getErrorAt(self, neuron):
     neuron_id = mutil.extractNeuronId(neuron)
     if self.neurons.has_key(neuron_id):
         return self.neurons[neuron_id].error
Beispiel #8
0
Datei: ann.py Projekt: Hydex/ann
 def derivativeOutputAt(self, neuron):
     neuron_id = mutil.extractNeuronId(neuron)
     return self.neurons[neuron_id].derivativeOutput()
Beispiel #9
0
Datei: ann.py Projekt: Hydex/ann
 def outputAt(self, neuron):
     neuron_id = mutil.extractNeuronId(neuron)
     return self.neurons[neuron_id].output()
Beispiel #10
0
Datei: ann.py Projekt: Hydex/ann
 def weightAtSynapse(self, axon, dendrite):
     axon_id = mutil.extractNeuronId(axon)
     dendrite_id = mutil.extractNeuronId(dendrite)
     return self.synapses_by_axon[axon_id][dendrite_id]
Beispiel #11
0
Datei: ann.py Projekt: Hydex/ann
 def getAllSynapsesByAxon(self, axon):
     neuron_id = mutil.extractNeuronId(axon)
     if self.synapses_by_axon.has_key(neuron_id):
         return self.synapses_by_axon[neuron_id]
     #print 'no synapses found'
     return {}
Beispiel #12
0
Datei: ann.py Projekt: Hydex/ann
 def getAllSynapsesByDendrite(self, dendrite):
     neuron_id = mutil.extractNeuronId(dendrite)
     if self.synapses_by_dendrite.has_key(neuron_id):
         return self.synapses_by_dendrite[neuron_id]
     #print 'no synapses found'
     return {}
Beispiel #13
0
Datei: ann.py Projekt: Hydex/ann
 def setErrorAt(self, neuron, error):
     neuron_id = mutil.extractNeuronId(neuron)
     if self.neurons.has_key(neuron_id):
         #print 'setting error at', neuron_id, 'to', error
         self.neurons[neuron_id].error = error
Beispiel #14
0
Datei: ann.py Projekt: Hydex/ann
 def getErrorAt(self, neuron):
     neuron_id = mutil.extractNeuronId(neuron)
     if self.neurons.has_key(neuron_id):
         return self.neurons[neuron_id].error
Beispiel #15
0
Datei: ann.py Projekt: Hydex/ann
 def derivativeOutputAt(self, neuron):
     neuron_id = mutil.extractNeuronId(neuron)
     return self.neurons[neuron_id].derivativeOutput()
Beispiel #16
0
Datei: ann.py Projekt: Hydex/ann
 def outputAt(self, neuron):
     neuron_id = mutil.extractNeuronId(neuron)
     return self.neurons[neuron_id].output()