public class DACC extends AbstractClassifier
| Modifier and Type | Class and Description |
|---|---|
protected class |
DACC.Pair
This helper class is used to sort an array of pairs of integers: val and index.
|
| Modifier and Type | Field and Description |
|---|---|
MultiChoiceOption |
combinationOption
Combination functions: MAX and WVD (MAX leads to a faster reactivity to the change, WVD is more robust to noise)
|
protected Classifier[] |
ensemble
Ensemble of classifiers
|
protected double[] |
ensembleAges
Age of classifiers (to compare with maturity age)
|
protected DACC.Pair[] |
ensembleWeights
Weights of classifiers
|
protected int[][] |
ensembleWindows
Evaluation windows (recent classification errors)
|
FloatOption |
evaluationSizeOption
Size of the evaluation window for weights computing
|
ClassOption |
learnerOption
Base classifier
|
FloatOption |
maturityOption
Maturity age of classifiers
|
FloatOption |
memberCountOption
Ensemble size
|
protected int |
nbInstances
Number of instances from the stream
|
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModelclassOptionNamesToPreparedObjects, options| Constructor and Description |
|---|
DACC() |
| Modifier and Type | Method and Description |
|---|---|
void |
discardModel(int index)
Resets a classifier in the ensemble
|
protected DACC.Pair[] |
getHalf(boolean bestHalf)
Returns the best (or worst) half of classifiers in the adaptive ensemble.
|
protected ArrayList<Integer> |
getMAXIndexes()
Returns the classifiers that vote for the final prediction
when the MAX combination function is selected
|
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. |
protected int |
getNbActiveClassifiers()
Returns the number of classifiers used for prediction
which includes the adaptive learners and the snapshots in ADACC
|
protected int |
getNbAdaptiveClassifiers()
Returns the number of adaptive classifiers in the ensemble
which excludes the static snapshots in ADACC
|
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.
|
protected ArrayList<Integer> |
getWVDIndexes()
Returns the classifiers that vote for the final prediction
when the WVD combination function is selected
|
protected void |
initVariables()
Initializes the method variables
|
boolean |
isRandomizable()
Gets whether this classifier needs a random seed.
|
void |
resetLearningImpl()
Resets this classifier.
|
protected void |
trainAndClassify(weka.core.Instance inst)
Receives a training instance from the stream and
updates the adaptive classifiers accordingly
|
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. |
protected double |
updateEvaluationWindow(int index,
int val)
Updates the evaluation window of a classifier and returns the
updated weight value.
|
contextIsCompatible, copy, correctlyClassifies, getAttributeNameString, getAWTRenderer, getClassLabelString, getClassNameString, getDescription, getModelContext, getModelMeasurements, getNominalValueString, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstancediscoverOptionsViaReflection, getCLICreationString, getOptions, getPreparedClassOption, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUsecopy, measureByteSize, measureByteSize, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCLICreationString, getOptions, prepareForUse, prepareForUsemeasureByteSizepublic ClassOption learnerOption
public FloatOption memberCountOption
public FloatOption maturityOption
public FloatOption evaluationSizeOption
public MultiChoiceOption combinationOption
protected Classifier[] ensemble
protected DACC.Pair[] ensembleWeights
protected double[] ensembleAges
protected int[][] ensembleWindows
protected int nbInstances
public String getPurposeString()
OptionHandlergetPurposeString in interface OptionHandlergetPurposeString in class AbstractClassifierprotected void initVariables()
public void resetLearningImpl()
AbstractClassifierresetLearningImpl in class AbstractClassifierpublic void trainOnInstanceImpl(weka.core.Instance inst)
AbstractClassifiertrainOnInstanceImpl in class AbstractClassifierinst - the instance to be used for trainingpublic double[] getVotesForInstance(weka.core.Instance inst)
Classifierinst - the instance to be classifiedprotected void trainAndClassify(weka.core.Instance inst)
inst - the instance from the streampublic void discardModel(int index)
index - the index of the classifier in the ensembleprotected double updateEvaluationWindow(int index,
int val)
index - the index of the classifier in the ensembleval - the last evaluation record of the classifierprotected DACC.Pair[] getHalf(boolean bestHalf)
bestHalf - boolean value set to true (false) if we want to return
the best (worst) half of adaptive classifiers.horizon - protected ArrayList<Integer> getMAXIndexes()
protected ArrayList<Integer> getWVDIndexes()
protected int getNbActiveClassifiers()
protected int getNbAdaptiveClassifiers()
public void getModelDescription(StringBuilder out, int indent)
AbstractClassifiergetModelDescription in class AbstractClassifierout - the stringbuilder to add the descriptionindent - the number of characters to indentprotected Measurement[] getModelMeasurementsImpl()
AbstractClassifiergetModelMeasurementsImpl in class AbstractClassifierpublic boolean isRandomizable()
Classifierpublic Classifier[] getSubClassifiers()
ClassifiergetSubClassifiers in interface ClassifiergetSubClassifiers in class AbstractClassifierCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.