|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.AbstractClassifier
weka.classifiers.RandomizableClassifier
weka.classifiers.trees.ExtraTree
public class ExtraTree
Class for generating a single Extra-Tree. Use with the RandomCommittee meta classifier to generate an Extra-Trees forest for classification or regression. This classifier requires all predictors to be numeric. Missing values are not allowed. Instance weights are taken into account. For more information, see
Pierre Geurts, Damien Ernst, Louis Wehenkel (2006). Extremely randomized trees. Machine Learning. 63(1):3-42.
@article{Geurts2006, author = {Pierre Geurts and Damien Ernst and Louis Wehenkel}, journal = {Machine Learning}, number = {1}, pages = {3-42}, title = {Extremely randomized trees}, volume = {63}, year = {2006} }Valid options are:
-K <number of attributes> Number of attributes to randomly choose at a node. If values is -1, (m - 1) will be used for regression problems, and Math.rint(sqrt(m - 1)) for classification problems, where m is the number of predictors, as specified in Geurts et al. (default -1).
-N <minimum number of instances> The minimum number of instances required at a node for splitting to be considered. If value is -1, 5 will be used for regression problems and 2 for classification problems, as specified in Geurts et al. (default -1).
-S <num> Random number seed. (default 1)
-D If set, classifier is run in debug mode and may output additional info to the console
Constructor Summary | |
---|---|
ExtraTree()
|
Method Summary | |
---|---|
void |
buildClassifier(Instances data)
Builds one tree. |
double[] |
distributionForInstance(Instance inst)
Returns the distribution. |
void |
generatePartition(Instances data)
Builds the classifier to generate a partition. |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
int |
getK()
Get the value of K. |
double[] |
getMembershipValues(Instance instance)
Computes array that indicates node membership. |
int |
getNmin()
Get the value of n_min. |
java.lang.String[] |
getOptions()
Gets options from this classifier. |
java.lang.String |
getRevision()
Returns the revision string. |
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. |
java.lang.String |
globalInfo()
Returns a string describing classifier |
java.lang.String |
kTipText()
Returns the tip text for this property |
java.util.Enumeration |
listOptions()
Lists the command-line options for this classifier. |
static void |
main(java.lang.String[] args)
Main method for this class. |
java.lang.String |
nminTipText()
Returns the tip text for this property |
int |
numElements()
Returns the number of elements in the partition. |
void |
setK(int k)
Set the value of K. |
void |
setNmin(int n)
Set the value of n_min. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
java.lang.String |
toString()
Returns classifier description. |
Methods inherited from class weka.classifiers.RandomizableClassifier |
---|
getSeed, seedTipText, setSeed |
Methods inherited from class weka.classifiers.AbstractClassifier |
---|
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, runClassifier, setDebug |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExtraTree()
Method Detail |
---|
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public java.lang.String kTipText()
public int getK()
public void setK(int k)
k
- value to assign to K.public java.lang.String nminTipText()
public int getNmin()
public void setNmin(int n)
k
- value to assign to n_min.public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class RandomizableClassifier
public java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class RandomizableClassifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-K <number of attributes> Number of attributes to randomly choose at a node. If values is -1, (m - 1) will be used for regression problems, and Math.rint(sqrt(m - 1)) for classification problems, where m is the number of predictors, as specified in Geurts et al. (default -1).
-N <minimum number of instances> The minimum number of instances required at a node for splitting to be considered. If value is -1, 5 will be used for regression problems and 2 for classification problems, as specified in Geurts et al. (default -1).
-S <num> Random number seed. (default 1)
-D If set, classifier is run in debug mode and may output additional info to the console
setOptions
in interface OptionHandler
setOptions
in class RandomizableClassifier
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic Capabilities getCapabilities()
getCapabilities
in interface Classifier
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class AbstractClassifier
public void buildClassifier(Instances data) throws java.lang.Exception
buildClassifier
in interface Classifier
java.lang.Exception
public double[] distributionForInstance(Instance inst)
distributionForInstance
in interface Classifier
distributionForInstance
in class AbstractClassifier
public java.lang.String toString()
toString
in class java.lang.Object
public void generatePartition(Instances data) throws java.lang.Exception
generatePartition
in interface PartitionGenerator
java.lang.Exception
public double[] getMembershipValues(Instance instance) throws java.lang.Exception
getMembershipValues
in interface PartitionGenerator
java.lang.Exception
public int numElements() throws java.lang.Exception
numElements
in interface PartitionGenerator
java.lang.Exception
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractClassifier
public static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |