Configurable
, java.io.Serializable
, CapabilitiesHandler
, Classifier
, MultiClassClassifier
, AWTRenderable
, Learner<Example<Instance>>
, MOAObject
, OptionHandler
OzaBagML
public class OzaBag extends AbstractClassifier implements MultiClassClassifier, CapabilitiesHandler
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:
Modifier and Type | Field | Description |
---|---|---|
ClassOption |
baseLearnerOption |
|
protected Classifier[] |
ensemble |
|
IntOption |
ensembleSizeOption |
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
config
Constructor | Description |
---|---|
OzaBag() |
Modifier and Type | Method | Description |
---|---|---|
ImmutableCapabilities |
defineImmutableCapabilities() |
Defines the set of capabilities the object has.
|
void |
getModelDescription(java.lang.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. |
java.lang.String |
getPurposeString() |
Dictionary with option texts and objects
|
Classifier[] |
getSubClassifiers() |
Gets the classifiers of this ensemble.
|
double[] |
getVotesForInstance(Instance inst) |
Predicts the class memberships for a given instance.
|
boolean |
isRandomizable() |
Gets whether this learner needs a random seed.
|
void |
resetLearningImpl() |
Resets this classifier.
|
void |
trainOnInstanceImpl(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, getModel, getModelContext, getModelMeasurements, getNominalValueString, getPredictionForInstance, getPredictionForInstance, getSublearners, getVotesForInstance, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance, trainOnInstance
copy, measureByteSize, measureByteSize, toString
getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
getCapabilities
measureByteSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCLICreationString, getOptions, prepareForUse, prepareForUse
public ClassOption baseLearnerOption
public IntOption ensembleSizeOption
protected Classifier[] ensemble
public java.lang.String getPurposeString()
AbstractOptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractClassifier
public void resetLearningImpl()
AbstractClassifier
resetLearningImpl
in class AbstractClassifier
public void trainOnInstanceImpl(Instance inst)
AbstractClassifier
trainOnInstanceImpl
in class AbstractClassifier
inst
- the instance to be used for trainingpublic double[] getVotesForInstance(Instance inst)
Classifier
getVotesForInstance
in interface Classifier
getVotesForInstance
in class AbstractClassifier
inst
- the instance to be classifiedpublic boolean isRandomizable()
Learner
isRandomizable
in interface Learner<Example<Instance>>
public void getModelDescription(java.lang.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
public ImmutableCapabilities defineImmutableCapabilities()
CapabilitiesHandler
defineImmutableCapabilities
in interface CapabilitiesHandler
defineImmutableCapabilities
in class AbstractClassifier
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.