|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.tuwien.ifs.somtoolbox.data.distance.DistanceMatrixWriter
public class DistanceMatrixWriter
Writes the input matrix for a given data set to an ASCII or binary format. A distance matrix is of size
n*n
, where n
is the number of elements. The matrix is symmetric, i.e. the upper-right and
lower-left halves contain the same values. The diagonal contains the distances of one element to itself, and is thus
always 0.
Supported formats are:
AbstractMemoryInputVectorDistanceMatrix
)RandomAccessFileInputVectorDistanceMatrix
)
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface at.tuwien.ifs.somtoolbox.apps.SOMToolboxApp |
---|
SOMToolboxApp.Type |
Field Summary | |
---|---|
static SOMToolboxApp.Type |
APPLICATION_TYPE
|
private static String |
BINARY
Binary format (for RandomAccessFile |
static String |
DESCRIPTION
|
static String |
LONG_DESCRIPTION
|
private static com.martiansoftware.jsap.FlaggedOption |
OPT_CLASS_INFORMATION_FILE
|
static com.martiansoftware.jsap.Parameter[] |
OPTIONS
|
private static String |
ORANGE
Format for the Orange data mining tool (http://www.ailab.si/orange/) |
static String[] |
OUTPUT_FORMATS
|
private static String |
PLAIN
|
private static String |
SOM_LIB
SOMLib format (half-matrix) |
Fields inherited from interface at.tuwien.ifs.somtoolbox.apps.SOMToolboxApp |
---|
DEV_BY_STRING, HOMEPAGE, REQUIRED_MEMBERS, TYPE_GROUPED_COMPARATOR |
Constructor Summary | |
---|---|
DistanceMatrixWriter()
|
Method Summary | |
---|---|
static void |
main(String[] args)
|
private static PrintWriter |
printSOMLibHeader(int numVectors,
String fileName,
DistanceMetric metric,
boolean gzip)
|
static void |
writeOrangeFileInputVectorDistanceMatrix(InputData data,
String fileName,
DistanceMetric metric)
Write input distance matrix to an ASCII file for the Orange data mining toolkit ((http://www.ailab.si/orange/), computing distances on the fly. |
static void |
writePlainFileInputVectorDistanceMatrix(InputData data,
String fileName,
DistanceMetric metric)
Write input distance matrix to an ASCII file in plain format, computing distances on the fly. |
static void |
writeRandomAccessFileInputVectorDistanceMatrix(double[][] distances,
String fileName,
DistanceMetric metric)
Write pre-calculated input distance matrix to a binary file. |
static void |
writeRandomAccessFileInputVectorDistanceMatrix(InputData data,
String fileName,
DistanceMetric metric)
Write input distance matrix to a binary file, computing distances on the fly. |
static void |
writeSOMLibFileInputVectorDistanceMatrix(double[][] distances,
String fileName,
DistanceMetric metric,
boolean gzip)
Write pre-calculated input distance matrix to an ASCII file in SOMLib format. |
static void |
writeSOMLibFileInputVectorDistanceMatrix(InputData data,
String fileName,
DistanceMetric metric)
Write input distance matrix to ASCII file, computing distances on the fly. |
static void |
writeSOMLibFileInputVectorDistanceMatrix(InputData data,
String fileName,
DistanceMetric metric,
boolean gzip)
Write input distance matrix to ASCII file, computing distances on the fly. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final com.martiansoftware.jsap.FlaggedOption OPT_CLASS_INFORMATION_FILE
private static final String ORANGE
private static final String BINARY
RandomAccessFile
private static final String SOM_LIB
private static final String PLAIN
public static String[] OUTPUT_FORMATS
public static final SOMToolboxApp.Type APPLICATION_TYPE
public static final String DESCRIPTION
public static final String LONG_DESCRIPTION
public static final com.martiansoftware.jsap.Parameter[] OPTIONS
Constructor Detail |
---|
public DistanceMatrixWriter()
Method Detail |
---|
public static void main(String[] args) throws SOMToolboxException, IOException
SOMToolboxException
IOException
public static void writeSOMLibFileInputVectorDistanceMatrix(InputData data, String fileName, DistanceMetric metric) throws IOException, MetricException
IOException
MetricException
public static void writeSOMLibFileInputVectorDistanceMatrix(InputData data, String fileName, DistanceMetric metric, boolean gzip) throws IOException, MetricException
IOException
MetricException
public static void writePlainFileInputVectorDistanceMatrix(InputData data, String fileName, DistanceMetric metric) throws IOException, MetricException
IOException
MetricException
public static void writeOrangeFileInputVectorDistanceMatrix(InputData data, String fileName, DistanceMetric metric) throws IOException, MetricException
IOException
MetricException
public static void writeSOMLibFileInputVectorDistanceMatrix(double[][] distances, String fileName, DistanceMetric metric, boolean gzip) throws IOException, MetricException
IOException
MetricException
private static PrintWriter printSOMLibHeader(int numVectors, String fileName, DistanceMetric metric, boolean gzip) throws IOException
IOException
public static void writeRandomAccessFileInputVectorDistanceMatrix(InputData data, String fileName, DistanceMetric metric) throws IOException, MetricException
IOException
MetricException
public static void writeRandomAccessFileInputVectorDistanceMatrix(double[][] distances, String fileName, DistanceMetric metric) throws IOException, MetricException
IOException
MetricException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |