类 CVParameterSelection
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.SingleClassifierEnhancer
weka.classifiers.RandomizableSingleClassifierEnhancer
weka.classifiers.meta.CVParameterSelection
- 所有已实现的接口:
Serializable
,Cloneable
,CapabilitiesHandler
,Drawable
,OptionHandler
,Randomizable
,RevisionHandler
,Summarizable
,TechnicalInformationHandler
public class CVParameterSelection
extends RandomizableSingleClassifierEnhancer
implements Drawable, Summarizable, TechnicalInformationHandler
Class for performing parameter selection by cross-validation for any classifier.
For more information, see:
R. Kohavi (1995). Wrappers for Performance Enhancement and Oblivious Decision Graphs. Department of Computer Science, Stanford University. BibTeX:
For more information, see:
R. Kohavi (1995). Wrappers for Performance Enhancement and Oblivious Decision Graphs. Department of Computer Science, Stanford University. BibTeX:
@phdthesis{Kohavi1995, address = {Department of Computer Science, Stanford University}, author = {R. Kohavi}, school = {Stanford University}, title = {Wrappers for Performance Enhancement and Oblivious Decision Graphs}, year = {1995} }Valid options are:
-X <number of folds> Number of folds used for cross validation (default 10).
-P <classifier parameter> Classifier parameter options. eg: "N 1 5 10" Sets an optimisation parameter for the classifier with name -N, with lower bound 1, upper bound 5, and 10 optimisation steps. The upper bound may be the character 'A' or 'I' to substitute the number of attributes or instances in the training data, respectively. This parameter may be supplied more than once to optimise over several classifier options simultaneously.
-S <num> Random number seed. (default 1)
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.rules.ZeroR)
Options specific to classifier weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the consoleOptions after -- are passed to the designated sub-classifier.
- 版本:
- $Revision: 8180 $
- 作者:
- Len Trigg (trigg@cs.waikato.ac.nz)
- 另请参阅:
-
字段概要
从接口继承的字段 weka.core.Drawable
BayesNet, Newick, NOT_DRAWABLE, TREE
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
addCVParameter
(String cvParam) Adds a scheme parameter to the list of parameters to be set by cross-validationvoid
buildClassifier
(Instances instances) Generates the classifier.Returns the tip text for this propertydouble[]
distributionForInstance
(Instance instance) Predicts the class distribution for the given test instance.String[]
Returns (a copy of) the best options found for the classifier.Returns default capabilities of the classifier.getCVParameter
(int index) Gets the scheme paramter with the given index.Object[]
Get method for CVParameters.int
Gets the number of folds for the cross-validation.String[]
Gets the current settings of the Classifier.Returns the revision string.Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.Returns a string describing this classifiergraph()
Returns graph describing the classifier (if possible).int
Returns the type of graph this classifier represents.Returns an enumeration describing the available options.static void
Main method for testing this class.Returns the tip text for this propertyvoid
setCVParameters
(Object[] params) Set method for CVParameters.void
setNumFolds
(int numFolds) Sets the number of folds for the cross-validation.void
setOptions
(String[] options) Parses a given list of options.toString()
Returns description of the cross-validated classifier.A concise description of the model.从类继承的方法 weka.classifiers.RandomizableSingleClassifierEnhancer
getSeed, seedTipText, setSeed
从类继承的方法 weka.classifiers.SingleClassifierEnhancer
classifierTipText, getClassifier, setClassifier
从类继承的方法 weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
构造器详细资料
-
CVParameterSelection
public CVParameterSelection()
-
-
方法详细资料
-
globalInfo
Returns a string describing this classifier- 返回:
- a description of the classifier suitable for displaying in the explorer/experimenter gui
-
getTechnicalInformation
Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.- 指定者:
getTechnicalInformation
在接口中TechnicalInformationHandler
- 返回:
- the technical information about this class
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中RandomizableSingleClassifierEnhancer
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:-X <number of folds> Number of folds used for cross validation (default 10).
-P <classifier parameter> Classifier parameter options. eg: "N 1 5 10" Sets an optimisation parameter for the classifier with name -N, with lower bound 1, upper bound 5, and 10 optimisation steps. The upper bound may be the character 'A' or 'I' to substitute the number of attributes or instances in the training data, respectively. This parameter may be supplied more than once to optimise over several classifier options simultaneously.
-S <num> Random number seed. (default 1)
-D If set, classifier is run in debug mode and may output additional info to the console
-W Full name of base classifier. (default: weka.classifiers.rules.ZeroR)
Options specific to classifier weka.classifiers.rules.ZeroR:
-D If set, classifier is run in debug mode and may output additional info to the console
Options after -- are passed to the designated sub-classifier.- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中RandomizableSingleClassifierEnhancer
- 参数:
options
- the list of options as an array of strings- 抛出:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the Classifier.- 指定者:
getOptions
在接口中OptionHandler
- 覆盖:
getOptions
在类中RandomizableSingleClassifierEnhancer
- 返回:
- an array of strings suitable for passing to setOptions
-
getBestClassifierOptions
Returns (a copy of) the best options found for the classifier.- 返回:
- the best options
-
getCapabilities
Returns default capabilities of the classifier.- 指定者:
getCapabilities
在接口中CapabilitiesHandler
- 覆盖:
getCapabilities
在类中SingleClassifierEnhancer
- 返回:
- the capabilities of this classifier
- 另请参阅:
-
buildClassifier
Generates the classifier.- 指定者:
buildClassifier
在类中Classifier
- 参数:
instances
- set of instances serving as training data- 抛出:
Exception
- if the classifier has not been generated successfully
-
distributionForInstance
Predicts the class distribution for the given test instance.- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
instance
- the instance to be classified- 返回:
- the predicted class value
- 抛出:
Exception
- if an error occurred during the prediction
-
addCVParameter
Adds a scheme parameter to the list of parameters to be set by cross-validation- 参数:
cvParam
- the string representation of a scheme parameter. The format is:
param_char lower_bound upper_bound number_of_steps
eg to search a parameter -P from 1 to 10 by increments of 1:
P 1 10 11- 抛出:
Exception
- if the parameter specifier is of the wrong format
-
getCVParameter
Gets the scheme paramter with the given index.- 参数:
index
- the index for the parameter- 返回:
- the scheme parameter
-
CVParametersTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getCVParameters
Get method for CVParameters.- 返回:
- the CVParameters
-
setCVParameters
Set method for CVParameters.- 参数:
params
- the CVParameters to use- 抛出:
Exception
- if the setting of the CVParameters fails
-
numFoldsTipText
Returns the tip text for this property- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
getNumFolds
public int getNumFolds()Gets the number of folds for the cross-validation.- 返回:
- the number of folds for the cross-validation
-
setNumFolds
Sets the number of folds for the cross-validation.- 参数:
numFolds
- the number of folds for the cross-validation- 抛出:
Exception
- if parameter illegal
-
graphType
public int graphType()Returns the type of graph this classifier represents. -
graph
Returns graph describing the classifier (if possible). -
toString
Returns description of the cross-validated classifier. -
toSummaryString
A concise description of the model.- 指定者:
toSummaryString
在接口中Summarizable
- 返回:
- a concise description of the model
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Main method for testing this class.- 参数:
argv
- the options
-