public class RandomSubSpace extends RandomizableParallelIteratedSingleClassifierEnhancer implements WeightedInstancesHandler, TechnicalInformationHandler
@article{Ho1998,
author = {Tin Kam Ho},
journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
number = {8},
pages = {832-844},
title = {The Random Subspace Method for Constructing Decision Forests},
volume = {20},
year = {1998},
ISSN = {0162-8828},
URL = {http://citeseer.ist.psu.edu/ho98random.html}
}
Valid options are:
-P Size of each subspace: < 1: percentage of the number of attributes >=1: absolute number of attributes
-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.REPTree)
Options specific to classifier weka.classifiers.trees.REPTree:
-M <minimum number of instances> Set minimum number of instances per leaf (default 2).
-V <minimum variance for split> Set minimum numeric class variance proportion of train variance for split (default 1e-3).
-N <number of folds> Number of folds for reduced error pruning (default 3).
-S <seed> Seed for random data shuffling (default 1).
-P No pruning.
-L Maximum tree depth (default -1, no maximum)Options after -- are passed to the designated classifier.
| Constructor and Description |
|---|
RandomSubSpace()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
buildClassifier(Instances data)
builds the classifier.
|
double[] |
distributionForInstance(Instance instance)
Calculates the class membership probabilities for the given test
instance.
|
String[] |
getOptions()
Gets the current settings of the Classifier.
|
String |
getRevision()
Returns the revision string.
|
double |
getSubSpaceSize()
Gets the size of each subSpace, as a percentage of the training set size.
|
TechnicalInformation |
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.
|
String |
globalInfo()
Returns a string describing classifier
|
Enumeration |
listOptions()
Returns an enumeration describing the available options.
|
static void |
main(String[] args)
Main method for testing this class.
|
void |
setOptions(String[] options)
Parses a given list of options.
|
void |
setSubSpaceSize(double value)
Sets the size of each subSpace, as a percentage of the training set size.
|
String |
subSpaceSizeTipText()
Returns the tip text for this property
|
String |
toString()
Returns description of the bagged classifier.
|
getSeed, seedTipText, setSeedgetNumExecutionSlots, numExecutionSlotsTipText, setNumExecutionSlotsgetNumIterations, numIterationsTipText, setNumIterationsclassifierTipText, getCapabilities, getClassifier, setClassifierclassifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebugpublic String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic Enumeration listOptions()
listOptions in interface OptionHandlerlistOptions in class RandomizableParallelIteratedSingleClassifierEnhancerpublic void setOptions(String[] options) throws Exception
-P Size of each subspace: < 1: percentage of the number of attributes >=1: absolute number of attributes
-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.REPTree)
Options specific to classifier weka.classifiers.trees.REPTree:
-M <minimum number of instances> Set minimum number of instances per leaf (default 2).
-V <minimum variance for split> Set minimum numeric class variance proportion of train variance for split (default 1e-3).
-N <number of folds> Number of folds for reduced error pruning (default 3).
-S <seed> Seed for random data shuffling (default 1).
-P No pruning.
-L Maximum tree depth (default -1, no maximum)Options after -- are passed to the designated classifier.
setOptions in interface OptionHandlersetOptions in class RandomizableParallelIteratedSingleClassifierEnhanceroptions - the list of options as an array of stringsException - if an option is not supportedpublic String[] getOptions()
getOptions in interface OptionHandlergetOptions in class RandomizableParallelIteratedSingleClassifierEnhancerpublic String subSpaceSizeTipText()
public double getSubSpaceSize()
public void setSubSpaceSize(double value)
value - the subSpace size, as a percentage.public void buildClassifier(Instances data) throws Exception
buildClassifier in interface ClassifierbuildClassifier in class ParallelIteratedSingleClassifierEnhancerdata - the training data to be used for generating the
classifier.Exception - if the classifier could not be built successfullypublic double[] distributionForInstance(Instance instance) throws Exception
distributionForInstance in interface ClassifierdistributionForInstance in class AbstractClassifierinstance - the instance to be classifiedException - if distribution can't be computed successfullypublic String toString()
public String getRevision()
getRevision in interface RevisionHandlergetRevision in class AbstractClassifierpublic static void main(String[] args)
args - the optionsCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.