Phpml\NeuralNetwork\Node\Neuron::getSynapses PHP Method

getSynapses() public method

public getSynapses ( ) : Synapse[]
return Phpml\NeuralNetwork\Node\Neuron\Synapse[]
    public function getSynapses()
    {
        return $this->synapses;
    }

Usage Example

Esempio n. 1
0
 /**
  * @param Neuron $neuron
  *
  * @return float
  */
 public function getSigmaForNeuron(Neuron $neuron) : float
 {
     $sigma = 0.0;
     foreach ($this->neuron->getSynapses() as $synapse) {
         if ($synapse->getNode() == $neuron) {
             $sigma += $synapse->getWeight() * $this->getSigma();
         }
     }
     return $sigma;
 }
All Usage Examples Of Phpml\NeuralNetwork\Node\Neuron::getSynapses