|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.core.converters.AbstractLoader | +--weka.core.converters.ArffLoader
Reads a source that is in arff text format.
Loader
,
Serialized FormField Summary | |
protected Instances |
m_structure
Holds the determined structure (header) of the data set. |
Fields inherited from class weka.core.converters.AbstractLoader |
BATCH, INCREMENTAL, m_Retrieval, NONE |
Constructor Summary | |
ArffLoader()
|
Method Summary | |
Instances |
getDataSet()
Return the full data set. |
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(String[] args)
Main method. |
void |
reset()
Resets the Loader ready to read a new data set |
void |
setSource(File file)
Resets the Loader object and sets the source of the data set to be the supplied File object. |
void |
setSource(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.AbstractLoader |
getRetrieval, setRetrieval |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Instances m_structure
Constructor Detail |
public ArffLoader()
Method Detail |
public void reset()
public void setSource(File file) throws IOException
setSource
in interface Loader
setSource
in class AbstractLoader
file
- the source file.
IOException
- if an error occurspublic void setSource(InputStream in) throws IOException
setSource
in interface Loader
setSource
in class AbstractLoader
in
- the source InputStream.
IOException
- always thrown.public Instances getStructure() throws IOException
getStructure
in interface Loader
getStructure
in class AbstractLoader
IOException
- if an error occurspublic Instances getDataSet() throws IOException
getDataSet
in interface Loader
getDataSet
in class AbstractLoader
IOException
- if there is no source or parsing failspublic Instance getNextInstance() throws IOException
getNextInstance
in interface Loader
getNextInstance
in class AbstractLoader
IOException
- if there is an error during parsingpublic static void main(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 |