public class MnemonicGrowingLayer extends GrowingLayer
GrowingLayer.Flip, GrowingLayer.Rotation, GrowingLayer.UpdaterThread
Layer.GridLayout, Layer.GridTopology
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.Integer[][][][][][] |
distanceMatrix_ |
private int |
unitCount |
dim, gridLayout, gridTopology, maxFeatureValues, metric, metricWeighted, minFeatureValues, ROTATIONS, skippedNonSelected, trainedNonSelected, unitDistanceMatrix, units, xSize, ySize, zSize
Constructor and Description |
---|
MnemonicGrowingLayer(int id,
Unit su,
int x,
int y,
int z,
java.lang.String metricName,
int d,
double[][][][] vectors,
long seed) |
MnemonicGrowingLayer(int id,
Unit su,
int x,
int y,
java.lang.String metricName,
int d,
double[][][] vectors,
long seed) |
Modifier and Type | Method and Description |
---|---|
void |
clearMappedInput()
Removes all mapped input data from the units.
|
void |
countDistances(int distanceFromStart,
Unit startUnit,
Unit currentUnit) |
Unit[] |
getAllUnits()
Returns all units of the layer in an array.
|
double |
getMapDistance(int x1,
int y1,
int x2,
int y2) |
double |
getMapDistance(int x1,
int y1,
int z1,
int x2,
int y2,
int z2)
Returns the distance between two units on the map grid.
|
int |
getUnitCount() |
Unit |
getWinner(InputDatum input)
Returns the winner unit for a given input datum specified by argument
input . |
UnitDistance[] |
getWinnersAndDistances(InputDatum input,
int num)
Returns a number of best-matching units and distances sorted by distance (ascending) for a given input datum.
|
void |
initDistances() |
protected void |
updateUnitsNormal(Unit winner,
InputDatum input,
double learnrate,
double sigma)
Updates the weight vectors of the all map units with respect to the input datum and the according winner unit.
|
addDimension, calculateQuantizationErrorForUnits, checkRotation, clearLabels, clone, computeUnitFeatureWeights, equalWeights, flip, get2DUnits, getAllMappedDataNames, getAllMappedDataNames, getAllMappedDataNamesAsList, getAllSubMaps, getBinAssignment, getBinCentres, getBinCentres, getBinCentresAsList, getBinDeviation, getCommonVectorLabelPrefix, getComponentPlane, getComponentPlane, getComponentPlane3D, getData, getDeviation, getDim, getExtremes, getGridLayout, getGridTopology, getIdString, getLevel, getMapDistance, getMapDistanceSq, getMapDistanceSq, getMaximumNumberOfMappedInputs, getMetric, getMostDissimilarNeighbor, getNeighbouringUnits, getNeighbouringUnits, getNeighbouringUnits, getNeighbouringUnits, getNeighbouringUnits, getNNearestInputs, getNNearestInputs, getNO_CPUS, getNumberOfMappedInputs, getNumberOfNotEmptyUnits, getNumberOfRegions, getQualityMeasure, getRevision, getSuperUnit, getUnit, getUnit, getUnitDistanceMatrix, getUnitForDatum, getUnitForIndex, getUnitIndex, getUnitPath, getUnits, getVirtualLayer, getWinner, getWinner, getWinnerFromQuery, getWinners, getWinners, getWinnersFromQuery, getWinningInputDataFromQuery, getXSize, getYSize, getZSize, hasMappedInput, hasNeighbours, hasNeighbours, isEdgeColumn, isEdgeRow, isValidUnitLocation, isValidUnitLocation, mapData, mapDatum, maxNeighbourhoodRadius, neighbourhoodFeatureWeight, printSize, printUnitIndices, rotate, rotate, setCommonVectorLabelPrefix, setGridLayout, setGridTopology, setNO_CPUS, setQualityMeasure, setTrainingInterruptionListener, train, train, train, train
java.lang.Integer[][][][][][] distanceMatrix_
private int unitCount
public MnemonicGrowingLayer(int id, Unit su, int x, int y, java.lang.String metricName, int d, double[][][] vectors, long seed) throws SOMToolboxException
SOMToolboxException
public MnemonicGrowingLayer(int id, Unit su, int x, int y, int z, java.lang.String metricName, int d, double[][][][] vectors, long seed) throws SOMToolboxException
SOMToolboxException
public void initDistances()
public Unit getWinner(InputDatum input)
GrowingLayer
input
.getWinner
in class GrowingLayer
input
- the input datum for which the winner unit will be searched.public void clearMappedInput()
GrowingLayer
clearMappedInput
in class GrowingLayer
public double getMapDistance(int x1, int y1, int x2, int y2)
getMapDistance
in class GrowingLayer
public double getMapDistance(int x1, int y1, int z1, int x2, int y2, int z2)
Layer
getMapDistance
in interface Layer
getMapDistance
in class GrowingLayer
x1
- the horizontal position of the first unit.y1
- the vertical position of the first unit.z1
- the height position of the first unit.x2
- the horizontal position of the second unit.y2
- the vertical position of the second unit.z2
- the height position of the second unit.protected void updateUnitsNormal(Unit winner, InputDatum input, double learnrate, double sigma)
GrowingLayer
updateUnitsNormal
in class GrowingLayer
winner
- the winner unit.input
- the input datum.learnrate
- the learnrate.sigma
- the width of the Gaussian determining the neighborhood radius.public Unit[] getAllUnits()
GrowingLayer
getAllUnits
in interface Layer
getAllUnits
in class GrowingLayer
public UnitDistance[] getWinnersAndDistances(InputDatum input, int num)
GrowingLayer
getWinnersAndDistances
in class GrowingLayer
input
- the input datum for which the winner unit will be searched.num
- the number of best-matching units.Vector
containing an array of Unit (elementAt(0)) and array of double (elementAt(1))
containing best-matching units sorted ascending by distance from the input datum.public int getUnitCount()
getUnitCount
in class GrowingLayer