public class OzaBagAdwin extends AbstractClassifier
ADWIN is a change detector and estimator that solves in
a well-specified way the problem of tracking the average of
a stream of bits or real-valued numbers. ADWIN keeps a
variable-length window of recently seen items, with the property
that the window has the maximal length statistically consistent
with the hypothesis “there has been no change in the average value
inside the window”.
More precisely, an older fragment of the window is dropped if and only
if there is enough evidence that its average value differs from that of
the rest of the window. This has two consequences: one, that change
reliably declared whenever the window shrinks; and two, that at any time
the average over the existing window can be reliably taken as an estimation
of the current average in the stream (barring a very small or very recent
change that is still not statistically visible). A formal and quantitative
statement of these two points (a theorem) appears in
Albert Bifet and Ricard Gavaldà. Learning from time-changing data with adaptive windowing. In SIAM International Conference on Data Mining, 2007.
ADWIN is parameter- and assumption-free in the sense that it automatically
detects and adapts to the current rate of change. Its only parameter is a
confidence bound δ, indicating how confident we want to be in the algorithm’s
output, inherent to all algorithms dealing with random processes. Also
important, ADWIN does not maintain the window explicitly, but compresses it
using a variant of the exponential histogram technique. This means that it
keeps a window of length W using only O(log W) memory and O(log W) processing
time per item.
ADWIN Bagging is the online bagging method of Oza and Rusell with the
addition of the ADWIN algorithm as a change detector and as an estimator for
the weights of the boosting method. When a change is detected, the worst
classifier of the ensemble of classifiers is removed and a new classifier is
added to the ensemble.
See details in:
[BHPKG] 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.
Example:
OzaBagAdwin -l HoeffdingTreeNBAdaptive -s 10
Parameters:
Modifier and Type | Field and Description |
---|---|
protected ADWIN[] |
ADError |
ClassOption |
baseLearnerOption |
protected Classifier[] |
ensemble |
IntOption |
ensembleSizeOption |
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
classOptionNamesToPreparedObjects, options
Constructor and Description |
---|
OzaBagAdwin() |
Modifier and Type | Method and Description |
---|---|
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
|
Classifier[] |
getSubClassifiers()
Gets the classifiers of this ensemble.
|
double[] |
getVotesForInstance(weka.core.Instance inst)
Predicts the class memberships for a given instance.
|
boolean |
isRandomizable()
Gets whether this classifier needs a random seed.
|
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, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance
discoverOptionsViaReflection, getCLICreationString, getOptions, getPreparedClassOption, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCLICreationString, getOptions, prepareForUse, prepareForUse
measureByteSize
public ClassOption baseLearnerOption
public IntOption ensembleSizeOption
protected Classifier[] ensemble
protected ADWIN[] ADError
public String getPurposeString()
OptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractClassifier
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 classifiedpublic boolean isRandomizable()
Classifier
public void getModelDescription(StringBuilder out, int indent)
AbstractClassifier
getModelDescription
in class AbstractClassifier
out
- the stringbuilder to add the descriptionindent
- the number of characters to indentprotected Measurement[] getModelMeasurementsImpl()
AbstractClassifier
getModelMeasurementsImpl
in class AbstractClassifier
public Classifier[] getSubClassifiers()
Classifier
getSubClassifiers
in interface Classifier
getSubClassifiers
in class AbstractClassifier
Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.