Documentation of 'smile.vq.NeuralGas' Java class
NeuralGas
smile.vq

Class NeuralGas

  • All Implemented Interfaces:
    Clustering<double[]>


    public class NeuralGas
    extends PartitionClustering<double[]>
    Neural Gas soft competitive learning algorithm. The Neural Gas is inspired by the Self-Organizing Map for finding optimal data representations based on feature vectors. The algorithm was coined "Neural Gas" because of the dynamics of the feature vectors during the adaptation process, which distribute themselves like a gas within the data space. Although it is mainly applied where data compression or vector quantization is an issue, it is also used for cluster analysis as a robustly converging alternative to the k-means clustering. A prominent extension is the Growing Neural Gas.

    Compared to SOM, neural gas has no topology of a fixed dimensionality (in fact, no topology at all). For each input signal during learning, the neural gas algorithm sorts the neurons of the network according to the distance of their reference vectors to the input signal. Based on this "rank order", neurons are adapted based on the adaptation strength that are decreased according to a fixed schedule.

    The adaptation step of the Neural Gas can be interpreted as gradient descent on a cost function. By adapting not only the closest feature vector but all of them with a step size decreasing with increasing distance order, compared to k-means clustering, a much more robust convergence of the algorithm can be achieved.

    References

    1. Thomas Martinetz and Klaus Schulten. A "neural gas" network learns topologies. Artificial Neural Networks, 397-402, 1991.
    2. T. Martinetz, S. Berkovich, and K. Schulten. "Neural-gas" Network for Vector Quantization and its Application to Time-Series Prediction. IEEE Trans. on Neural Networks, 4(4):558-569, 1993.
    3. T. Martinetz and K. Schulten. Topology representing networks. Neural Networks, 7(3):507-522, 1994.
    See Also:
    KMeans, GrowingNeuralGas, NeuralMap
    • Constructor Detail

      • NeuralGas

        public NeuralGas(double[][] data,
                         int k)
        Constructor. Learn the Neural Gas with k neurons.
        Parameters:
        k - the number of units in the neural gas. It is also the number of clusters.
      • NeuralGas

        public NeuralGas(double[][] data,
                         int k,
                         double lambda_i,
                         double lambda_f,
                         double eps_i,
                         double eps_f,
                         int steps)
        Constructor. Learn the Neural Gas with k neurons.
        Parameters:
        k - the number of units in the neural gas.
        lambda_i - the initial value of lambda. lambda_i and lambda_f are used to set the soft learning radius/rate, i.e. determining the number of neural units significantly changing their synaptic weights with each adaptation step.
        lambda_f - The final value of lambda.
        eps_i - the initial value of epsilon. epsilon_i and epsilon_f are the initial and final learning rate respectively.
        eps_f - the final value of epsilon.
        steps - the number of iterations. Note that for one iteration, we mean that the learning process goes through the whole dataset.
    • Method Detail

      • distortion

        public double distortion()
        Returns the distortion.
      • centroids

        public double[][] centroids()
        Returns the centroids/neurons.
      • neurons

        public double[][] neurons()
        Returns the centroids/neurons.
      • predict

        public int predict(double[] x)
        Cluster a new instance.
        Parameters:
        x - a new instance.
        Returns:
        the cluster label, which is the index of nearest centroid.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.