public class MnemonicSOMLibFormatInputReader extends SOMLibFormatInputReader
SOMInputReader
that can handle MnemonicSOM
, i.e. SOMs where not all units are occupied.AbstractSOMInputReader.UnitInformation
mapFileNameSuffix, unitFileNameSuffix, weightFileNameSuffix
allVectorNames, commonLabelPrefix, contentType, dim, gridLayout, gridTopology, labelled, metricName, unitInfo, xSize, ySize, zSize
MAP_FILE, UNIT_FILE, WEIGHT_VECTOR
Constructor and Description |
---|
MnemonicSOMLibFormatInputReader(java.lang.String unitDescriptionFileName,
java.lang.String mapDescriptionFileName,
int dimension) |
MnemonicSOMLibFormatInputReader(java.lang.String weightVectorFileName,
java.lang.String unitDescriptionFileName,
java.lang.String mapDescriptionFileName) |
MnemonicSOMLibFormatInputReader(java.lang.String weightVectorFileName,
java.lang.String unitDescriptionFileName,
java.lang.String mapDescriptionFileName,
int dimension) |
Modifier and Type | Method and Description |
---|---|
private void |
generateWRandomWeightvectors()
Generates random weight vectors, but only for those units that are occupied.
|
java.lang.String[] |
getMappedVecs(int x,
int y,
int z)
Returns an array of strings containing the names of vectors mapped onto a certain unit specified by coordinates
x and y . |
double[] |
getMappedVecsDist(int x,
int y,
int z)
Returns an array of double values containing the distances between mapped vectors and the unit specified by
coordinates
x and y . |
int |
getNrVecMapped(int x,
int y,
int z)
Returns the number of vectors mapped onto a certain unit specified by coordinates
x and
y . |
double[][][][] |
getVectors()
Returns a 4-dimensional double array of the weight vectors.
|
protected void |
processUnitElement(java.lang.String line,
int j,
int i) |
protected void |
processUnitElement(java.lang.String line,
int k,
int j,
int i) |
getFilePath, getFormatName, getMapDescriptionFileName, getUnitDescriptionFileName, getWeightVectorFileName, readMapDescriptionFile, readUnitDescriptionFile
getBestContextUnitLabels, getBestContextUnitLabels, getCommonVectorLabelPrefix, getContentType, getContextGateUnitLabels, getContextGateUnitLabels, getDim, getGridLayout, getGridTopology, getKaskiGateUnitLabels, getKaskiGateUnitLabels, getKaskiGateUnitLabelsWgt, getKaskiGateUnitLabelsWgt, getKaskiUnitLabels, getKaskiUnitLabels, getKaskiUnitLabelsWgt, getKaskiUnitLabelsWgt, getMappedVecs, getMappedVecsDist, getMetricName, getNrBestContext, getNrBestContext, getNrContextGateLabels, getNrContextGateLabels, getNrGateWeights, getNrGateWeights, getNrKaskiGateLabels, getNrKaskiGateLabels, getNrKaskiLabels, getNrKaskiLabels, getNrKaskiWeights, getNrKaskiWeights, getNrSomsMapped, getNrSomsMapped, getNrUnitLabels, getNrUnitLabels, getNrVecMapped, getQuantErrorUnit, getQuantErrorUnit, getQuantErrorUnitAvg, getQuantErrorUnitAvg, getUnitLabels, getUnitLabels, getUnitLabelsQe, getUnitLabelsQe, getUnitLabelsWgt, getUnitLabelsWgt, getUrlMappedSoms, getUrlMappedSoms, getXSize, getYSize, getZSize, initUnitInformation, isLabelled
public MnemonicSOMLibFormatInputReader(java.lang.String unitDescriptionFileName, java.lang.String mapDescriptionFileName, int dimension) throws java.io.FileNotFoundException, SOMLibFileFormatException
java.io.FileNotFoundException
SOMLibFileFormatException
public MnemonicSOMLibFormatInputReader(java.lang.String weightVectorFileName, java.lang.String unitDescriptionFileName, java.lang.String mapDescriptionFileName) throws java.io.FileNotFoundException, SOMLibFileFormatException
java.io.FileNotFoundException
SOMLibFileFormatException
public MnemonicSOMLibFormatInputReader(java.lang.String weightVectorFileName, java.lang.String unitDescriptionFileName, java.lang.String mapDescriptionFileName, int dimension) throws java.io.FileNotFoundException, SOMLibFileFormatException
java.io.FileNotFoundException
SOMLibFileFormatException
protected void processUnitElement(java.lang.String line, int j, int i)
protected void processUnitElement(java.lang.String line, int k, int j, int i)
processUnitElement
in class SOMLibFormatInputReader
private void generateWRandomWeightvectors()
public double[][][][] getVectors()
SOMInputReader
getVectors
in interface SOMInputReader
getVectors
in class AbstractSOMInputReader
public int getNrVecMapped(int x, int y, int z)
SOMInputReader
x
and
y
. If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown.
The calling function is not obliged to catch it.getNrVecMapped
in interface SOMInputReader
getNrVecMapped
in class AbstractSOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and
y
.public java.lang.String[] getMappedVecs(int x, int y, int z)
SOMInputReader
x
and y
. If the coordinates are invalid, an ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getMappedVecs
in interface SOMInputReader
getMappedVecs
in class AbstractSOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and y
.public double[] getMappedVecsDist(int x, int y, int z)
SOMInputReader
x
and y
. If the coordinates are invalid, an
ArrayIndexOutOfBoundsException
will be thrown. The calling function is not obliged to catch it.getMappedVecsDist
in interface SOMInputReader
getMappedVecsDist
in class AbstractSOMInputReader
x
- horizontal position of the unit on the map.y
- vertical position of the unit on the map.z
- TODOx
and y
.