public class RandomCommittee extends RandomizableParallelIteratedSingleClassifierEnhancer implements WeightedInstancesHandler
-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.
Constructor and Description |
---|
RandomCommittee()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
buildClassifier(Instances data)
Builds the committee of randomizable classifiers.
|
double[] |
distributionForInstance(Instance instance)
Calculates the class membership probabilities for the given test
instance.
|
String |
getRevision()
Returns the revision string.
|
String |
globalInfo()
Returns a string describing classifier
|
static void |
main(String[] argv)
Main method for testing this class.
|
String |
toString()
Returns description of the committee.
|
getOptions, getSeed, listOptions, seedTipText, setOptions, setSeed
getNumExecutionSlots, numExecutionSlotsTipText, setNumExecutionSlots
getNumIterations, numIterationsTipText, setNumIterations
classifierTipText, getCapabilities, getClassifier, setClassifier
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebug
public String globalInfo()
public void buildClassifier(Instances data) throws Exception
buildClassifier
in interface Classifier
buildClassifier
in class ParallelIteratedSingleClassifierEnhancer
data
- the training data to be used for generating the
bagged classifier.Exception
- if the classifier could not be built successfullypublic double[] distributionForInstance(Instance instance) throws Exception
distributionForInstance
in interface Classifier
distributionForInstance
in class AbstractClassifier
instance
- the instance to be classifiedException
- if distribution can't be computed successfullypublic String toString()
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractClassifier
public static void main(String[] argv)
argv
- the optionsCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.