Class MapUtils


  • public final class MapUtils
    extends Object
    Utilities for network maps.
    Since:
    3.3
    • Method Detail

      • computeQuantizationError

        public static double computeQuantizationError​(Iterable<double[]> data,
                                                      Iterable<Neuron> neurons,
                                                      DistanceMeasure distance)
        Computes the quantization error. The quantization error is the average distance between a feature vector and its "best matching unit" (closest neuron).
        Parameters:
        data - Feature vectors.
        neurons - List of neurons to scan.
        distance - Distance function.
        Returns:
        the error.
        Throws:
        IllegalArgumentException - if data is empty.
      • computeTopographicError

        public static double computeTopographicError​(Iterable<double[]> data,
                                                     Network net,
                                                     DistanceMeasure distance)
        Computes the topographic error. The topographic error is the proportion of data for which first and second best matching units are not adjacent in the map.
        Parameters:
        data - Feature vectors.
        net - Network.
        distance - Distance function.
        Returns:
        the error.
        Throws:
        IllegalArgumentException - if data is empty.