Class: Neuronet::Connection
- Inherits:
-
Struct
- Object
- Struct
- Neuronet::Connection
- Defined in:
- lib/neuronet/connection.rb
Overview
Connection is a lightweight struct for weighted neuron links.
Instance Attribute Summary collapse
-
#neuron ⇒ Object
Returns the value of attribute neuron.
-
#weight ⇒ Object
Returns the value of attribute weight.
Instance Method Summary collapse
-
#value ⇒ Object
Weighted activation value.
Instance Attribute Details
#neuron ⇒ Object
Returns the value of attribute neuron
5 6 7 |
# File 'lib/neuronet/connection.rb', line 5 def neuron @neuron end |
#weight ⇒ Object
Returns the value of attribute weight
5 6 7 |
# File 'lib/neuronet/connection.rb', line 5 def weight @weight end |
Instance Method Details
#value ⇒ Object
Weighted activation value
7 |
# File 'lib/neuronet/connection.rb', line 7 def value = neuron.activation * weight |