MOA 12.03
Real Time Analytics for Data Streams
moa.classifiers.meta.OzaBagASHT Class Reference

Bagging using trees of different size. More...

Inheritance diagram for moa.classifiers.meta.OzaBagASHT:
Collaboration diagram for moa.classifiers.meta.OzaBagASHT:

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.
double[] getVotesForInstance (Instance inst)
 Predicts the class memberships for a given instance.
void getModelDescription (StringBuilder out, int indent)
 Returns a string representation of the model.

Public Attributes

IntOption firstClassifierSizeOption
FlagOption useWeightOption
FlagOption resetTreesOption

Protected Attributes

double[] error
double alpha = 0.01

Detailed Description

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 85 of file OzaBagASHT.java.


Member Function Documentation

void moa.classifiers.meta.OzaBagASHT.getModelDescription ( StringBuilder  out,
int  indent 
) [virtual]

Returns a string representation of the model.

Parameters:
outthe stringbuilder to add the description
indentthe number of characters to indent

Reimplemented from moa.classifiers.meta.OzaBag.

Definition at line 161 of file OzaBagASHT.java.

String moa.classifiers.meta.OzaBagASHT.getPurposeString ( )

Gets the purpose of this object.

Returns:
the string with the purpose of this object

Reimplemented from moa.classifiers.meta.OzaBag.

Definition at line 90 of file OzaBagASHT.java.

double [] moa.classifiers.meta.OzaBagASHT.getVotesForInstance ( Instance  inst)

Predicts the class memberships for a given instance.

If an instance is unclassified, the returned array elements must be all zero.

Parameters:
instthe instance to be classified
Returns:
an array containing the estimated membership probabilities of the test instance in each class

Reimplemented from moa.classifiers.meta.OzaBag.

Definition at line 144 of file OzaBagASHT.java.

Here is the call graph for this function:

void moa.classifiers.meta.OzaBagASHT.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.meta.OzaBag.

Definition at line 108 of file OzaBagASHT.java.

Here is the call graph for this function:

void moa.classifiers.meta.OzaBagASHT.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.meta.OzaBag.

Definition at line 127 of file OzaBagASHT.java.

Here is the call graph for this function:


Member Data Documentation

double moa.classifiers.meta.OzaBagASHT.alpha = 0.01 [protected]
Initial value:
 new IntOption("firstClassifierSize", 'f',
            "The size of first classifier in the bag.", 1, 1, Integer.MAX_VALUE)

Definition at line 94 of file OzaBagASHT.java.

Referenced by moa.classifiers.meta.OzaBagASHT.resetLearningImpl().

Initial value:
 new FlagOption("resetTrees",
            'r', "Reset trees when size is higher than the max.")

Definition at line 100 of file OzaBagASHT.java.

Referenced by moa.classifiers.meta.OzaBagASHT.resetLearningImpl().

Initial value:
 new FlagOption("useWeight",
            'u', "Enable weight classifiers.")

Definition at line 97 of file OzaBagASHT.java.

Referenced by moa.classifiers.meta.OzaBagASHT.getVotesForInstance().


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