MOA 12.03
Real Time Analytics for Data Streams
|
Incremental on-line boosting of Oza and Russell. More...
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 |
FlagOption | pureBoostOption |
Protected Member Functions | |
double | getEnsembleMemberWeight (int i) |
Measurement[] | getModelMeasurementsImpl () |
Gets the current measurements of this classifier. | |
Protected Attributes | |
Classifier[] | ensemble |
double[] | scms |
double[] | swms |
Incremental on-line boosting of Oza and Russell.
See details in:
N. Oza and S. Russell. Online bagging and boosting. In Artificial Intelligence and Statistics 2001, pages 105–112. Morgan Kaufmann, 2001.
For the boosting method, Oza and Russell note that the weighting procedure of AdaBoost actually divides the total example weight into two halves – half of the weight is assigned to the correctly classified examples, and the other half goes to the misclassified examples. They use the Poisson distribution for deciding the random probability that an example is used for training, only this time the parameter changes according to the boosting weight of the example as it is passed through each model in sequence.
Parameters:
Definition at line 54 of file OzaBoost.java.
double moa.classifiers.meta.OzaBoost.getEnsembleMemberWeight | ( | int | i | ) | [protected] |
Definition at line 110 of file OzaBoost.java.
Referenced by moa.classifiers.meta.OzaBoost.getVotesForInstance().
void moa.classifiers.meta.OzaBoost.getModelDescription | ( | StringBuilder | out, |
int | indent | ||
) | [virtual] |
Returns a string representation of the model.
out | the stringbuilder to add the description |
indent | the number of characters to indent |
Implements moa.classifiers.AbstractClassifier.
Definition at line 142 of file OzaBoost.java.
Measurement [] moa.classifiers.meta.OzaBoost.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.
Implements moa.classifiers.AbstractClassifier.
Definition at line 147 of file OzaBoost.java.
String moa.classifiers.meta.OzaBoost.getPurposeString | ( | ) |
Gets the purpose of this object.
Reimplemented from moa.classifiers.AbstractClassifier.
Definition at line 59 of file OzaBoost.java.
Classifier [] moa.classifiers.meta.OzaBoost.getSubClassifiers | ( | ) |
Gets the classifiers of this ensemble.
Returns null if this classifier is a single classifier.
Reimplemented from moa.classifiers.AbstractClassifier.
Definition at line 153 of file OzaBoost.java.
double [] moa.classifiers.meta.OzaBoost.getVotesForInstance | ( | Instance | inst | ) |
Predicts the class memberships for a given instance.
If an instance is unclassified, the returned array elements must be all zero.
inst | the instance to be classified |
Implements moa.classifiers.Classifier.
Definition at line 119 of file OzaBoost.java.
boolean moa.classifiers.meta.OzaBoost.isRandomizable | ( | ) |
Gets whether this classifier needs a random seed.
Examples of methods that needs a random seed are bagging and boosting.
Implements moa.classifiers.Classifier.
Definition at line 137 of file OzaBoost.java.
void moa.classifiers.meta.OzaBoost.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.
Definition at line 79 of file OzaBoost.java.
void moa.classifiers.meta.OzaBoost.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.
inst | the instance to be used for training |
Implements moa.classifiers.AbstractClassifier.
Definition at line 91 of file OzaBoost.java.
new ClassOption("baseLearner", 'l', "Classifier to train.", Classifier.class, "trees.HoeffdingTree")
Definition at line 63 of file OzaBoost.java.
Referenced by moa.classifiers.meta.OzaBoost.resetLearningImpl().
Classifier [] moa.classifiers.meta.OzaBoost.ensemble [protected] |
Definition at line 72 of file OzaBoost.java.
Referenced by moa.classifiers.meta.OzaBoost.getModelMeasurementsImpl(), moa.classifiers.meta.OzaBoost.getSubClassifiers(), moa.classifiers.meta.OzaBoost.getVotesForInstance(), moa.classifiers.meta.OzaBoost.resetLearningImpl(), and moa.classifiers.meta.OzaBoost.trainOnInstanceImpl().
new IntOption("ensembleSize", 's', "The number of models to boost.", 10, 1, Integer.MAX_VALUE)
Definition at line 66 of file OzaBoost.java.
Referenced by moa.classifiers.meta.OzaBoost.resetLearningImpl().
new FlagOption("pureBoost", 'p', "Boost with weights only; no poisson.")
Definition at line 69 of file OzaBoost.java.
Referenced by moa.classifiers.meta.OzaBoost.trainOnInstanceImpl().
double [] moa.classifiers.meta.OzaBoost.scms [protected] |
Definition at line 74 of file OzaBoost.java.
Referenced by moa.classifiers.meta.OzaBoost.getEnsembleMemberWeight(), moa.classifiers.meta.OzaBoost.resetLearningImpl(), and moa.classifiers.meta.OzaBoost.trainOnInstanceImpl().
double [] moa.classifiers.meta.OzaBoost.swms [protected] |
Definition at line 76 of file OzaBoost.java.
Referenced by moa.classifiers.meta.OzaBoost.getEnsembleMemberWeight(), moa.classifiers.meta.OzaBoost.resetLearningImpl(), and moa.classifiers.meta.OzaBoost.trainOnInstanceImpl().