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

Incremental on-line bagging of Oza and Russell. More...

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

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.
boolean isRandomizable ()
 Gets whether this classifier needs a random seed.
void getModelDescription (StringBuilder out, int indent)
 Returns a string representation of the model.
Classifier[] getSubClassifiers ()
 Gets the classifiers of this ensemble.

Public Attributes

ClassOption baseLearnerOption
IntOption ensembleSizeOption

Protected Member Functions

Measurement[] getModelMeasurementsImpl ()
 Gets the current measurements of this classifier.

Protected Attributes

Classifier[] ensemble

Detailed Description

Incremental on-line bagging of Oza and Russell.

Oza and Russell developed online versions of bagging and boosting for Data Streams. They show how the process of sampling bootstrap replicates from training data can be simulated in a data stream context. They observe that the probability that any individual example will be chosen for a replicate tends to a Poisson(1) distribution.

[OR] N. Oza and S. Russell. Online bagging and boosting. In Artificial Intelligence and Statistics 2001, pages 105–112. Morgan Kaufmann, 2001.

Parameters:

  • -l : Classifier to train
  • -s : The number of models in the bag
Author:
Richard Kirkby (rkirkby@cs.waikato.ac.nz)
Version:
Revision:
7

Definition at line 52 of file OzaBag.java.


Member Function Documentation

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

Implements moa.classifiers.AbstractClassifier.

Reimplemented in moa.classifiers.meta.OzaBagASHT.

Definition at line 110 of file OzaBag.java.

Measurement [] moa.classifiers.meta.OzaBag.getModelMeasurementsImpl ( ) [protected, virtual]

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

Returns:
an array of measurements to be used in evaluation tasks

Implements moa.classifiers.AbstractClassifier.

Definition at line 115 of file OzaBag.java.

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

Gets the purpose of this object.

Returns:
the string with the purpose of this object

Reimplemented from moa.classifiers.AbstractClassifier.

Reimplemented in moa.classifiers.meta.OzaBagASHT.

Definition at line 55 of file OzaBag.java.

Classifier [] moa.classifiers.meta.OzaBag.getSubClassifiers ( )

Gets the classifiers of this ensemble.

Returns null if this classifier is a single classifier.

Returns:
an array of the classifiers of the ensemble

Reimplemented from moa.classifiers.AbstractClassifier.

Definition at line 121 of file OzaBag.java.

double [] moa.classifiers.meta.OzaBag.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

Implements moa.classifiers.Classifier.

Reimplemented in moa.classifiers.meta.OzaBagASHT.

Definition at line 92 of file OzaBag.java.

Here is the call graph for this function:

boolean moa.classifiers.meta.OzaBag.isRandomizable ( )

Gets whether this classifier needs a random seed.

Examples of methods that needs a random seed are bagging and boosting.

Returns:
true if the classifier needs a random seed.

Implements moa.classifiers.Classifier.

Definition at line 105 of file OzaBag.java.

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

Implements moa.classifiers.AbstractClassifier.

Reimplemented in moa.classifiers.meta.OzaBagASHT.

Definition at line 70 of file OzaBag.java.

Here is the call graph for this function:

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

Implements moa.classifiers.AbstractClassifier.

Reimplemented in moa.classifiers.meta.OzaBagASHT.

Definition at line 80 of file OzaBag.java.

Here is the call graph for this function:


Member Data Documentation

Initial value:
 new ClassOption("baseLearner", 'l',
            "Classifier to train.", Classifier.class, "trees.HoeffdingTree")

Definition at line 61 of file OzaBag.java.

Referenced by moa.classifiers.meta.OzaBagASHT.resetLearningImpl(), and moa.classifiers.meta.OzaBag.resetLearningImpl().

Initial value:
 new IntOption("ensembleSize", 's',
            "The number of models in the bag.", 10, 1, Integer.MAX_VALUE)

Definition at line 64 of file OzaBag.java.

Referenced by moa.classifiers.meta.OzaBagASHT.resetLearningImpl(), and moa.classifiers.meta.OzaBag.resetLearningImpl().


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