|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.tuwien.ifs.somtoolbox.data.AbstractSOMLibSparseInputData
at.tuwien.ifs.somtoolbox.data.DataBaseSOMLibSparseInputData
public class DataBaseSOMLibSparseInputData
Implements InputData by reading the vector information from a database.
| Field Summary | |
|---|---|
private MySQLConnector |
dbConnector
|
| Fields inherited from class at.tuwien.ifs.somtoolbox.data.AbstractSOMLibSparseInputData |
|---|
classInfo, contentType, dataNames, dim, ERROR_MESSAGE_FILE_FORMAT_CORRUPT, featureMatrixCols, featureMatrixRows, isNormalized, meanVector, mqe0, nameCache, numVectors, rand, source, templateVector |
| Fields inherited from interface at.tuwien.ifs.somtoolbox.data.InputData |
|---|
inputFileNameSuffix, MISSING_VALUE |
| Constructor Summary | |
|---|---|
DataBaseSOMLibSparseInputData(MySQLConnector dbConnector,
boolean sparse,
boolean norm,
int numCacheBlocks,
long seed)
|
|
DataBaseSOMLibSparseInputData(MySQLConnector dbConnector,
boolean sparse,
String classInfoFileName,
boolean norm,
int numCacheBlocks,
long seed)
|
|
| Method Summary | |
|---|---|
protected void |
calculateMeanVector()
Initialise the mean-vector. |
private String |
getErrorMessage(Exception e)
|
InputDatum |
getInputDatum(int index)
Get an input datum with a specified index. |
double[] |
getInputVector(int d)
Get the vector for the input datum of the specified index |
double |
getValue(int x,
int y)
Returns the value of the y-th feature of input vector x. |
double |
mqe0(DistanceMetric metric)
Calculates the mean quantisation error of the top-level unit. |
private cern.colt.matrix.DoubleMatrix1D |
readVectorFromDataBase(int rowindex)
Read a vector from the database, identified by the given index. |
private void |
readVectorMetaDataFromDataBase()
Read input meta data from the database. |
InputData |
subset(String[] names)
TODO: this reads the whole subset into the memory. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private MySQLConnector dbConnector
| Constructor Detail |
|---|
public DataBaseSOMLibSparseInputData(MySQLConnector dbConnector,
boolean sparse,
boolean norm,
int numCacheBlocks,
long seed)
public DataBaseSOMLibSparseInputData(MySQLConnector dbConnector,
boolean sparse,
String classInfoFileName,
boolean norm,
int numCacheBlocks,
long seed)
throws SOMToolboxException
SOMToolboxException| Method Detail |
|---|
private void readVectorMetaDataFromDataBase()
numVectors())dim())dataNames)nameCache)getMeanVector())
public InputDatum getInputDatum(int index)
InputData
index - the index of the input datum.
public double[] getInputVector(int d)
InputData
private cern.colt.matrix.DoubleMatrix1D readVectorFromDataBase(int rowindex)
rowindex - the index of the vector.
public double mqe0(DistanceMetric metric)
InputData
metric - the metric to use for distance calculation.
public InputData subset(String[] names)
names - the label names of the desired subset data.
InputData.subset(java.lang.String[])
protected void calculateMeanVector()
throws SQLException
SQLExceptionprivate String getErrorMessage(Exception e)
public double getValue(int x,
int y)
InputData
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||