程序包 weka.core
类 FindWithCapabilities
java.lang.Object
weka.core.FindWithCapabilities
- 所有已实现的接口:
CapabilitiesHandler
,OptionHandler
,RevisionHandler
public class FindWithCapabilities
extends Object
implements OptionHandler, CapabilitiesHandler, RevisionHandler
Locates all classes with certain capabilities. One should keep in mind,
that works only with the default capabilities of a scheme and doesn't
take dependencies into account. E.g., a meta-classifier that could have
a base classifier handling numeric classes, but by default uses one with
a nominal class, will never show up in a search for schemes that handle
numeric classes.
Valid options are:
All class and attribute options can be prefixed with 'not', e.g., '-not-numeric-class'. This makes sure that the returned schemes 'cannot' handle numeric classes.
-num-instances <num> The minimum number of instances (default 1).
-unary-class Must handle unray classes.
-binary-class Must handle binary classes.
-nominal-class Must handle nominal classes.
-numeric-class Must handle numeric classes.
-string-class Must handle string classes.
-date-class Must handle date classes.
-relational-class Must handle relational classes.
-missing-class-values Must handle missing class values.
-no-class Doesn't need a class.
-unary-atts Must handle unary attributes.
-binary-atts Must handle binary attributes.
-nominal-atts Must handle nominal attributes.
-numeric-atts Must handle numeric attributes.
-string-atts Must handle string attributes.
-date-atts Must handle date attributes.
-relational-atts Must handle relational attributes.
-missing-att-values Must handle missing attribute values.
-only-multiinstance Must handle multi-instance data.
-W <classname> The Capabilities handler to base the handling on. The other parameters can be used to override the ones determined from the handler. Additional parameters for handler can be passed on after the '--'. Either '-W' or '-t' can be used.
-t <file> The dataset to base the capabilities on. The other parameters can be used to override the ones determined from the handler. Either '-t' or '-W' can be used.
-c <num> The index of the class attribute, -1 for none. 'first' and 'last' are also valid. Only in conjunction with option '-t'.
-superclass Superclass to look for in the packages.
-packages Comma-separated list of packages to search in.
-generic Retrieves the package list from the GenericPropertiesCreator for the given superclass. (overrides -packages <list>).
-misses Also prints the classname that didn't match the criteria.
- 版本:
- $Revision: 1.5 $
- 作者:
- fracpete (fracpete at waikato dot ac dot nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
disables the given capability.void
disables the given "not to have" capability.void
enables the given capability.void
enables the given "not to have" capability.find()
returns a list with all the classnames that fit the criteria.The capabilities to search for.returns the current current class index, -1 if no class attribute.returns the current filename for the dataset to base the capabilities on.returns the current set CapabilitiesHandler to generate the dataset for, can be null.returns the matches from the last find call.returns the misses from the last find call.The "not to have" capabilities to search for.String[]
Gets the current settings of this object.Returns the revision string.boolean
returns true if the given capability can be handled.boolean
whether the given capability is enabled.boolean
whether the given "not to have" capability is enabled.Returns an enumeration describing the available options.static void
Executes the location of classes with parameters from the commandline.void
Uses the given Capabilities for the search.void
setClassIndex
(String value) sets the class index, -1 for none, first and last are also valid.void
setFilename
(String value) Sets the dataset filename to base the capabilities on.void
setHandler
(CapabilitiesHandler value) sets the Capabilities handler to generate the data for.void
Uses the given "not to have" Capabilities for the search.void
setOptions
(String[] options) Parses a given list of options.
-
构造器详细资料
-
FindWithCapabilities
public FindWithCapabilities()
-
-
方法详细资料
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options.- 指定者:
setOptions
在接口中OptionHandler
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of this object.- 指定者:
getOptions
在接口中OptionHandler
- 返回:
- an array of strings suitable for passing to setOptions
-
setHandler
sets the Capabilities handler to generate the data for.- 参数:
value
- the handler
-
getHandler
returns the current set CapabilitiesHandler to generate the dataset for, can be null.- 返回:
- the handler
-
setFilename
Sets the dataset filename to base the capabilities on. It immediately loads the dataset and retrieves the capabilities from it.- 参数:
value
- the filename of the dataset
-
getFilename
returns the current filename for the dataset to base the capabilities on.- 返回:
- the filename of the dataset
-
setClassIndex
sets the class index, -1 for none, first and last are also valid.- 参数:
value
- the class index
-
getClassIndex
returns the current current class index, -1 if no class attribute.- 返回:
- the class index
-
enable
enables the given capability.- 参数:
c
- the capability to enable
-
isEnabled
whether the given capability is enabled.- 参数:
c
- the capability to enable- 返回:
- true if the capability is enabled
-
disable
disables the given capability.- 参数:
c
- the capability to disable
-
enableNot
enables the given "not to have" capability.- 参数:
c
- the capability to enable
-
isEnabledNot
whether the given "not to have" capability is enabled.- 参数:
c
- the capability to enable- 返回:
- true if the capability is enabled
-
disableNot
disables the given "not to have" capability.- 参数:
c
- the capability to disable
-
handles
returns true if the given capability can be handled.- 参数:
c
- the capability to check- 返回:
- true if the capability can be handled
-
getCapabilities
The capabilities to search for.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 返回:
- the capabilities to search for
- 另请参阅:
-
setCapabilities
Uses the given Capabilities for the search.- 参数:
c
- the capabilities to use for the search
-
getNotCapabilities
The "not to have" capabilities to search for.- 返回:
- the capabilities to search for
- 另请参阅:
-
setNotCapabilities
Uses the given "not to have" Capabilities for the search.- 参数:
c
- the capabilities to use for the search
-
getMatches
returns the matches from the last find call.- 返回:
- the matching classname from the last find run
-
getMisses
returns the misses from the last find call.- 返回:
- the classnames that didn't match from the last find run
-
find
returns a list with all the classnames that fit the criteria.- 返回:
- contains all classnames that fit the criteria
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-
main
Executes the location of classes with parameters from the commandline.- 参数:
args
- the commandline parameters
-