Class KohonenUpdateAction

  • All Implemented Interfaces:
    UpdateAction

    public class KohonenUpdateAction
    extends Object
    implements UpdateAction
    Update formula for Kohonen's Self-Organizing Map.
    The update method modifies the features w of the "winning" neuron and its neighbours according to the following rule: wnew = wold + α e(-d / σ) * (sample - wold) where
    • α is the current learning rate,
    • σ is the current neighbourhood size, and
    • d is the number of links to traverse in order to reach the neuron from the winning neuron.

    This class is thread-safe as long as the arguments passed to the constructor are instances of thread-safe classes.
    Each call to the update method will increment the internal counter used to compute the current values for
    • the learning rate, and
    • the neighbourhood size.
    Consequently, the function instances that compute those values (passed to the constructor of this class) must take into account whether this class's instance will be shared by multiple threads, as this will impact the training process.
    Since:
    3.3
    • Method Detail

      • update

        public void update​(Network net,
                           double[] features)
        Updates the network in response to the sample features.
        Specified by:
        update in interface UpdateAction
        Parameters:
        net - Network.
        features - Training data.
      • getNumberOfCalls

        public long getNumberOfCalls()
        Retrieves the number of calls to the update method.
        Returns:
        the current number of calls.