Class MapUtils
- java.lang.Object
-
- org.apache.commons.math4.neuralnet.MapUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublecomputeQuantizationError(Iterable<double[]> data, Iterable<Neuron> neurons, DistanceMeasure distance)Computes the quantization error.static doublecomputeTopographicError(Iterable<double[]> data, Network net, DistanceMeasure distance)Computes the topographic error.
-
-
-
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- ifdatais 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- ifdatais empty.
-
-