at.tuwien.ifs.somtoolbox.data
Class MarsyasARFFInputData

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
              extended by at.tuwien.ifs.somtoolbox.data.MarsyasARFFInputData
All Implemented Interfaces:
InputData

public class MarsyasARFFInputData
extends ARFFFormatInputData

A reader for the Marsyas 0.2 ARFF format, which has the label name as a comment in front of the vector file name.

Version:
$Id: MarsyasARFFInputData.java 3589 2010-05-21 10:42:01Z mayer $
Author:
Rudolf Mayer

Field Summary
 
Fields inherited from class at.tuwien.ifs.somtoolbox.data.ARFFFormatInputData
ATTRIBUTE, DATA, INTEGER_TYPE, NUMERIC_TYPE, RELATION, 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
MarsyasARFFInputData(String arffFileName)
           
 
Method Summary
protected  String getClassAttributeName()
           
static String getFormatName()
           
static void main(String[] args)
           
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.ARFFFormatInputData
getFileNameSuffix
 
Methods inherited from class at.tuwien.ifs.somtoolbox.data.SOMLibSparseInputData
addInstance, getDimensionality, getInputDatum, getInputVector, getValue, init, initDataStructures, initMatrix, 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
 

Constructor Detail

MarsyasARFFInputData

public MarsyasARFFInputData(String arffFileName)
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 ARFFFormatInputData
Parameters:
arffFileName - the name of the input vector file.

getFormatName

public static String getFormatName()

main

public static void main(String[] args)

getClassAttributeName

protected String getClassAttributeName()
Overrides:
getClassAttributeName in class ARFFFormatInputData