Class LearningLiteral
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.classifiers.rules.multilabel.core.LearningLiteral
-
- All Implemented Interfaces:
Configurable
,Serializable
,MOAObject
,OptionHandler
- Direct Known Subclasses:
LearningLiteralClassification
,LearningLiteralRegression
public abstract class LearningLiteral extends AbstractOptionHandler
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description LearningLiteral()
LearningLiteral(int[] outputsToLearn)
-
Method Summary
-
Methods inherited from class moa.options.AbstractOptionHandler
copy, getCLICreationString, getOptions, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse, prepareForUseImpl
-
Methods inherited from class moa.AbstractMOAObject
copy, measureByteSize, measureByteSize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface moa.MOAObject
measureByteSize
-
-
-
-
Field Detail
-
attributeObservers
protected AutoExpandVector<AttributeStatisticsObserver> attributeObservers
-
literalStatistics
protected DoubleVector[] literalStatistics
-
outputsToLearn
protected int[] outputsToLearn
-
inputsToLearn
protected int[] inputsToLearn
-
learner
protected MultiLabelLearner learner
-
errorMeasurer
protected MultiLabelErrorMeasurer errorMeasurer
-
changeDetectors
protected ChangeDetector[] changeDetectors
-
changeDetector
protected ChangeDetector changeDetector
-
anomalyDetector
protected AnomalyDetector anomalyDetector
-
splitCriterion
protected MultiLabelSplitCriterion splitCriterion
-
weightSeen
protected double weightSeen
-
hasStarted
protected boolean hasStarted
-
expandedLearningLiteral
protected LearningLiteral expandedLearningLiteral
-
otherBranchLearningLiteral
protected LearningLiteral otherBranchLearningLiteral
-
otherOutputsLearningLiteral
protected LearningLiteral otherOutputsLearningLiteral
-
bestSuggestion
protected AttributeExpansionSuggestion bestSuggestion
-
numericStatisticsObserver
protected NumericStatisticsObserver numericStatisticsObserver
-
nominalStatisticsObserver
protected NominalStatisticsObserver nominalStatisticsObserver
-
outputSelector
protected OutputAttributesSelector outputSelector
-
inputSelector
protected InputAttributesSelector inputSelector
-
instanceInformation
protected InstanceInformation instanceInformation
-
randomGenerator
protected Random randomGenerator
-
attributesMask
protected boolean[] attributesMask
-
attributesPercentage
protected double attributesPercentage
-
instanceTransformer
protected InstanceTransformer instanceTransformer
-
instanceHeader
protected InstancesHeader instanceHeader
-
-
Method Detail
-
trainOnInstance
public abstract void trainOnInstance(MultiLabelInstance instance)
-
getPredictionForInstance
public Prediction getPredictionForInstance(MultiLabelInstance instance)
-
tryToExpand
public abstract boolean tryToExpand(double splitConfidence, double tieThresholdOption)
-
updateAndCheckChange
public boolean updateAndCheckChange(MultiLabelInstance instance)
-
getNormalizedErrors
protected abstract double[] getNormalizedErrors(Prediction prediction, Instance inst)
-
updateAndCheckAnomalyDetection
public boolean updateAndCheckAnomalyDetection(MultiLabelInstance instance)
-
getWeightSeenSinceExpansion
public double getWeightSeenSinceExpansion()
-
getOutputsToLearn
public int[] getOutputsToLearn()
-
setOutputsToLearn
public void setOutputsToLearn(int[] outputsToLearn)
-
getDescription
public void getDescription(StringBuilder sb, int indent)
Description copied from interface:MOAObject
Returns a string representation of this object. Used inAbstractMOAObject.toString
to give a string representation of the object.- Parameters:
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indent
-
getExpandedLearningLiteral
public LearningLiteral getExpandedLearningLiteral()
-
getOtherBranchLearningLiteral
public LearningLiteral getOtherBranchLearningLiteral()
-
getErrors
public double[] getErrors()
-
setSplitCriterion
public void setSplitCriterion(MultiLabelSplitCriterion splitCriterion)
-
setChangeDetector
public void setChangeDetector(ChangeDetector changeDetector)
-
setAnomalyDetector
public void setAnomalyDetector(AnomalyDetector anomalyDetector)
-
setNumericObserverOption
public void setNumericObserverOption(NumericStatisticsObserver numericStatisticsObserver)
-
setLearner
public void setLearner(MultiLabelLearner learner)
-
setErrorMeasurer
public void setErrorMeasurer(MultiLabelErrorMeasurer errorMeasurer)
-
getBestSuggestion
public AttributeExpansionSuggestion getBestSuggestion()
-
computeHoeffdingBound
public static double computeHoeffdingBound(double range, double confidence, double n)
-
setOutputAttributesSelector
public void setOutputAttributesSelector(OutputAttributesSelector outputSelector)
-
setNominalObserverOption
public void setNominalObserverOption(NominalStatisticsObserver nominalStatisticsObserver)
-
setRandomGenerator
public void setRandomGenerator(Random random)
-
setAttributesPercentage
public void setAttributesPercentage(double attributesPercentage)
-
initializeAttibutesMask
protected int initializeAttibutesMask(MultiLabelInstance inst)
-
setInputAttributesSelector
public void setInputAttributesSelector(InputAttributesSelector inputSelector)
-
getStaticOutput
public abstract String getStaticOutput(InstanceInformation instanceInformation)
-
getInputsToLearn
public int[] getInputsToLearn()
-
setInstanceTransformer
public void setInstanceTransformer(InstanceTransformer instanceTransformer)
-
getOtherOutputsLearningLiteral
public LearningLiteral getOtherOutputsLearningLiteral()
-
setInstanceInformation
public void setInstanceInformation(InstanceInformation instanceInformation)
-
getMeritInputAttributes
public double[] getMeritInputAttributes()
-
getAttributeMask
public boolean[] getAttributeMask()
-
-