public class C45Loader extends AbstractFileLoader implements BatchConverter, IncrementalConverter
Loader,
Serialized FormLoader.StructureNotReadyException| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FILE_EXTENSION
the file extension
|
FILE_EXTENSION_COMPRESSEDBATCH, INCREMENTAL, NONE| Constructor and Description |
|---|
C45Loader() |
| Modifier and Type | Method and Description |
|---|---|
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 attribute evaluator
|
static void |
main(java.lang.String[] args)
Main method for testing this class.
|
void |
reset()
Resets the Loader ready to read a new data set or the same data set again.
|
void |
setSource(java.io.File file)
Resets the Loader object and sets the source of the data set to be the
supplied File object.
|
getUseRelativePath, retrieveFile, runFileLoader, setEnvironment, setFile, setUseRelativePath, useRelativePathTipTextsetRetrieval, setSourcepublic java.lang.String globalInfo()
public void reset()
throws java.io.IOException
reset in interface Loaderreset in class AbstractFileLoaderjava.io.IOException - if something goes wrongpublic java.lang.String getFileExtension()
getFileExtension in interface FileSourcedConverterpublic java.lang.String[] getFileExtensions()
getFileExtensions in interface FileSourcedConverterpublic java.lang.String getFileDescription()
getFileDescription in interface FileSourcedConverterpublic void setSource(java.io.File file)
throws java.io.IOException
setSource in interface LoadersetSource in class AbstractFileLoaderfile - the source file.java.io.IOException - if an error occurspublic Instances getStructure() throws java.io.IOException
getStructure in interface LoadergetStructure in class AbstractLoaderjava.io.IOException - if an error occurspublic Instances getDataSet() throws java.io.IOException
getDataSet in interface LoadergetDataSet in class AbstractLoaderjava.io.IOException - if there is no source or parsing failspublic Instance getNextInstance(Instances structure) throws java.io.IOException
getNextInstance in interface LoadergetNextInstance in class AbstractLoaderstructure - the dataset header information, will get updated in case
of string or relational attributesjava.io.IOException - if there is an error during parsingpublic java.lang.String getRevision()
getRevision in interface RevisionHandlerpublic static void main(java.lang.String[] args)
args - should contain <filestem>[.names | data]