public class ALRandom extends AbstractClassifier implements ALClassifier
Modifier and Type | Field and Description |
---|---|
ClassOption |
baseLearnerOption |
BudgetManager |
budgetManager |
ClassOption |
budgetManagerOption |
Classifier |
classifier |
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
config
Constructor and Description |
---|
ALRandom() |
Modifier and Type | Method and Description |
---|---|
int |
getLastLabelAcqReport()
Returns true if the previously chosen instance was added to the training set
of the active learner.
|
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()
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.
|
void |
resetLearningImpl()
Resets this classifier.
|
void |
setModelContext(InstancesHeader ih)
Sets the reference to the header of the data stream.
|
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, getSubClassifiers, getSublearners, getVotesForInstance, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance, trainOnInstance
getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
copy, correctlyClassifies, getPredictionForInstance, getSubClassifiers, trainOnInstance
getModel, getModelContext, getModelMeasurements, getPredictionForInstance, getSublearners, getVotesForInstance, resetLearning, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance
getCLICreationString, getOptions, prepareForUse, prepareForUse
getDescription, measureByteSize
getAWTRenderer
public ClassOption baseLearnerOption
public ClassOption budgetManagerOption
public Classifier classifier
public BudgetManager budgetManager
public String getPurposeString()
AbstractOptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractClassifier
public int getLastLabelAcqReport()
ALClassifier
getLastLabelAcqReport
in interface ALClassifier
public 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 classifiedpublic void resetLearningImpl()
AbstractClassifier
resetLearningImpl
in class AbstractClassifier
public void trainOnInstanceImpl(Instance inst)
AbstractClassifier
trainOnInstanceImpl
in class AbstractClassifier
inst
- the instance to be used for trainingprotected 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 indentpublic 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 headerCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.