MOA 12.03
Real Time Analytics for Data Streams
moa.classifiers.trees.ASHoeffdingTree Class Reference

Adaptive Size Hoeffding Tree used in Bagging using trees of different size. More...

Inheritance diagram for moa.classifiers.trees.ASHoeffdingTree:
Collaboration diagram for moa.classifiers.trees.ASHoeffdingTree:

List of all members.

Public Member Functions

String getPurposeString ()
 Gets the purpose of this object.
void resetLearningImpl ()
 Resets this classifier.
void trainOnInstanceImpl (Instance inst)
 Trains this classifier incrementally using the given instance.
void setMaxSize (int mSize)
void setResetTree ()
void deleteNode (Node node, int childIndex)
void resizeTree (Node node, int childIndex)

Protected Attributes

int maxSize = 10000
boolean resetTree = false

Detailed Description

Adaptive Size Hoeffding Tree used in Bagging using trees of different size.

The Adaptive-Size Hoeffding Tree (ASHT) is derived from the Hoeffding Tree algorithm with the following differences:

  • it has a maximum number of split nodes, or size
  • after one node splits, if the number of split nodes of the ASHT tree is higher than the maximum value, then it deletes some nodes to reduce its size

The intuition behind this method is as follows: smaller trees adapt more quickly to changes, and larger trees do better during periods with no or little change, simply because they were built on more data. Trees limited to size s will be reset about twice as often as trees with a size limit of 2s. This creates a set of different reset-speeds for an ensemble of such trees, and therefore a subset of trees that are a good approximation for the current rate of change. It is important to note that resets will happen all the time, even for stationary datasets, but this behaviour should not have a negative impact on the ensemble’s predictive performance. When the tree size exceeds the maximun size value, there are two different delete options:

  • delete the oldest node, the root, and all of its children except the one where the split has been made. After that, the root of the child not deleted becomes the new root
  • delete all the nodes of the tree, i.e., restart from a new root.

The maximum allowed size for the n-th ASHT tree is twice the maximum allowed size for the (n-1)-th tree. Moreover, each tree has a weight proportional to the inverse of the square of its error, and it monitors its error with an exponential weighted moving average (EWMA) with alpha = .01. The size of the first tree is 2.

With this new method, it is attempted to improve bagging performance by increasing tree diversity. It has been observed that boosting tends to produce a more diverse set of classifiers than bagging, and this has been cited as a factor in increased performance.
See more details in:

Albert Bifet, Geoff Holmes, Bernhard Pfahringer, Richard Kirkby, and Ricard Gavaldà. New ensemble methods for evolving data streams. In 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2009.

The learner must be ASHoeffdingTree, a Hoeffding Tree with a maximum size value.

Example:

OzaBagASHT -l ASHoeffdingTree -s 10 -u -r Parameters:

  • Same parameters as OzaBag
  • -f : the size of first classifier in the bag.
  • -u : Enable weight classifiers
  • -r : Reset trees when size is higher than the max
Author:
Albert Bifet (abifet at cs dot waikato dot ac dot nz)
Version:
Revision:
7

Definition at line 78 of file ASHoeffdingTree.java.


Member Function Documentation

void moa.classifiers.trees.ASHoeffdingTree.deleteNode ( Node  node,
int  childIndex 
)

Definition at line 156 of file ASHoeffdingTree.java.

Referenced by moa.classifiers.trees.ASHoeffdingTree.resizeTree().

Here is the caller graph for this function:

String moa.classifiers.trees.ASHoeffdingTree.getPurposeString ( )

Gets the purpose of this object.

Returns:
the string with the purpose of this object

Reimplemented from moa.classifiers.trees.HoeffdingTree.

Definition at line 83 of file ASHoeffdingTree.java.

void moa.classifiers.trees.ASHoeffdingTree.resetLearningImpl ( ) [virtual]

Resets this classifier.

It must be similar to starting a new classifier from scratch.

The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. Note that this will produce compiler errors if not overridden.

Reimplemented from moa.classifiers.trees.HoeffdingTree.

Definition at line 92 of file ASHoeffdingTree.java.

Referenced by moa.classifiers.trees.ASHoeffdingTree.trainOnInstanceImpl().

Here is the caller graph for this function:

void moa.classifiers.trees.ASHoeffdingTree.resizeTree ( Node  node,
int  childIndex 
)

Definition at line 173 of file ASHoeffdingTree.java.

Referenced by moa.classifiers.trees.ASHoeffdingTree.trainOnInstanceImpl().

Here is the call graph for this function:

Here is the caller graph for this function:

void moa.classifiers.trees.ASHoeffdingTree.setMaxSize ( int  mSize)

Definition at line 148 of file ASHoeffdingTree.java.

void moa.classifiers.trees.ASHoeffdingTree.setResetTree ( )

Definition at line 152 of file ASHoeffdingTree.java.

void moa.classifiers.trees.ASHoeffdingTree.trainOnInstanceImpl ( Instance  inst) [virtual]

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. Note that this will produce compiler errors if not overridden.

Parameters:
instthe instance to be used for training

Reimplemented from moa.classifiers.trees.HoeffdingTree.

Definition at line 104 of file ASHoeffdingTree.java.

Here is the call graph for this function:


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations