Package smile.vq

Class GrowingNeuralGas

java.lang.Object
smile.vq.GrowingNeuralGas
All Implemented Interfaces:
Serializable, VectorQuantizer

public class GrowingNeuralGas extends Object implements VectorQuantizer
Growing Neural Gas. As an extension of Neural Gas, Growing Neural Gas can add and delete nodes during algorithm execution. The growth mechanism is based on growing cell structures and competitive Hebbian learning.

Compared to Neural Gas, GNG has the following distinctions:

  • The system has the ability to add and delete nodes.
  • Local Error measurements are noted at each step helping it to locally insert/delete nodes.
  • Edges are connected between nodes, so a sufficiently old edges is deleted. Such edges are intended place holders for localized data distribution.
  • Such edges also help to locate distinct clusters (those clusters are not connected by edges).

References

  1. B. Fritzke. A growing neural gas network learns topologies. NIPS, 1995.
See Also:
  • Constructor Details

    • GrowingNeuralGas

      public GrowingNeuralGas(int d)
      Constructor.
      Parameters:
      d - the dimensionality of signals.
    • GrowingNeuralGas

      public GrowingNeuralGas(int d, double epsBest, double epsNeighbor, int edgeLifetime, int lambda, double alpha, double beta)
      Constructor.
      Parameters:
      d - the dimensionality of signals.
      epsBest - the learning rate to update best matching neuron.
      epsNeighbor - the learning rate to update neighbors of best matching neuron.
      edgeLifetime - the maximum age of edges.
      lambda - if the number of input signals so far is an integer multiple of lambda, insert a new neuron.
      alpha - decrease error variables by multiplying them with alpha during inserting a new neuron.
      beta - decrease all error variables by multiply them with beta.
  • Method Details

    • update

      public void update(double[] x)
      Description copied from interface: VectorQuantizer
      Update the codebook with a new observation.
      Specified by:
      update in interface VectorQuantizer
      Parameters:
      x - a new observation.
    • neurons

      public Neuron[] neurons()
      Returns the neurons in the network.
      Returns:
      the neurons in the network.
    • quantize

      public double[] quantize(double[] x)
      Description copied from interface: VectorQuantizer
      Quantize a new observation. Returns Optional.empty if the observation is noise.
      Specified by:
      quantize in interface VectorQuantizer
      Parameters:
      x - a new observation.
      Returns:
      the quantized vector.