at.tuwien.ifs.somtoolbox.data
Class ARFFFormatInputData

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.data.AbstractSOMLibSparseInputData
      extended by at.tuwien.ifs.somtoolbox.data.SOMLibSparseInputData
          extended by at.tuwien.ifs.somtoolbox.data.ARFFFormatInputData
All Implemented Interfaces:
InputData
Direct Known Subclasses:
MarsyasARFFInputData

public class ARFFFormatInputData
extends SOMLibSparseInputData

Reads input data from a WEKA ARFF File Format.

Version:
$Id: ARFFFormatInputData.java 3587 2010-05-21 10:35:33Z mayer $
Author:
Rudolf Mayer

Field Summary
static String ATTRIBUTE
           
static String DATA
           
static String INTEGER_TYPE
           
private static char NULLCHAR
           
static String NUMERIC_TYPE
           
static String RELATION
           
static String STRING_TYPE
           
 
Fields inherited from class at.tuwien.ifs.somtoolbox.data.SOMLibSparseInputData
data, DEFAULT_NORMALISED, DEFAULT_NUM_CACHE_BLOCKS, DEFAULT_RANDOM_SEED, DEFAULT_SPARSE, INPUT_VECTOR_FILE_FORMAT_CORRUPT_MESSAGE, nonZeros, sparse
 
Fields inherited from class at.tuwien.ifs.somtoolbox.data.AbstractSOMLibSparseInputData
classInfo, content_subtype, content_type, 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
ARFFFormatInputData(String arffFileName)
           
ARFFFormatInputData(String arffFileName, boolean sparse, boolean norm, int numCacheBlocks, long seed)
           
 
Method Summary
protected  String getClassAttributeName()
           
static String getFileNameSuffix()
           
static String getFormatName()
           
protected  void readVectorFile(String arffFileName, boolean sparse)
          Reads the input data from the given file, which has to follow the Input Vector File specification.
 
Methods inherited from class at.tuwien.ifs.somtoolbox.data.SOMLibSparseInputData
addInstance, getDimensionality, getInputDatum, getInputVector, getValue, init, initDataStructures, initMatrix, main, mqe0, openFile, parseDouble, processLine, setLabel, setMatrixValue, subset
 
Methods inherited from class at.tuwien.ifs.somtoolbox.data.AbstractSOMLibSparseInputData
classInformation, create, dim, equals, getByNameDistanceSorted, getContentSubType, getContentType, getData, getData, getDataIntervals, getDataSource, getDistanceMatrix, getDistances, getFeatureDensities, getFeatureMatrixColumns, getFeatureMatrixRows, getInputDatum, getInputDatum, getInputDatumIndex, getLabel, getLabels, getMeanVector, getMeanVector, getNearestN, getNearestN, getNearestNUnsorted, getRandomInputDatum, initDistanceMatrix, isNormalizedToUnitLength, numVectors, setClassInfo, setTemplateVector, templateVector, transformValues
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RELATION

public static final String RELATION
See Also:
Constant Field Values

ATTRIBUTE

public static final String ATTRIBUTE
See Also:
Constant Field Values

DATA

public static final String DATA
See Also:
Constant Field Values

INTEGER_TYPE

public static final String INTEGER_TYPE
See Also:
Constant Field Values

NUMERIC_TYPE

public static final String NUMERIC_TYPE
See Also:
Constant Field Values

STRING_TYPE

public static final String STRING_TYPE
See Also:
Constant Field Values

NULLCHAR

private static final char NULLCHAR
See Also:
Constant Field Values
Constructor Detail

ARFFFormatInputData

public ARFFFormatInputData(String arffFileName)

ARFFFormatInputData

public ARFFFormatInputData(String arffFileName,
                           boolean sparse,
                           boolean norm,
                           int numCacheBlocks,
                           long seed)
Method Detail

readVectorFile

protected void readVectorFile(String arffFileName,
                              boolean sparse)
Description copied from class: SOMLibSparseInputData
Reads the input data from the given file, which has to follow the Input Vector File specification. Additionally calculates the AbstractSOMLibSparseInputData.meanVector and creates the AbstractSOMLibSparseInputData.nameCache for faster index search.

Overrides:
readVectorFile in class SOMLibSparseInputData
Parameters:
arffFileName - the name of the input vector file.

getClassAttributeName

protected String getClassAttributeName()

getFormatName

public static String getFormatName()

getFileNameSuffix

public static String getFileNameSuffix()