public class TemporallyAugmentedClassifier extends AbstractClassifier implements MultiClassClassifier
This enables a classifier to exploit potentially present auto-correlation
Parameters:
Modifier and Type | Field and Description |
---|---|
protected Classifier |
baseLearner |
ClassOption |
baseLearnerOption |
protected Instances |
header |
FlagOption |
labelDelayOption |
IntOption |
numOldLabelsOption |
protected double[] |
oldLabels |
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
config
Constructor and Description |
---|
TemporallyAugmentedClassifier() |
Modifier and Type | Method and Description |
---|---|
void |
addOldLabel(double newPrediction) |
Instance |
extendWithOldLabels(Instance instance) |
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 instance)
Predicts the class memberships for a given instance.
|
void |
initHeader(Instances dataset) |
boolean |
isRandomizable()
Gets whether this learner needs a random seed.
|
void |
resetLearningImpl()
Resets this classifier.
|
String |
toString()
Returns a description of the object.
|
void |
trainOnInstanceImpl(Instance instance)
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, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance, trainOnInstance
getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCLICreationString, getOptions, prepareForUse, prepareForUse
measureByteSize
public ClassOption baseLearnerOption
public IntOption numOldLabelsOption
protected Classifier baseLearner
protected double[] oldLabels
protected Instances header
public FlagOption labelDelayOption
public String getPurposeString()
AbstractOptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractClassifier
public void resetLearningImpl()
AbstractClassifier
resetLearningImpl
in class AbstractClassifier
public void trainOnInstanceImpl(Instance instance)
AbstractClassifier
trainOnInstanceImpl
in class AbstractClassifier
instance
- the instance to be used for trainingpublic void addOldLabel(double newPrediction)
public void initHeader(Instances dataset)
public double[] getVotesForInstance(Instance instance)
Classifier
getVotesForInstance
in interface Classifier
getVotesForInstance
in class AbstractClassifier
instance
- the instance to be classifiedpublic boolean isRandomizable()
Learner
isRandomizable
in interface Learner<Example<Instance>>
protected 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 String toString()
AbstractMOAObject
toString
in class AbstractMOAObject
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.