Phpml\NeuralNetwork\Node\Neuron\Synapse::getOutput PHP Method

getOutput() public method

public getOutput ( ) : float
return float
    public function getOutput() : float
    {
        return $this->weight * $this->node->getOutput();
    }

Usage Example

Example #1
0
 public function testSynapseInitialization()
 {
     $node = $this->getNodeMock($nodeOutput = 0.5);
     $synapse = new Synapse($node, $weight = 0.75);
     $this->assertEquals($node, $synapse->getNode());
     $this->assertEquals($weight, $synapse->getWeight());
     $this->assertEquals($weight * $nodeOutput, $synapse->getOutput());
     $synapse = new Synapse($node);
     $this->assertInternalType('float', $synapse->getWeight());
 }