类 AbstractLoader
java.lang.Object
weka.core.converters.AbstractLoader
- 所有已实现的接口:
Serializable
,Loader
,RevisionHandler
Abstract class gives default implementation of setSource
methods. All other methods must be overridden.
- 版本:
- $Revision: 7454 $
- 作者:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
- 另请参阅:
-
字段概要
从接口继承的字段 weka.core.converters.Loader
BATCH, INCREMENTAL, NONE
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract Instances
Return the full data set.abstract 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.abstract Instances
Determines and returns (if possible) the structure (internally the header) of the data set as an empty set of instances.void
reset()
Default implementation sets retrieval mode to NONEvoid
setRetrieval
(int mode) Sets the retrieval mode.void
Default implementation throws an IOException.void
setSource
(InputStream input) Default implementation throws an IOException.从接口继承的方法 weka.core.RevisionHandler
getRevision
-
构造器详细资料
-
AbstractLoader
public AbstractLoader()
-
-
方法详细资料
-
setRetrieval
public void setRetrieval(int mode) Sets the retrieval mode.- 指定者:
setRetrieval
在接口中Loader
- 参数:
mode
- the retrieval mode
-
setSource
Default implementation throws an IOException.- 指定者:
setSource
在接口中Loader
- 参数:
file
- the File- 抛出:
IOException
- always
-
reset
Default implementation sets retrieval mode to NONE -
setSource
Default implementation throws an IOException.- 指定者:
setSource
在接口中Loader
- 参数:
input
- the input stream- 抛出:
IOException
- always
-
getStructure
从接口复制的说明:Loader
Determines and returns (if possible) the structure (internally the header) of the data set as an empty set of instances.- 指定者:
getStructure
在接口中Loader
- 返回:
- the structure of the data set as an empty set of Instances
- 抛出:
IOException
- if there is no source or parsing failspublic_normal_behavior requires: model_sourceSupplied == true && model_structureDetermined == false && (* successful parse *); modifiable: model_structureDetermined; ensures: \result != null && \result.numInstances() == 0 && model_structureDetermined == true; also public_exceptional_behavior requires: model_sourceSupplied == false || (* unsuccessful parse *); signals: (IOException);
-
getDataSet
从接口复制的说明:Loader
Return the full data set. If the structure hasn't yet been determined by a call to getStructure then the method should do so before processing the rest of the data set.- 指定者:
getDataSet
在接口中Loader
- 返回:
- the full data set as an Instances object
- 抛出:
IOException
- if there is an error during parsing or if getNextInstance has been called on this source (either incremental or batch loading can be used, not both).public_normal_behavior requires: model_sourceSupplied == true && (* successful parse *); modifiable: model_structureDetermined; ensures: \result != null && \result.numInstances() >= 0 && model_structureDetermined == true; also public_exceptional_behavior requires: model_sourceSupplied == false || (* unsuccessful parse *); signals: (IOException);
-
getNextInstance
从接口复制的说明:Loader
Read the data set incrementally---get the next instance in the data set or returns null if there are no more instances to get. If the structure hasn't yet been determined by a call to getStructure then method should do so before returning the next instance in the data set. If it is not possible to read the data set incrementally (ie. in cases where the data set structure cannot be fully established before all instances have been seen) then an exception should be thrown.- 指定者:
getNextInstance
在接口中Loader
- 参数:
structure
- the dataset header information, will get updated in case of string or relational attributes- 返回:
- the next instance in the data set as an Instance object or null if there are no more instances to be read
- 抛出:
IOException
- if there is an error during parsing or if getDataSet has been called on this source (either incremental or batch loading can be used, not both).
-