|
|||||||||||
| 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.SerializedInstancesLoader
Reads a source that contains serialized Instances.
Loader,
Serialized Form| Field Summary | |
static java.lang.String |
FILE_EXTENSION
|
| 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 |
Instance |
getNextInstance()
Read the data set incrementally---get the next instance in the data set or returns null if there are no more instances to get. |
Instances |
getStructure()
Determines and returns (if possible) the structure (internally the header) of the data set as an empty set of instances. |
static void |
main(java.lang.String[] args)
Main method. |
void |
reset()
Resets the Loader ready to read a new data set |
java.io.File |
retrieveFile()
get the File specified as the source |
void |
setFile(java.io.File file)
sets the source File |
void |
setSource(java.io.File file)
Resets the Loader object and sets the source of the data set to be the supplied File object. |
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 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 void reset()
public java.lang.String getFileExtension()
getFileExtension in interface FileSourcedConverterpublic java.lang.String getFileDescription()
getFileDescription in interface FileSourcedConverterpublic java.io.File retrieveFile()
retrieveFile in interface FileSourcedConverter
public void setFile(java.io.File file)
throws java.io.IOException
setFile in interface FileSourcedConverterfile - the source file
java.io.IOException - if an error occurs
public void setSource(java.io.File file)
throws java.io.IOException
setSource in interface LoadersetSource in class AbstractLoaderfile - the source file.
java.io.IOException - if an error occurs
public void setSource(java.io.InputStream in)
throws java.io.IOException
setSource in interface LoadersetSource in class AbstractLoaderin - the source InputStream.
java.io.IOException - if there is a problem with IO
public Instances getStructure()
throws java.io.IOException
getStructure in interface LoadergetStructure in class AbstractLoaderjava.io.IOException - if an error occurs
public Instances getDataSet()
throws java.io.IOException
getDataSet in interface LoadergetDataSet in class AbstractLoaderjava.io.IOException - if there is no source or parsing fails
public Instance getNextInstance()
throws java.io.IOException
getNextInstance in interface LoadergetNextInstance in class AbstractLoaderjava.io.IOException - if there is an error during parsingpublic 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 | ||||||||||