|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.tuwien.ifs.somtoolbox.data.InputDataWriter
public class InputDataWriter
This class gathers methods to write certain InputData
, TemplateVector
and
SOMLibClassInformation
in a certain number of file formats, such as SOMLib, WEKA ARFF, SOMPak and ESOM.
Field Summary | |
---|---|
static String[] |
OUTPUT_FILE_FORMAT_TYPES
Supported Output File Format Types |
Constructor Summary | |
---|---|
InputDataWriter()
|
Method Summary | |
---|---|
static String |
getWekaClassHeader(String[] classNames)
|
static void |
write(String fName,
InputData data,
String outputFormat,
boolean tabSeparatedClassFile,
boolean skipInstanceNames,
boolean skipInputsWithoutClass)
|
static void |
writeAsCSV(InputData data,
String fileName)
|
static void |
writeAsESOM(InputData data,
String fileName)
Writes the data to ESOM lrn/cls format. |
static void |
writeAsESOM(SOMLibClassInformation classInfo,
String fileName)
Writes the class information as ESOM cls file. |
static void |
writeAsOrange(InputData data,
String fileName)
Writes input data in the tab-separated format used by the Orange data mining toolkit (see http://www.ailab.si/orange/) |
static void |
writeAsSOMLib(HashMap<String,String> classInfo,
HashSet<String> classNames,
String fileName)
Writes the class information to a file in SOMLib format. |
static void |
writeAsSOMLib(InputData data,
String fileName)
|
static void |
writeAsSOMLib(InputData data,
TemplateVector templateVector,
SOMLibClassInformation classInformation,
boolean tabSeparatedClassFile,
String basicFileName)
Writes the class information to a file. |
static void |
writeAsSOMLib(InputData data,
TemplateVector templateVector,
SOMLibClassInformation classInformation,
String basicFileName)
Writes the class information to a file. |
static void |
writeAsSOMLib(SOMLibClassInformation classInfo,
String fileName)
Writes the class information to a file in SOMLib format. |
static void |
writeAsSOMLib(TemplateVector tv,
String fileName)
|
static void |
writeAsSOMPAK(InputData data,
String fileName)
Writes input data in the SOMPAK format (see http://www.cis.hut.fi/projects/somtoolbox/package/docs2/som_read_data.html) |
static void |
writeAsWekaARFF(InputData data,
String fileName,
boolean writeInstanceNames,
boolean skipInputsWithoutClass)
Writes the data to Weka ARFF format. |
static void |
writeElementToFile(PrintWriter writer,
int i,
TemplateVectorElement e)
|
static void |
writeHeaderToFile(PrintWriter writer,
int numVectors,
int dim)
|
static void |
writeInputDatumToFile(PrintWriter writer,
InputDatum inputDatum)
|
static void |
writeInputDatumToFile(PrintWriter writer,
String label,
cern.colt.matrix.DoubleMatrix1D vector)
|
static void |
writeTempplateHeaderToFile(PrintWriter writer,
String fileName,
int numVectors,
int dim,
int numInfo)
|
static void |
writeToFileTabSeparated(SOMLibClassInformation classInfo,
String fileName)
Writes the class information to a tab-separated file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] OUTPUT_FILE_FORMAT_TYPES
Constructor Detail |
---|
public InputDataWriter()
Method Detail |
---|
public static void writeAsESOM(InputData data, String fileName) throws IOException, SOMLibFileFormatException
IOException
SOMLibFileFormatException
public static void writeAsESOM(SOMLibClassInformation classInfo, String fileName) throws IOException, SOMLibFileFormatException
IOException
SOMLibFileFormatException
public static void writeAsSOMLib(InputData data, String fileName) throws IOException
IOException
public static void writeAsSOMLib(InputData data, TemplateVector templateVector, SOMLibClassInformation classInformation, boolean tabSeparatedClassFile, String basicFileName) throws IOException, SOMLibFileFormatException
IOException
SOMLibFileFormatException
public static void writeAsSOMLib(InputData data, TemplateVector templateVector, SOMLibClassInformation classInformation, String basicFileName) throws IOException, SOMLibFileFormatException
IOException
SOMLibFileFormatException
public static void writeAsSOMLib(SOMLibClassInformation classInfo, String fileName) throws IOException, SOMLibFileFormatException
IOException
SOMLibFileFormatException
public static void writeAsSOMLib(HashMap<String,String> classInfo, HashSet<String> classNames, String fileName) throws IOException, SOMLibFileFormatException
IOException
SOMLibFileFormatException
public static void writeAsSOMLib(TemplateVector tv, String fileName) throws IOException
IOException
public static void writeElementToFile(PrintWriter writer, int i, TemplateVectorElement e)
public static void writeAsSOMPAK(InputData data, String fileName) throws IOException
IOException
public static void writeAsWekaARFF(InputData data, String fileName, boolean writeInstanceNames, boolean skipInputsWithoutClass) throws IOException, SOMToolboxException
IOException
SOMToolboxException
public static String getWekaClassHeader(String[] classNames)
public static void writeAsOrange(InputData data, String fileName) throws IOException
IOException
public static void writeAsCSV(InputData data, String fileName) throws IOException
IOException
public static void writeHeaderToFile(PrintWriter writer, int numVectors, int dim) throws IOException
IOException
public static void writeInputDatumToFile(PrintWriter writer, InputDatum inputDatum) throws IOException
IOException
public static void writeInputDatumToFile(PrintWriter writer, String label, cern.colt.matrix.DoubleMatrix1D vector) throws IOException
IOException
public static void writeTempplateHeaderToFile(PrintWriter writer, String fileName, int numVectors, int dim, int numInfo) throws IOException
IOException
public static void writeToFileTabSeparated(SOMLibClassInformation classInfo, String fileName) throws IOException, SOMLibFileFormatException
IOException
SOMLibFileFormatException
public static void write(String fName, InputData data, String outputFormat, boolean tabSeparatedClassFile, boolean skipInstanceNames, boolean skipInputsWithoutClass) throws IOException, SOMToolboxException
IOException
SOMToolboxException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |