public abstract class HeterogeneousEnsembleAbstract extends AbstractClassifier implements MultiClassClassifier
Given a set of (heterogeneous) classifiers, BLAST builds an ensemble, and determines the weights of all ensemble members based on their performance on recent observed instances. Used as Abstact Base Class for HeterogeneousEnsembleBlast and HeterogeneousEnsembleBlastFadingFactors.
J. N. van Rijn, G. Holmes, B. Pfahringer, J. Vanschoren. Having a Blast: Meta-Learning and Heterogeneous Ensembles for Data Streams. In 2015 IEEE International Conference on Data Mining, pages 1003-1008. IEEE, 2015.
Parameters:
Modifier and Type | Field and Description |
---|---|
IntOption |
activeClassifiersOption |
ListOption |
baselearnersOption |
protected Classifier[] |
ensemble |
IntOption |
gracePerionOption |
protected double[] |
historyTotal |
protected Integer |
instancesSeen |
FlagOption |
weightClassifiersOption |
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
config
Constructor and Description |
---|
HeterogeneousEnsembleAbstract() |
Modifier and Type | Method and Description |
---|---|
int |
getEnsembleSize() |
String |
getMemberCliString(int idx) |
void |
getModelDescription(StringBuilder arg0,
int arg1)
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()
Dictionary with option texts and objects
|
double[] |
getVotesForInstance(Instance inst)
Predicts the class memberships for a given instance.
|
boolean |
isRandomizable()
Gets whether this learner needs a random seed.
|
protected static int |
maxIndex(double[] scores) |
protected static double[] |
normalize(double[] input) |
void |
prepareForUseImpl(TaskMonitor monitor,
ObjectRepository repository)
This method describes the implementation of how to prepare this object for use.
|
void |
setModelContext(InstancesHeader ih)
Sets the reference to the header of the data stream.
|
protected static List<Integer> |
topK(double[] scores,
int k) |
contextIsCompatible, copy, correctlyClassifies, getAttributeNameString, getAWTRenderer, getClassLabelString, getClassNameString, getDescription, getModel, getModelContext, getModelMeasurements, getNominalValueString, getPredictionForInstance, getPredictionForInstance, getSubClassifiers, getSublearners, getVotesForInstance, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, resetLearning, resetLearningImpl, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance, trainOnInstance, trainOnInstanceImpl
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 ListOption baselearnersOption
public IntOption gracePerionOption
public IntOption activeClassifiersOption
public FlagOption weightClassifiersOption
protected Classifier[] ensemble
protected double[] historyTotal
protected Integer instancesSeen
public String getPurposeString()
AbstractOptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractClassifier
public int getEnsembleSize()
public String getMemberCliString(int idx)
public double[] getVotesForInstance(Instance inst)
Classifier
getVotesForInstance
in interface Classifier
getVotesForInstance
in class AbstractClassifier
inst
- the instance to be classifiedpublic void setModelContext(InstancesHeader ih)
Learner
Instances
.
This header is needed to know the number of classes and attributessetModelContext
in interface Learner<Example<Instance>>
setModelContext
in class AbstractClassifier
ih
- the reference to the data stream headerpublic boolean isRandomizable()
Learner
isRandomizable
in interface Learner<Example<Instance>>
public void getModelDescription(StringBuilder arg0, int arg1)
AbstractClassifier
getModelDescription
in class AbstractClassifier
arg0
- the stringbuilder to add the descriptionarg1
- the number of characters to indentprotected Measurement[] getModelMeasurementsImpl()
AbstractClassifier
getModelMeasurementsImpl
in class AbstractClassifier
public void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractOptionHandler
prepareForUseImpl
and not prepareForUse
since
prepareForUse
calls prepareForUseImpl
.prepareForUseImpl
in class AbstractClassifier
monitor
- the TaskMonitor to userepository
- the ObjectRepository to useprotected static int maxIndex(double[] scores)
protected static double[] normalize(double[] input)
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.