Package moa.classifiers.multilabel
Class MultilabelHoeffdingTree
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.classifiers.AbstractClassifier
-
- moa.classifiers.trees.HoeffdingTree
-
- moa.classifiers.trees.HoeffdingTreeClassifLeaves
-
- moa.classifiers.multilabel.MultilabelHoeffdingTree
-
- All Implemented Interfaces:
Configurable
,Serializable
,CapabilitiesHandler
,Classifier
,MultiClassClassifier
,MultiLabelLearner
,MultiTargetRegressor
,AWTRenderable
,Learner<Example<Instance>>
,MOAObject
,OptionHandler
public class MultilabelHoeffdingTree extends HoeffdingTreeClassifLeaves implements MultiLabelLearner, MultiTargetRegressor
Hoeffding Tree for classifying multi-label data. A Hoeffding tree is an incremental, anytime decision tree induction algorithm that is capable of learning from massive data streams, assuming that the distribution generating examples does not change over time.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultilabelHoeffdingTree.MultilabelInactiveLearningNode
class
MultilabelHoeffdingTree.MultilabelLearningNodeClassifier
-
Nested classes/interfaces inherited from class moa.classifiers.trees.HoeffdingTreeClassifLeaves
HoeffdingTreeClassifLeaves.LearningNodeClassifier
-
Nested classes/interfaces inherited from class moa.classifiers.trees.HoeffdingTree
HoeffdingTree.ActiveLearningNode, HoeffdingTree.FoundNode, HoeffdingTree.InactiveLearningNode, HoeffdingTree.LearningNode, HoeffdingTree.LearningNodeNB, HoeffdingTree.LearningNodeNBAdaptive, HoeffdingTree.Node, HoeffdingTree.SplitNode
-
-
Field Summary
-
Fields inherited from class moa.classifiers.trees.HoeffdingTreeClassifLeaves
learnerOption
-
Fields inherited from class moa.classifiers.trees.HoeffdingTree
activeLeafByteSizeEstimate, activeLeafNodeCount, binarySplitsOption, byteSizeEstimateOverheadFraction, decisionNodeCount, gracePeriodOption, growthAllowed, inactiveLeafByteSizeEstimate, inactiveLeafNodeCount, leafpredictionOption, maxByteSizeOption, memoryEstimatePeriodOption, nbThresholdOption, nominalEstimatorOption, noPrePruneOption, numericEstimatorOption, removePoorAttsOption, splitConfidenceOption, splitCriterionOption, stopMemManagementOption, tieThresholdOption, treeRoot
-
Fields inherited from class moa.classifiers.AbstractClassifier
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description MultilabelHoeffdingTree()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
deactivateLearningNode(HoeffdingTree.ActiveLearningNode toDeactivate, HoeffdingTree.SplitNode parent, int parentBranch)
Prediction
getPredictionForInstance(MultiLabelInstance inst)
Prediction
getPredictionForInstance(Example<Instance> example)
static List<Integer>
getRelevantLabels(Instance x)
protected HoeffdingTree.LearningNode
newLearningNode(double[] initialClassObservations)
protected HoeffdingTree.LearningNode
newLearningNode(double[] initialClassObservations, Classifier cl)
void
trainOnInstance(Instance inst)
Trains this learner incrementally using the given example.void
trainOnInstanceImpl(MultiLabelInstance instance)
-
Methods inherited from class moa.classifiers.trees.HoeffdingTreeClassifLeaves
attemptToSplit
-
Methods inherited from class moa.classifiers.trees.HoeffdingTree
activateLearningNode, calcByteSize, computeHoeffdingBound, deactivateAllLeaves, defineImmutableCapabilities, enforceTrackerLimit, estimateModelByteSizes, findLearningNodes, findLearningNodes, getModelDescription, getModelMeasurementsImpl, getNodeCount, getPurposeString, getTreeRoot, getVotesForInstance, isRandomizable, measureByteSize, measureTreeDepth, newLearningNode, newNominalClassObserver, newNumericClassObserver, newSplitNode, newSplitNode, resetLearningImpl, trainOnInstanceImpl
-
Methods inherited from class moa.classifiers.AbstractClassifier
contextIsCompatible, copy, correctlyClassifies, getAttributeNameString, getAWTRenderer, getClassLabelString, getClassNameString, getDescription, getModel, getModelContext, getModelMeasurements, getNominalValueString, getPredictionForInstance, getSubClassifiers, getSublearners, getVotesForInstance, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance
-
Methods inherited from class moa.options.AbstractOptionHandler
getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
-
Methods inherited from class moa.AbstractMOAObject
copy, measureByteSize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface moa.gui.AWTRenderable
getAWTRenderer
-
Methods inherited from interface moa.capabilities.CapabilitiesHandler
getCapabilities
-
Methods inherited from interface moa.classifiers.Classifier
copy, correctlyClassifies, getPredictionForInstance, getSubClassifiers, getVotesForInstance
-
Methods inherited from interface moa.learners.Learner
getModel, getModelContext, getModelMeasurements, getSublearners, getVotesForInstance, isRandomizable, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance
-
Methods inherited from interface moa.MOAObject
getDescription, measureByteSize
-
Methods inherited from interface moa.options.OptionHandler
getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
-
-
-
-
Method Detail
-
newLearningNode
protected HoeffdingTree.LearningNode newLearningNode(double[] initialClassObservations)
- Overrides:
newLearningNode
in classHoeffdingTreeClassifLeaves
-
newLearningNode
protected HoeffdingTree.LearningNode newLearningNode(double[] initialClassObservations, Classifier cl)
- Overrides:
newLearningNode
in classHoeffdingTreeClassifLeaves
-
deactivateLearningNode
protected void deactivateLearningNode(HoeffdingTree.ActiveLearningNode toDeactivate, HoeffdingTree.SplitNode parent, int parentBranch)
- Overrides:
deactivateLearningNode
in classHoeffdingTree
-
getPredictionForInstance
public Prediction getPredictionForInstance(Example<Instance> example)
- Specified by:
getPredictionForInstance
in interfaceLearner<Example<Instance>>
- Overrides:
getPredictionForInstance
in classAbstractClassifier
-
getPredictionForInstance
public Prediction getPredictionForInstance(MultiLabelInstance inst)
- Specified by:
getPredictionForInstance
in interfaceMultiLabelLearner
-
trainOnInstance
public void trainOnInstance(Instance inst)
Description copied from interface:Classifier
Trains this learner incrementally using the given example.- Specified by:
trainOnInstance
in interfaceClassifier
- Overrides:
trainOnInstance
in classAbstractClassifier
- Parameters:
inst
- the instance to be used for training
-
trainOnInstanceImpl
public void trainOnInstanceImpl(MultiLabelInstance instance)
- Specified by:
trainOnInstanceImpl
in interfaceMultiLabelLearner
-
-