Class UnifiedDistanceMatrix
- java.lang.Object
-
- org.apache.commons.math4.neuralnet.twod.util.UnifiedDistanceMatrix
-
- All Implemented Interfaces:
MapVisualization
public class UnifiedDistanceMatrix extends Object implements MapVisualization
U-Matrix visualization of high-dimensional data projection. The 8 individual inter-units distances will becomputed
. They will be stored in additional pixels around each of the original units of the 2D-map. The additional pixels that lie along a "diagonal" are shared by two pairs of units: their value will be set to the average distance between the units belonging to each of the pairs. The value zero will be stored in the pixel corresponding to the location of a unit of the 2D-map.- Since:
- 3.6
- See Also:
NeuronSquareMesh2D.DataVisualization.getUMatrix()
-
-
Constructor Summary
Constructors Constructor Description UnifiedDistanceMatrix(DistanceMeasure distance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
computeImage(NeuronSquareMesh2D map)
Computes the distances between a unit of the map and its neighbours.
-
-
-
Constructor Detail
-
UnifiedDistanceMatrix
public UnifiedDistanceMatrix(DistanceMeasure distance)
- Parameters:
distance
- Distance.
-
-
Method Detail
-
computeImage
public double[][] computeImage(NeuronSquareMesh2D map)
Computes the distances between a unit of the map and its neighbours. The image will contain more pixels than the number of neurons in the givenmap
because each neuron has 8 neighbours. The value zero will be stored in the pixels corresponding to the location of a map unit.- Specified by:
computeImage
in interfaceMapVisualization
- Parameters:
map
- Map.- Returns:
- an image representing the individual distances.
-
-