类 RandomCommittee
- 所有已实现的接口:
Serializable
,Cloneable
,CapabilitiesHandler
,OptionHandler
,Randomizable
,RevisionHandler
,WeightedInstancesHandler
public class RandomCommittee
extends RandomizableIteratedSingleClassifierEnhancer
implements WeightedInstancesHandler
Class for building an ensemble of randomizable base classifiers. Each base classifiers is built using a different random number seed (but based one the same data). The final prediction is a straight average of the predictions generated by the individual base classifiers.
Valid options are:
-S <num> Random number seed. (default 1)
-I <num> Number of iterations. (default 10)
-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.trees.RandomTree)
Options specific to classifier weka.classifiers.trees.RandomTree:
-K <number of attributes> Number of attributes to randomly investigate (<1 = int(log(#attributes)+1)).
-M <minimum number of instances> Set minimum number of instances per leaf.
-S <num> Seed for random number generator. (default 1)
-depth <num> The maximum depth of the tree, 0 for unlimited. (default 0)
-D If set, classifier is run in debug mode and may output additional info to the consoleOptions after -- are passed to the designated classifier.
- 版本:
- $Revision: 1.13 $
- 作者:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildClassifier
(Instances data) Builds the committee of randomizable classifiers.double[]
distributionForInstance
(Instance instance) Calculates the class membership probabilities for the given test instance.Returns the revision string.Returns a string describing classifierstatic void
Main method for testing this class.toString()
Returns description of the committee.从类继承的方法 weka.classifiers.RandomizableIteratedSingleClassifierEnhancer
getOptions, getSeed, listOptions, seedTipText, setOptions, setSeed
从类继承的方法 weka.classifiers.IteratedSingleClassifierEnhancer
getNumIterations, numIterationsTipText, setNumIterations
从类继承的方法 weka.classifiers.SingleClassifierEnhancer
classifierTipText, getCapabilities, getClassifier, setClassifier
从类继承的方法 weka.classifiers.Classifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug
-
构造器详细资料
-
RandomCommittee
public RandomCommittee()Constructor.
-
-
方法详细资料
-
globalInfo
Returns a string describing classifier- 返回:
- a description suitable for displaying in the explorer/experimenter gui
-
buildClassifier
Builds the committee of randomizable classifiers.- 覆盖:
buildClassifier
在类中IteratedSingleClassifierEnhancer
- 参数:
data
- the training data to be used for generating the bagged classifier.- 抛出:
Exception
- if the classifier could not be built successfully
-
distributionForInstance
Calculates the class membership probabilities for the given test instance.- 覆盖:
distributionForInstance
在类中Classifier
- 参数:
instance
- the instance to be classified- 返回:
- preedicted class probability distribution
- 抛出:
Exception
- if distribution can't be computed successfully
-
toString
Returns description of the committee. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中Classifier
- 返回:
- the revision
-
main
Main method for testing this class.- 参数:
argv
- the options
-