public class HoeffdingTree extends AbstractClassifier
A theoretically appealing feature of Hoeffding Trees not shared by other incremental decision tree learners is that it has sound guarantees of performance. Using the Hoeffding bound one can show that its output is asymptotically nearly identical to that of a non-incremental learner using infinitely many examples. See for details:
G. Hulten, L. Spencer, and P. Domingos. Mining time-changing data streams. In KDD’01, pages 97–106, San Francisco, CA, 2001. ACM Press.
Parameters:
Modifier and Type | Class and Description |
---|---|
static class |
HoeffdingTree.ActiveLearningNode |
static class |
HoeffdingTree.FoundNode |
static class |
HoeffdingTree.InactiveLearningNode |
static class |
HoeffdingTree.LearningNode |
static class |
HoeffdingTree.LearningNodeNB |
static class |
HoeffdingTree.LearningNodeNBAdaptive |
static class |
HoeffdingTree.Node |
static class |
HoeffdingTree.SplitNode |
Modifier and Type | Field and Description |
---|---|
protected double |
activeLeafByteSizeEstimate |
protected int |
activeLeafNodeCount |
FlagOption |
binarySplitsOption |
protected double |
byteSizeEstimateOverheadFraction |
protected int |
decisionNodeCount |
IntOption |
gracePeriodOption |
protected boolean |
growthAllowed |
protected double |
inactiveLeafByteSizeEstimate |
protected int |
inactiveLeafNodeCount |
MultiChoiceOption |
leafpredictionOption |
IntOption |
maxByteSizeOption |
IntOption |
memoryEstimatePeriodOption |
IntOption |
nbThresholdOption |
ClassOption |
nominalEstimatorOption |
FlagOption |
noPrePruneOption |
ClassOption |
numericEstimatorOption |
FlagOption |
removePoorAttsOption |
FloatOption |
splitConfidenceOption |
ClassOption |
splitCriterionOption |
FlagOption |
stopMemManagementOption |
FloatOption |
tieThresholdOption |
protected HoeffdingTree.Node |
treeRoot |
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
classOptionNamesToPreparedObjects, options
Constructor and Description |
---|
HoeffdingTree() |
Modifier and Type | Method and Description |
---|---|
protected void |
activateLearningNode(HoeffdingTree.InactiveLearningNode toActivate,
HoeffdingTree.SplitNode parent,
int parentBranch) |
protected void |
attemptToSplit(HoeffdingTree.ActiveLearningNode node,
HoeffdingTree.SplitNode parent,
int parentIndex) |
int |
calcByteSize() |
static double |
computeHoeffdingBound(double range,
double confidence,
double n) |
void |
deactivateAllLeaves() |
protected void |
deactivateLearningNode(HoeffdingTree.ActiveLearningNode toDeactivate,
HoeffdingTree.SplitNode parent,
int parentBranch) |
void |
enforceTrackerLimit() |
void |
estimateModelByteSizes() |
protected HoeffdingTree.FoundNode[] |
findLearningNodes() |
protected void |
findLearningNodes(HoeffdingTree.Node node,
HoeffdingTree.SplitNode parent,
int parentBranch,
List<HoeffdingTree.FoundNode> found) |
void |
getModelDescription(StringBuilder out,
int indent)
Returns a string representation of the model.
|
protected Measurement[] |
getModelMeasurementsImpl()
Gets the current measurements of this classifier.
The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. |
String |
getPurposeString()
Gets the purpose of this object
|
double[] |
getVotesForInstance(weka.core.Instance inst)
Predicts the class memberships for a given instance.
|
boolean |
isRandomizable()
Gets whether this classifier needs a random seed.
|
int |
measureByteSize()
Gets the memory size of this object.
|
int |
measureTreeDepth() |
protected HoeffdingTree.LearningNode |
newLearningNode() |
protected HoeffdingTree.LearningNode |
newLearningNode(double[] initialClassObservations) |
protected AttributeClassObserver |
newNominalClassObserver() |
protected AttributeClassObserver |
newNumericClassObserver() |
protected HoeffdingTree.SplitNode |
newSplitNode(InstanceConditionalTest splitTest,
double[] classObservations) |
protected HoeffdingTree.SplitNode |
newSplitNode(InstanceConditionalTest splitTest,
double[] classObservations,
int size) |
void |
resetLearningImpl()
Resets this classifier.
|
void |
trainOnInstanceImpl(weka.core.Instance inst)
Trains this classifier incrementally using the given instance.
The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. |
contextIsCompatible, copy, correctlyClassifies, getAttributeNameString, getAWTRenderer, getClassLabelString, getClassNameString, getDescription, getModelContext, getModelMeasurements, getNominalValueString, getSubClassifiers, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance
discoverOptionsViaReflection, getCLICreationString, getOptions, getPreparedClassOption, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCLICreationString, getOptions, prepareForUse, prepareForUse
public IntOption maxByteSizeOption
public ClassOption numericEstimatorOption
public ClassOption nominalEstimatorOption
public IntOption memoryEstimatePeriodOption
public IntOption gracePeriodOption
public ClassOption splitCriterionOption
public FloatOption splitConfidenceOption
public FloatOption tieThresholdOption
public FlagOption binarySplitsOption
public FlagOption stopMemManagementOption
public FlagOption removePoorAttsOption
public FlagOption noPrePruneOption
protected HoeffdingTree.Node treeRoot
protected int decisionNodeCount
protected int activeLeafNodeCount
protected int inactiveLeafNodeCount
protected double inactiveLeafByteSizeEstimate
protected double activeLeafByteSizeEstimate
protected double byteSizeEstimateOverheadFraction
protected boolean growthAllowed
public MultiChoiceOption leafpredictionOption
public IntOption nbThresholdOption
public String getPurposeString()
OptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractClassifier
public int calcByteSize()
public int measureByteSize()
MOAObject
measureByteSize
in interface MOAObject
measureByteSize
in class AbstractMOAObject
public void resetLearningImpl()
AbstractClassifier
resetLearningImpl
in class AbstractClassifier
public void trainOnInstanceImpl(weka.core.Instance inst)
AbstractClassifier
trainOnInstanceImpl
in class AbstractClassifier
inst
- the instance to be used for trainingpublic double[] getVotesForInstance(weka.core.Instance inst)
Classifier
inst
- the instance to be classifiedprotected Measurement[] getModelMeasurementsImpl()
AbstractClassifier
getModelMeasurementsImpl
in class AbstractClassifier
public int measureTreeDepth()
public void getModelDescription(StringBuilder out, int indent)
AbstractClassifier
getModelDescription
in class AbstractClassifier
out
- the stringbuilder to add the descriptionindent
- the number of characters to indentpublic boolean isRandomizable()
Classifier
public static double computeHoeffdingBound(double range, double confidence, double n)
protected HoeffdingTree.SplitNode newSplitNode(InstanceConditionalTest splitTest, double[] classObservations, int size)
protected HoeffdingTree.SplitNode newSplitNode(InstanceConditionalTest splitTest, double[] classObservations)
protected AttributeClassObserver newNominalClassObserver()
protected AttributeClassObserver newNumericClassObserver()
protected void attemptToSplit(HoeffdingTree.ActiveLearningNode node, HoeffdingTree.SplitNode parent, int parentIndex)
public void enforceTrackerLimit()
public void estimateModelByteSizes()
public void deactivateAllLeaves()
protected void deactivateLearningNode(HoeffdingTree.ActiveLearningNode toDeactivate, HoeffdingTree.SplitNode parent, int parentBranch)
protected void activateLearningNode(HoeffdingTree.InactiveLearningNode toActivate, HoeffdingTree.SplitNode parent, int parentBranch)
protected HoeffdingTree.FoundNode[] findLearningNodes()
protected void findLearningNodes(HoeffdingTree.Node node, HoeffdingTree.SplitNode parent, int parentBranch, List<HoeffdingTree.FoundNode> found)
protected HoeffdingTree.LearningNode newLearningNode()
protected HoeffdingTree.LearningNode newLearningNode(double[] initialClassObservations)
Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.