类 LibSVMSaver

所有已实现的接口:
Serializable, CapabilitiesHandler, BatchConverter, FileSourcedConverter, IncrementalConverter, Saver, EnvironmentHandler, OptionHandler, RevisionHandler

public class LibSVMSaver extends AbstractFileSaver implements BatchConverter, IncrementalConverter
Writes to a destination that is in libsvm format.

For more information about libsvm see:

http://www.csie.ntu.edu.tw/~cjlin/libsvm/

Valid options are:

 -i <the input file>
  The input file
 -o <the output file>
  The output file
 -c <class index>
  The class index
  (default: last)
版本:
$Revision: 8011 $
作者:
FracPete (fracpete at waikato dot ac dot nz)
另请参阅:
  • 字段详细资料

    • FILE_EXTENSION

      public static String FILE_EXTENSION
      the file extension
  • 构造器详细资料

    • LibSVMSaver

      public LibSVMSaver()
      Constructor
  • 方法详细资料

    • globalInfo

      public String globalInfo()
      Returns a string describing this Saver
      返回:
      a description of the Saver suitable for displaying in the explorer/experimenter gui
    • listOptions

      public Enumeration listOptions()
      Returns an enumeration describing the available options.
      指定者:
      listOptions 在接口中 OptionHandler
      覆盖:
      listOptions 在类中 AbstractFileSaver
      返回:
      an enumeration of all the available options.
    • getOptions

      public String[] getOptions()
      returns the options of the current setup
      指定者:
      getOptions 在接口中 OptionHandler
      覆盖:
      getOptions 在类中 AbstractFileSaver
      返回:
      the current options
    • setOptions

      public void setOptions(String[] options) throws Exception
      Parses the options for this object.

      Valid options are:

       -i <the input file>
        The input file
       -o <the output file>
        The output file
       -c <class index>
        The class index
        (default: last)
      指定者:
      setOptions 在接口中 OptionHandler
      覆盖:
      setOptions 在类中 AbstractFileSaver
      参数:
      options - the options to use
      抛出:
      Exception - if setting of options fails
    • getFileDescription

      public String getFileDescription()
      Returns a description of the file type.
      指定者:
      getFileDescription 在接口中 FileSourcedConverter
      指定者:
      getFileDescription 在类中 AbstractFileSaver
      返回:
      a short file description
    • resetOptions

      public void resetOptions()
      Resets the Saver
      覆盖:
      resetOptions 在类中 AbstractFileSaver
    • classIndexTipText

      public String classIndexTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • getClassIndex

      public String getClassIndex()
      Get the index of the class attribute.
      返回:
      the index of the class attribute
    • setClassIndex

      public void setClassIndex(String value)
      Sets index of the class attribute.
      参数:
      value - the index of the class attribute
    • getCapabilities

      public Capabilities getCapabilities()
      Returns the Capabilities of this saver.
      指定者:
      getCapabilities 在接口中 CapabilitiesHandler
      覆盖:
      getCapabilities 在类中 AbstractSaver
      返回:
      the capabilities of this object
      另请参阅:
    • setInstances

      public void setInstances(Instances instances)
      Sets instances that should be stored.
      指定者:
      setInstances 在接口中 Saver
      覆盖:
      setInstances 在类中 AbstractSaver
      参数:
      instances - the instances
    • writeIncremental

      public void writeIncremental(Instance inst) throws IOException
      Saves an instances incrementally. Structure has to be set by using the setStructure() method or setInstances() method.
      指定者:
      writeIncremental 在接口中 Saver
      覆盖:
      writeIncremental 在类中 AbstractSaver
      参数:
      inst - the instance to save
      抛出:
      IOException - throws IOEXception if an instance cannot be saved incrementally.
    • writeBatch

      public void writeBatch() throws IOException
      Writes a Batch of instances
      指定者:
      writeBatch 在接口中 Saver
      指定者:
      writeBatch 在类中 AbstractSaver
      抛出:
      IOException - throws IOException if saving in batch mode is not possible
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      返回:
      the revision
    • main

      public static void main(String[] args)
      Main method.
      参数:
      args - should contain the options of a Saver.