类 MultiScheme
java.lang.Object
weka.classifiers.Classifier
weka.classifiers.MultipleClassifiersCombiner
weka.classifiers.RandomizableMultipleClassifiersCombiner
weka.classifiers.meta.MultiScheme
- 所有已实现的接口:
Serializable
,Cloneable
,CapabilitiesHandler
,OptionHandler
,Randomizable
,RevisionHandler
Class for selecting a classifier from among several using cross validation on the training data or the performance on the training data. Performance is measured based on percent correct (classification) or mean-squared error (regression).
Valid options are:
-X <number of folds> Use cross validation for model selection using the given number of folds. (default 0, is to use training error)
-S <num> Random number seed. (default 1)
-B <classifier specification> Full class name of classifier to include, followed by scheme options. May be specified multiple times. (default: "weka.classifiers.rules.ZeroR")
-D If set, classifier is run in debug mode and may output additional info to the console
- 版本:
- $Revision: 1.25 $
- 作者:
- Len Trigg (trigg@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances data) Buildclassifier selects a classifier from the set of classifiers by minimising error on the training data.Returns the tip text for this propertyReturns the tip text for this propertydouble[]
distributionForInstance
(Instance instance) Returns class probabilities.int
Get the index of the classifier that was determined as best during cross-validation.getClassifier
(int index) Gets a single classifier from the set of available classifiers.Gets the list of possible classifers to choose from.boolean
getDebug()
Get whether debugging is turned onint
Gets the number of folds for cross-validation.String[]
Gets the current settings of the Classifier.Returns the revision string.int
getSeed()
Gets the random number seed.Returns a string describing classifierReturns an enumeration describing the available options.static void
Main method for testing this class.Returns the tip text for this propertyReturns the tip text for this propertyvoid
setClassifiers
(Classifier[] classifiers) Sets the list of possible classifers to choose from.void
setDebug
(boolean debug) Set debugging modevoid
setNumFolds
(int numFolds) Sets the number of folds for cross-validation.void
setOptions
(String[] options) Parses a given list of options.void
setSeed
(int seed) Sets the seed for random number generation.toString()
Output a representation of this classifier从类继承的方法 weka.classifiers.MultipleClassifiersCombiner
getCapabilities
从类继承的方法 weka.classifiers.Classifier
classifyInstance, forName, makeCopies, makeCopy
-
构造器详细资料
-
MultiScheme
public MultiScheme()
-
-
方法详细资料
-
globalInfo
Returns a string describing classifier- 返回:
- a description suitable for displaying in the explorer/experimenter gui
-
listOptions
Returns an enumeration describing the available options.- 指定者:
listOptions
在接口中OptionHandler
- 覆盖:
listOptions
在类中RandomizableMultipleClassifiersCombiner
- 返回:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:-X <number of folds> Use cross validation for model selection using the given number of folds. (default 0, is to use training error)
-S <num> Random number seed. (default 1)
-B <classifier specification> Full class name of classifier to include, followed by scheme options. May be specified multiple times. (default: "weka.classifiers.rules.ZeroR")
-D If set, classifier is run in debug mode and may output additional info to the console
- 指定者:
setOptions
在接口中OptionHandler
- 覆盖:
setOptions
在类中RandomizableMultipleClassifiersCombiner
- 参数:
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
在类中RandomizableMultipleClassifiersCombiner
- 返回:
- an array of strings suitable for passing to setOptions
-
classifiersTipText
Returns the tip text for this property- 覆盖:
classifiersTipText
在类中MultipleClassifiersCombiner
- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setClassifiers
Sets the list of possible classifers to choose from.- 覆盖:
setClassifiers
在类中MultipleClassifiersCombiner
- 参数:
classifiers
- an array of classifiers with all options set.
-
getClassifiers
Gets the list of possible classifers to choose from.- 覆盖:
getClassifiers
在类中MultipleClassifiersCombiner
- 返回:
- the array of Classifiers
-
getClassifier
Gets a single classifier from the set of available classifiers.- 覆盖:
getClassifier
在类中MultipleClassifiersCombiner
- 参数:
index
- the index of the classifier wanted- 返回:
- the Classifier
-
seedTipText
Returns the tip text for this property- 覆盖:
seedTipText
在类中RandomizableMultipleClassifiersCombiner
- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setSeed
public void setSeed(int seed) Sets the seed for random number generation.- 指定者:
setSeed
在接口中Randomizable
- 覆盖:
setSeed
在类中RandomizableMultipleClassifiersCombiner
- 参数:
seed
- the random number seed
-
getSeed
public int getSeed()Gets the random number seed.- 指定者:
getSeed
在接口中Randomizable
- 覆盖:
getSeed
在类中RandomizableMultipleClassifiersCombiner
- 返回:
- the random number seed
-
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 cross-validation. A number less than 2 specifies using training error rather than cross-validation.- 返回:
- the number of folds for cross-validation
-
setNumFolds
public void setNumFolds(int numFolds) Sets the number of folds for cross-validation. A number less than 2 specifies using training error rather than cross-validation.- 参数:
numFolds
- the number of folds for cross-validation
-
debugTipText
Returns the tip text for this property- 覆盖:
debugTipText
在类中Classifier
- 返回:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setDebug
public void setDebug(boolean debug) Set debugging mode- 覆盖:
setDebug
在类中Classifier
- 参数:
debug
- true if debug output should be printed
-
getDebug
public boolean getDebug()Get whether debugging is turned on- 覆盖:
getDebug
在类中Classifier
- 返回:
- true if debugging output is on
-
getBestClassifierIndex
public int getBestClassifierIndex()Get the index of the classifier that was determined as best during cross-validation.- 返回:
- the index in the classifier array
-
buildClassifier
Buildclassifier selects a classifier from the set of classifiers by minimising error on the training data.- 指定者:
buildClassifier
在类中Classifier
- 参数:
data
- the training data to be used for generating the boosted classifier.- 抛出:
Exception
- if the classifier could not be built successfully
-
distributionForInstance
Returns class probabilities.- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
instance
- the instance to be classified- 返回:
- the distribution for the instance
- 抛出:
Exception
- if instance could not be classified successfully
-
toString
Output a representation of this classifier -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Main method for testing this class.- 参数:
argv
- should contain the following arguments: -t training file [-T test file] [-c class index]
-