Class | Ai4r::Som::Node |
In: |
lib/ai4r/som/node.rb
|
Parent: | Object |
this class is used for the individual node and will be (nodes * nodes)-time instantiated
the square map
Weights are of type float
never changed
creates an instance of Node and instantiates the weights the parameters is a uniq and sequential ID as well as the number of total nodes dimensions signals the dimension of the input vector
returns the square distance between the current weights and the input the input is a vector/array of the same size as weights at the end, the square root is extracted from the sum of differences
returns the distance in square-form from the instance node to the passed node example: 2 2 2 2 2 2 1 1 1 2 2 1 0 1 2 2 1 1 1 2 2 2 2 2 2 0 being the current node