at.tuwien.ifs.somtoolbox.data
Class SimpleMatrixInputData
java.lang.Object
at.tuwien.ifs.somtoolbox.data.AbstractSOMLibSparseInputData
at.tuwien.ifs.somtoolbox.data.SimpleMatrixInputData
- All Implemented Interfaces:
- InputData
public class SimpleMatrixInputData
- extends AbstractSOMLibSparseInputData
Reads data from a simple matrix file. Rows are separated by newlines, and columns by spaces or tabs.
- Version:
- $Id: SimpleMatrixInputData.java 3358 2010-02-11 14:35:07Z mayer $
- Author:
- Rudolf Mayer
Field Summary |
private double[][] |
matrix
|
Fields inherited from class at.tuwien.ifs.somtoolbox.data.AbstractSOMLibSparseInputData |
classInfo, content_subtype, content_type, dataNames, dim, ERROR_MESSAGE_FILE_FORMAT_CORRUPT, featureMatrixCols, featureMatrixRows, isNormalized, meanVector, mqe0, nameCache, numVectors, rand, source, templateVector |
Methods inherited from class at.tuwien.ifs.somtoolbox.data.AbstractSOMLibSparseInputData |
classInformation, create, create, create, dim, equals, getByNameDistanceSorted, getContentSubType, getContentType, getData, getData, getDataIntervals, getDataSource, getDistanceMatrix, getDistances, getFeatureDensities, getFeatureMatrixColumns, getFeatureMatrixRows, getInputDatum, getInputDatum, getInputDatumIndex, getLabel, getLabels, getMeanVector, getMeanVector, getNearestN, getNearestN, getNearestNUnsorted, getRandomInputDatum, initDistanceMatrix, isNormalizedToUnitLength, numVectors, setClassInfo, setTemplateVector, templateVector, transformValues |
matrix
private double[][] matrix
SimpleMatrixInputData
public SimpleMatrixInputData(String fileName)
getInputDatum
public InputDatum getInputDatum(int d)
- Description copied from interface:
InputData
- Get an input datum with a specified index.
- Parameters:
d
- the index of the input datum.
- Returns:
- the input datum.
getInputVector
public double[] getInputVector(int d)
- Description copied from interface:
InputData
- Get the vector for the input datum of the specified index
getValue
public double getValue(int x,
int y)
- Description copied from interface:
InputData
- Returns the value of the y-th feature of input vector x.
mqe0
public double mqe0(DistanceMetric metric)
- Description copied from interface:
InputData
- Calculates the mean quantisation error of the top-level unit.
- Parameters:
metric
- the metric to use for distance calculation.
- Returns:
- the mqe0.
subset
public InputData subset(String[] names)
- Description copied from interface:
InputData
- Gets a subset of this input data set. The input data in the subset are identified by the specified labels.
- Parameters:
names
- the label names of the desired subset data.
- Returns:
- a subset of the data.
getFormatName
public static String getFormatName()
getFileNameSuffix
public static String getFileNameSuffix()