|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InputData
The 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.
Field Summary | |
---|---|
static String |
inputFileNameSuffix
|
static double |
MISSING_VALUE
|
Method Summary | |
---|---|
SOMLibClassInformation |
classInformation()
Gets the class info associated with this input data. |
int |
dim()
Gets the dimension of the input data. |
String |
getContentSubType()
Gets the content sub-type. |
String |
getContentType()
Gets the content type. |
double[][] |
getData()
Return the input data as a double array, i.e. |
double[][] |
getData(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 |
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(String label)
Get an input datum with a specified label. |
InputDatum[] |
getInputDatum(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 |
String |
getLabel(int index)
Return the label of the input vector at the given index. |
String[] |
getLabels()
Returns an array containing the labels of all the input data. |
cern.colt.matrix.DoubleMatrix1D |
getMeanVector()
Gets the mean vector of the input vectors. |
cern.colt.matrix.DoubleMatrix1D |
getMeanVector(String[] labels)
Returns mean vector of specified vectors provided by String[] array. |
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(String[] names)
Gets a subset of this input data set. |
TemplateVector |
templateVector()
Gets the template vector associated with this input data. |
Field Detail |
---|
static final double MISSING_VALUE
static final String inputFileNameSuffix
Method Detail |
---|
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(String label)
label
- the name of the input datum.
InputDatum[] getInputDatum(String[] labels)
labels
- the labels of the input data.
String[] getLabels()
String getLabel(int index)
cern.colt.matrix.DoubleMatrix1D getMeanVector()
cern.colt.matrix.DoubleMatrix1D getMeanVector(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(String[] names)
names
- the label names of the desired subset data.
double[][] getData()
double[][] getDataIntervals()
double getValue(int x, int y)
int getFeatureMatrixRows()
int getFeatureMatrixColumns()
String getContentType()
String getContentSubType()
void setClassInfo(SOMLibClassInformation classInfo)
double[][] getData(String className) throws SOMToolboxException
SOMToolboxException
- If no class information file is loadedString getDataSource()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |