public class SVMLightSaver extends AbstractFileSaver implements BatchConverter, IncrementalConverter
-i <the input file> The input file
-o <the output file> The output file
-c <class index> The class index (default: last)
Saver,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
FILE_EXTENSION
the file extension.
|
protected SingleIndex |
m_ClassIndex
the class index.
|
static int |
MAX_DIGITS
the number of digits after the decimal point.
|
m_env, m_incrementalCounter, m_useRelativePathCANCEL, m_retrieval, STRUCTURE_READY, WAIT, WRITEBATCH, INCREMENTAL, NONE| Constructor and Description |
|---|
SVMLightSaver()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
classIndexTipText()
Returns the tip text for this property.
|
Capabilities |
getCapabilities()
Returns the Capabilities of this saver.
|
String |
getClassIndex()
Get the index of the class attribute.
|
String |
getFileDescription()
Returns a description of the file type.
|
String[] |
getOptions()
returns the options of the current setup.
|
String |
getRevision()
Returns the revision string.
|
String |
globalInfo()
Returns a string describing this Saver.
|
protected String |
instanceToSvmlight(Instance inst)
turns the instance into a svm light row.
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] args)
Main method.
|
void |
resetOptions()
Resets the Saver.
|
void |
setClassIndex(String value)
Sets index of the class attribute.
|
void |
setInstances(Instances instances)
Sets instances that should be stored.
|
void |
setOptions(String[] options)
Parses the options for this object.
|
void |
writeBatch()
Writes a Batch of instances.
|
void |
writeIncremental(Instance inst)
Saves an instances incrementally.
|
cancel, filePrefix, getFileExtension, getFileExtensions, getUseRelativePath, getWriter, makeOptionStr, resetWriter, retrieveDir, retrieveFile, runFileSaver, setDestination, setDestination, setDir, setDirAndPrefix, setEnvironment, setFile, setFileExtension, setFilePrefix, setUseRelativePath, useRelativePathTipTextgetInstances, getRetrieval, getWriteMode, resetStructure, setRetrieval, setStructure, setWriteModepublic static String FILE_EXTENSION
public static int MAX_DIGITS
protected SingleIndex m_ClassIndex
public String globalInfo()
public Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class AbstractFileSaverpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class AbstractFileSaverpublic void setOptions(String[] options) throws Exception
-i <the input file> The input file
-o <the output file> The output file
-c <class index> The class index (default: last)
setOptions in interface OptionHandlersetOptions in class AbstractFileSaveroptions - the options to useException - if setting of options failspublic String getFileDescription()
getFileDescription in interface FileSourcedConvertergetFileDescription in class AbstractFileSaverpublic void resetOptions()
resetOptions in class AbstractFileSaverpublic String classIndexTipText()
public String getClassIndex()
public void setClassIndex(String value)
value - the index of the class attributepublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class AbstractSaverCapabilitiespublic void setInstances(Instances instances)
setInstances in interface SaversetInstances in class AbstractSaverinstances - the instancesprotected String instanceToSvmlight(Instance inst)
inst - the instance to transformpublic void writeIncremental(Instance inst) throws IOException
writeIncremental in interface SaverwriteIncremental in class AbstractSaverinst - the instance to saveIOException - throws IOEXception if an instance cannot be
saved incrementally.public void writeBatch()
throws IOException
writeBatch in interface SaverwriteBatch in class AbstractSaverIOException - throws IOException if saving in batch mode
is not possiblepublic String getRevision()
getRevision in interface RevisionHandlerpublic static void main(String[] args)
args - should contain the options of a Saver.Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.