public interface InputData
InputData
provides the input vectors to be used for the training process of a Self-Organizing Map.
The data structure to read construct an InputData from is normally generated by a parser or vector generator program.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
inputFileNameSuffix |
static double |
MISSING_VALUE |
Modifier and Type | Method and Description |
---|---|
SOMLibClassInformation |
classInformation()
Gets the class info associated with this input data.
|
int |
dim()
Gets the dimension of the input data.
|
ContentType |
getContentType()
Gets the content type.
|
double[][] |
getData()
Return the input data as a double array, i.e.
|
double[][] |
getData(java.lang.String className)
Returns the vectors of all inputs associated with the given class name
|
double[][] |
getDataIntervals()
Return the min and max values for each feature, in a matrix of dim x 2
|
java.lang.String |
getDataSource()
returns the name/URI/etc.
|
int |
getFeatureMatrixColumns()
Gets the number of columns before vectorisation.
|
int |
getFeatureMatrixRows()
Gets the number of rows before vectorisation.
|
InputDatum |
getInputDatum(int d)
Get an input datum with a specified index.
|
InputDatum |
getInputDatum(java.lang.String label)
Get an input datum with a specified label.
|
InputDatum[] |
getInputDatum(java.lang.String[] labels)
Returns an array of input data with the specified labels.
|
double[] |
getInputVector(int d)
Get the vector for the input datum of the specified index
|
java.lang.String |
getLabel(int index)
Return the label of the input vector at the given index.
|
java.lang.String[] |
getLabels()
Returns an array containing the labels of all the input data.
|
double |
getMaxValue()
Return the maximum value in the input data.
|
cern.colt.matrix.DoubleMatrix1D |
getMeanVector()
Gets the mean vector of the input vectors.
|
cern.colt.matrix.DoubleMatrix1D |
getMeanVector(java.lang.String[] labels)
Returns mean vector of specified vectors provided by String[] array.
|
double |
getMinValue()
Return the minimum value in the input data.
|
InputDatum |
getRandomInputDatum(int iteration,
int numIterations)
Gets a random input sample from the input data set.
|
double |
getValue(int x,
int y)
Returns the value of the y-th feature of input vector x.
|
boolean |
isNormalizedToUnitLength()
Indicates whether this data set has been normalised to the unit length.
|
double |
mqe0(DistanceMetric metric)
Calculates the mean quantisation error of the top-level unit.
|
int |
numVectors()
Gives the size of this input data set.
|
void |
setClassInfo(SOMLibClassInformation classInfo) |
void |
setTemplateVector(TemplateVector templateVector)
Sets the template vector to be associated with this input data.
|
InputData |
subset(java.lang.String[] names)
Gets a subset of this input data set.
|
TemplateVector |
templateVector()
Gets the template vector associated with this input data.
|
static final double MISSING_VALUE
static final java.lang.String inputFileNameSuffix
boolean isNormalizedToUnitLength()
int dim()
int numVectors()
InputDatum getRandomInputDatum(int iteration, int numIterations)
InputDatum getInputDatum(int d)
d
- the index of the input datum.double[] getInputVector(int d)
InputDatum getInputDatum(java.lang.String label)
label
- the name of the input datum.InputDatum[] getInputDatum(java.lang.String[] labels)
labels
- the labels of the input data.java.lang.String[] getLabels()
java.lang.String getLabel(int index)
cern.colt.matrix.DoubleMatrix1D getMeanVector()
cern.colt.matrix.DoubleMatrix1D getMeanVector(java.lang.String[] labels)
labels
- label names of the input data.TemplateVector templateVector()
SOMLibClassInformation classInformation()
void setTemplateVector(TemplateVector templateVector)
templateVector
- the new template vector.double mqe0(DistanceMetric metric)
metric
- the metric to use for distance calculation.InputData subset(java.lang.String[] names)
names
- the label names of the desired subset data.double[][] getData()
double[][] getDataIntervals()
double getMinValue()
double getMaxValue()
double getValue(int x, int y)
int getFeatureMatrixRows()
int getFeatureMatrixColumns()
ContentType getContentType()
void setClassInfo(SOMLibClassInformation classInfo)
double[][] getData(java.lang.String className) throws SOMToolboxException
SOMToolboxException
- If no class information file is loadedjava.lang.String getDataSource()