public class ActiveClassifier extends AbstractClassifier
Active learning focuses on learning an accurate model with as few labels as possible. Streaming data poses additional challenges for active learning, since the data distribution may change over time (concept drift) and classifiers need to adapt. Conventional active learning strategies concentrate on querying the most uncertain instances, which are typically concentrated around the decision boundary. If changes do not occur close to the boundary, they will be missed and classifiers will fail to adapt. This class contains four active learning strategies for streaming data that explicitly handle concept drift. They are based on randomization, fixed uncertainty, dynamic allocation of labeling efforts over time and randomization of the search space [ZBPH]. It also contains the Selective Sampling strategy, which is adapted from [CGZ] it uses a variable labeling threshold.
[ZBPH] Indre Zliobaite, Albert Bifet, Bernhard Pfahringer, Geoff Holmes: Active Learning with Evolving Streaming Data. ECML/PKDD (3) 2011: 597-612
[CGZ] N. Cesa-Bianchi, C. Gentile, and L. Zaniboni. Worst-case analysis of selective sampling for linear classification. J. Mach. Learn. Res. (7) 2006: 1205-1230
.Parameters:
Modifier and Type | Field and Description |
---|---|
double |
accuracyBaseLearner |
MultiChoiceOption |
activeLearningStrategyOption |
ClassOption |
baseLearnerOption |
FloatOption |
budgetOption |
Classifier |
classifier |
int |
costLabeling |
int |
costLabelingRandom |
FloatOption |
fixedThresholdOption |
int |
iterationControl |
double |
maxPosterior |
double |
newThreshold |
FloatOption |
numInstancesInitOption |
FloatOption |
stepOption |
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
classOptionNamesToPreparedObjects, options
Constructor and Description |
---|
ActiveClassifier() |
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
|
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, getSubClassifiers, 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 MultiChoiceOption activeLearningStrategyOption
public FloatOption budgetOption
public FloatOption fixedThresholdOption
public FloatOption stepOption
public FloatOption numInstancesInitOption
public Classifier classifier
public int costLabeling
public int costLabelingRandom
public int iterationControl
public double newThreshold
public double maxPosterior
public double accuracyBaseLearner
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
Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.