Class LibSVMSpreadSheetReader

  • All Implemented Interfaces:
    adams.core.AdditionalInformationHandler, adams.core.Destroyable, adams.core.ErrorProvider, adams.core.GlobalInfoSupporter, adams.core.io.EncodingSupporter, adams.core.io.FileFormatHandler, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, adams.core.Stoppable, adams.core.StoppableWithFeedback, adams.data.io.input.SpreadSheetReader, adams.data.spreadsheet.DataRowTypeHandler, adams.data.spreadsheet.SpreadSheetTypeHandler, Serializable

    public class LibSVMSpreadSheetReader
    extends AbstractWekaSpreadSheetReader
    Reads WEKA datasets in LibSVM format and turns them into spreadsheets.

    Valid options are:

    -D <int> (property: debugLevel)
        The greater the number the more additional info the scheme may output to 
        the console (0 = off).
        default: 0
        minimum: 0
     
    -data-row-type <DENSE|SPARSE> (property: dataRowType)
        The type of row to use for the data.
        default: DENSE
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class adams.data.io.input.AbstractSpreadSheetReader

        adams.data.io.input.AbstractSpreadSheetReader.InputType
    • Field Summary

      • Fields inherited from class adams.data.io.input.AbstractSpreadSheetReader

        m_DataRowType, m_Encoding, m_LastError, m_SpreadSheetType, m_Stopped, OPTION_INPUT, OPTION_OUTPUT
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      adams.data.io.output.SpreadSheetWriter getCorrespondingWriter()
      Returns, if available, the corresponding writer.
      String globalInfo()
      Returns a string describing the object.
      static void main​(String[] args)
      Runs the reader from the command-line.
      protected weka.core.converters.AbstractFileLoader newLoader()
      Returns an instance of the file loader.
      • Methods inherited from class adams.data.io.input.AbstractSpreadSheetReader

        canDecompress, check, dataRowTypeTipText, defineOptions, doRead, doRead, encodingTipText, getAdditionalInformation, getDataRowType, getDefaultDataRowType, getDefaultFormatExtension, getDefaultSpreadSheet, getEncoding, getLastError, getReaders, getSpreadSheetType, hasLastError, isStopped, read, read, read, read, runReader, setDataRowType, setEncoding, setLastError, setSpreadSheetType, spreadSheetTypeTipText, stopExecution, supportsCompressedInput
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.Destroyable

        destroy
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
      • Methods inherited from interface adams.core.option.OptionHandler

        cleanUpOptions, getOptionManager, toCommandLine
    • Constructor Detail

      • LibSVMSpreadSheetReader

        public LibSVMSpreadSheetReader()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • getCorrespondingWriter

        public adams.data.io.output.SpreadSheetWriter getCorrespondingWriter()
        Returns, if available, the corresponding writer.
        Returns:
        the writer, null if none available
      • newLoader

        protected weka.core.converters.AbstractFileLoader newLoader()
        Returns an instance of the file loader.
        Specified by:
        newLoader in class AbstractWekaSpreadSheetReader
        Returns:
        the file loader
      • main

        public static void main​(String[] args)
        Runs the reader from the command-line. Use the option AbstractSpreadSheetReader.OPTION_INPUT to specify the input file. If the option AbstractSpreadSheetReader.OPTION_OUTPUT is specified then the read sheet gets output as .csv files in that directory.
        Parameters:
        args - the command-line options to use