|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.converters.AbstractLoader
weka.core.converters.AbstractFileLoader
weka.core.converters.SerializedInstancesLoader
public class SerializedInstancesLoader
Reads a source that contains serialized Instances.
Loader
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
FILE_EXTENSION
the file extension |
Fields inherited from class weka.core.converters.AbstractFileLoader |
---|
FILE_EXTENSION_COMPRESSED |
Fields inherited from interface weka.core.converters.Loader |
---|
BATCH, INCREMENTAL, NONE |
Constructor Summary | |
---|---|
SerializedInstancesLoader()
|
Method Summary | |
---|---|
Instances |
getDataSet()
Return the full data set. |
java.lang.String |
getFileDescription()
Returns a description of the file type. |
java.lang.String |
getFileExtension()
Get the file extension used for arff files |
java.lang.String[] |
getFileExtensions()
Gets all the file extensions used for this type of file |
Instance |
getNextInstance(Instances structure)
Read the data set incrementally---get the next instance in the data set or returns null if there are no more instances to get. |
java.lang.String |
getRevision()
Returns the revision string. |
Instances |
getStructure()
Determines and returns (if possible) the structure (internally the header) of the data set as an empty set of instances. |
java.lang.String |
globalInfo()
Returns a string describing this object |
static void |
main(java.lang.String[] args)
Main method. |
void |
reset()
Resets the Loader ready to read a new data set |
void |
setSource(java.io.InputStream in)
Resets the Loader object and sets the source of the data set to be the supplied InputStream. |
Methods inherited from class weka.core.converters.AbstractFileLoader |
---|
getUseRelativePath, retrieveFile, runFileLoader, setEnvironment, setFile, setSource, setUseRelativePath, useRelativePathTipText |
Methods inherited from class weka.core.converters.AbstractLoader |
---|
setRetrieval |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String FILE_EXTENSION
Constructor Detail |
---|
public SerializedInstancesLoader()
Method Detail |
---|
public java.lang.String globalInfo()
public void reset()
reset
in interface Loader
reset
in class AbstractFileLoader
public java.lang.String getFileExtension()
getFileExtension
in interface FileSourcedConverter
public java.lang.String[] getFileExtensions()
getFileExtensions
in interface FileSourcedConverter
public java.lang.String getFileDescription()
getFileDescription
in interface FileSourcedConverter
public void setSource(java.io.InputStream in) throws java.io.IOException
setSource
in interface Loader
setSource
in class AbstractLoader
in
- the source InputStream.
java.io.IOException
- if there is a problem with IOpublic Instances getStructure() throws java.io.IOException
getStructure
in interface Loader
getStructure
in class AbstractLoader
java.io.IOException
- if an error occurspublic Instances getDataSet() throws java.io.IOException
getDataSet
in interface Loader
getDataSet
in class AbstractLoader
java.io.IOException
- if there is no source or parsing failspublic Instance getNextInstance(Instances structure) throws java.io.IOException
getNextInstance
in interface Loader
getNextInstance
in class AbstractLoader
structure
- ignored
java.io.IOException
- if there is an error during parsingpublic java.lang.String getRevision()
getRevision
in interface RevisionHandler
public static void main(java.lang.String[] args)
args
- should contain the name of an input file.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |