|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.classifiers.Classifier
weka.classifiers.trees.LADTree
public class LADTree
Class for generating a multi-class alternating decision tree using the LogitBoost strategy. For more info, see
Geoffrey Holmes, Bernhard Pfahringer, Richard Kirkby, Eibe Frank, Mark Hall: Multiclass alternating decision trees. In: ECML, 161-172, 2001.
@inproceedings{Holmes2001, author = {Geoffrey Holmes and Bernhard Pfahringer and Richard Kirkby and Eibe Frank and Mark Hall}, booktitle = {ECML}, pages = {161-172}, publisher = {Springer}, title = {Multiclass alternating decision trees}, year = {2001} }Valid options are:
-B <number of boosting iterations> Number of boosting iterations. (Default = 10)
-D If set, classifier is run in debug mode and may output additional info to the console
Field Summary |
---|
Fields inherited from interface weka.core.Drawable |
---|
BayesNet, Newick, NOT_DRAWABLE, TREE |
Constructor Summary | |
---|---|
LADTree()
|
Method Summary | |
---|---|
void |
buildClassifier(Instances instances)
Builds a classifier for a set of instances. |
double[] |
distributionForInstance(Instance instance)
Returns the class probability distribution for an instance. |
void |
done()
|
java.util.Enumeration |
enumerateMeasures()
Returns an enumeration of the additional measure names. |
Capabilities |
getCapabilities()
Returns default capabilities of the classifier. |
double |
getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure. |
int |
getNumOfBoostingIterations()
Gets the number of boosting iterations. |
java.lang.String[] |
getOptions()
Gets the current settings of ADTree. |
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 |
graph()
Returns graph describing the tree. |
int |
graphType()
Returns the type of graph this classifier represents. |
void |
initClassifier(Instances instances)
Sets up the tree ready to be trained. |
java.lang.String |
legend()
Returns the legend of the tree, describing how results are to be interpreted. |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
double |
measureExamplesCounted()
Returns the number of examples "counted". |
double |
measureNodesExpanded()
Returns the number of nodes expanded. |
double |
measureNumLeaves()
Calls measure function for leaf size. |
double |
measureNumPredictionLeaves()
Calls measure function for leaf size. |
double |
measureTreeSize()
Calls measure function for tree size. |
void |
merge(LADTree mergeWith)
Merges two trees together. |
void |
next(int iteration)
|
java.lang.String |
numOfBoostingIterationsTipText()
|
int |
predictiveError(Instances test)
|
void |
setNumOfBoostingIterations(int b)
Sets the number of boosting iterations. |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
java.lang.String |
toString()
Returns a description of the classifier. |
Methods inherited from class weka.classifiers.Classifier |
---|
classifyInstance, debugTipText, forName, getDebug, makeCopies, makeCopy, setDebug |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LADTree()
Method Detail |
---|
public java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public void initClassifier(Instances instances) throws java.lang.Exception
instances
- the instances to train the tree with
java.lang.Exception
- if training data is unsuitablepublic void next(int iteration) throws java.lang.Exception
java.lang.Exception
public void done() throws java.lang.Exception
java.lang.Exception
public double[] distributionForInstance(Instance instance)
distributionForInstance
in class Classifier
instance
- the instance to be classified
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String graph() throws java.lang.Exception
graph
in interface Drawable
java.lang.Exception
- if something goes wrongpublic java.lang.String legend()
public java.lang.String numOfBoostingIterationsTipText()
public int getNumOfBoostingIterations()
public void setNumOfBoostingIterations(int b)
b
- the number of boosting iterations to usepublic java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class Classifier
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-B num
Set the number of boosting iterations
(default 10)
setOptions
in interface OptionHandler
setOptions
in class Classifier
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class Classifier
public double measureTreeSize()
public double measureNumLeaves()
public double measureNumPredictionLeaves()
public double measureNodesExpanded()
public double measureExamplesCounted()
public java.util.Enumeration enumerateMeasures()
enumerateMeasures
in interface AdditionalMeasureProducer
public double getMeasure(java.lang.String additionalMeasureName)
getMeasure
in interface AdditionalMeasureProducer
measureName
- the name of the measure to query for its value
java.lang.IllegalArgumentException
- if the named measure is not supportedpublic void buildClassifier(Instances instances) throws java.lang.Exception
buildClassifier
in class Classifier
instances
- the instances to train the classifier with
java.lang.Exception
- if something goes wrongpublic int predictiveError(Instances test)
public void merge(LADTree mergeWith) throws java.lang.Exception
mergeWith
- the tree to merge with
java.lang.Exception
- if merge could not be performedpublic int graphType()
graphType
in interface Drawable
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Classifier
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Classifier
Capabilities
public static void main(java.lang.String[] argv)
argv
- the options
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |