public class DynamicWeightedMajority extends AbstractClassifier implements MultiClassClassifier
J. Zico Kolter and Marcus A. Maloof. Dynamic weighted majority: An ensemble method for drifting concepts. The Journal of Machine Learning Research, 8:2755-2790, December 2007. ISSN 1532-4435. URL http://dl.acm.org/citation.cfm?id=1314498.1390333.
Based on the source code provided by the author at http://people.cs.georgetown.edu/~maloof/pubs/jmlr07.php
Modifier and Type | Field and Description |
---|---|
ClassOption |
baseLearnerOption |
FloatOption |
betaOption |
protected long |
epochs |
protected List<Classifier> |
experts |
FloatOption |
lambdaOption |
IntOption |
maxExpertsOption |
IntOption |
periodOption |
FloatOption |
thetaOption |
protected List<Double> |
weights |
classifierRandom, downSampleRatio, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
config
Constructor and Description |
---|
DynamicWeightedMajority() |
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. |
double[] |
getVotesForInstance(Instance inst)
Predicts the class memberships for a given instance.
|
boolean |
isRandomizable()
Gets whether this learner needs a random seed.
|
protected void |
removeExperts() |
protected void |
removeWeakestExpert(int i) |
void |
resetLearningImpl()
Resets this classifier.
|
protected void |
scaleWeights(double maxWeight) |
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, getDownSampleRatio, getModel, getModelContext, getModelMeasurements, getNominalValueString, getPredictionForInstance, getPredictionForInstance, getPurposeString, getSubClassifiers, getSublearners, getVotesForInstance, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance, trainOnInstance, updateDownSampleRatio
getCLICreationString, getOptions, 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 periodOption
public FloatOption betaOption
public FloatOption thetaOption
public IntOption maxExpertsOption
public FloatOption lambdaOption
protected List<Classifier> experts
protected long epochs
public void resetLearningImpl()
AbstractClassifier
resetLearningImpl
in class AbstractClassifier
protected void scaleWeights(double maxWeight)
protected void removeExperts()
protected void removeWeakestExpert(int i)
public void trainOnInstanceImpl(Instance inst)
AbstractClassifier
trainOnInstanceImpl
in class AbstractClassifier
inst
- the instance to be used for trainingpublic boolean isRandomizable()
Learner
isRandomizable
in interface Learner<Example<Instance>>
public double[] getVotesForInstance(Instance inst)
Classifier
getVotesForInstance
in interface Classifier
getVotesForInstance
in class AbstractClassifier
inst
- the instance to be classifiedprotected Measurement[] getModelMeasurementsImpl()
AbstractClassifier
getModelMeasurementsImpl
in class AbstractClassifier
public void getModelDescription(StringBuilder out, int indent)
AbstractClassifier
getModelDescription
in class AbstractClassifier
out
- the stringbuilder to add the descriptionindent
- the number of characters to indentCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.