Package moa.classifiers.trees.iadem
Class Iadem3
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.classifiers.AbstractClassifier
-
- moa.classifiers.trees.iadem.Iadem2
-
- moa.classifiers.trees.iadem.Iadem3
-
- All Implemented Interfaces:
Configurable
,Serializable
,CapabilitiesHandler
,Classifier
,MultiClassClassifier
,AWTRenderable
,Learner<Example<Instance>>
,MOAObject
,OptionHandler
- Direct Known Subclasses:
Iadem3Subtree
public class Iadem3 extends Iadem2 implements MultiClassClassifier
- Author:
- Isvani FrÃas Blanco (ifriasb at hotmail dot com)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Iadem3.AdaptiveLeafNode
class
Iadem3.AdaptiveLeafNodeNB
class
Iadem3.AdaptiveLeafNodeNBAdaptive
class
Iadem3.AdaptiveLeafNodeNBKirkby
class
Iadem3.AdaptiveLeafNodeWeightedVote
class
Iadem3.AdaptiveNominalVirtualNode
class
Iadem3.AdaptiveNumericVirtualNode
class
Iadem3.AdaptiveSplitNode
static interface
Iadem3.restartsVariablesAtDrift
-
Nested classes/interfaces inherited from class moa.classifiers.trees.iadem.Iadem2
Iadem2.LeafNode, Iadem2.LeafNodeNB, Iadem2.LeafNodeNBKirkby, Iadem2.LeafNodeWeightedVote, Iadem2.Node, Iadem2.NominalVirtualNode, Iadem2.NumericVirtualNode, Iadem2.SplitNode, Iadem2.VirtualNode
-
-
Field Summary
Fields Modifier and Type Field Description protected int
currentSplitState
protected int
deletedTrees
protected int
interchangedTrees
protected int
lastPrediction
protected int
lastPredictionInLeaf
IntOption
maxNestingLevelOption
IntOption
maxSubtreesPerNodeOption
int
numSplitsByBreakingTies
protected int
numTrees
protected boolean
restartAtDrift
protected int
SPLIT_BY_TIE_BREAKING
protected int
SPLIT_WITH_CONFIDENCE
protected AutoExpandVector<Iadem3Subtree>
subtreeList
protected int
treeLevel
-
Fields inherited from class moa.classifiers.trees.iadem.Iadem2
attributeDiferentiation, driftDetectionMethodOption, ERROR_MARGIN, estimator, gracePeriodOption, leafPredictionOption, naiveBayesLimit, numberOfInstancesProcessed, numberOfLeaves, numberOfNodes, numericEstimatorOption, percentInCommon, splitConfidenceOption, splitCriterionOption, splitTestsOption, 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 Iadem3()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSubtree(Iadem3Subtree subtree)
boolean
canCreateSubtree()
void
copyTree(Iadem3Subtree arbol)
void
createRoot(Instance instance)
int
getChangedTrees()
double[]
getClassVotes(Instance instance)
protected void
getClassVotesFromLeaf(Instance instance)
AbstractChangeDetector
getEstimatorCopy()
protected Iadem3
getMainTree()
int
getMaxAltSubtreesPerNode()
int
getMaxNestingLevels()
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.int
getNumberOfSubtrees()
int
getTreeLevel()
protected boolean
hasTree(Iadem2.Node node)
boolean
isRestaurarVectoresPrediccion()
void
learnFromInstance(Instance instance)
void
newDeletedTree()
Iadem2.LeafNode
newLeafNode(Iadem2.Node parent, long instTreeCountSinceVirtual, long instNodeCountSinceVirtual, double[] initialClassCount, Instance instance)
void
newTreeChange()
int
numDeletedTrees()
int
numSubtrees()
int
numTrees()
void
removeSubtree(Iadem3Subtree subtree)
void
updateNumberOfLeaves(int amount)
void
updateNumberOfNodes(int amount)
void
updateNumberOfNodesSplitByTieBreaking(int amount)
-
Methods inherited from class moa.classifiers.trees.iadem.Iadem2
getAttributeDifferentiation, getMaxNumberOfBins, getMeasure, getModelDescription, getNaiveBayesLimit, getNumberOfInstancesProcessed, getNumberOfLeaves, getNumberOfNodes, getNumberOfNodes, getNumericAttObserver, getPercentInCommon, getTreeRoot, getValuesOfNominalAttributes, getVotesForInstance, incrNumberOfInstancesProcessed, isOnlyBinaryTest, isOnlyMultiwayTest, isRandomizable, newEstimator, newNumericClassObserver, newSplit, resetLearningImpl, setNumberOfLeaves, setNumberOfNodes, setTreeRoot, trainOnInstanceImpl
-
Methods inherited from class moa.classifiers.AbstractClassifier
contextIsCompatible, copy, correctlyClassifies, defineImmutableCapabilities, getAttributeNameString, getAWTRenderer, getClassLabelString, getClassNameString, getDescription, getModel, getModelContext, getModelMeasurements, getNominalValueString, getPredictionForInstance, getPredictionForInstance, getPurposeString, getSubClassifiers, getSublearners, getVotesForInstance, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance, trainOnInstance
-
Methods inherited from class moa.options.AbstractOptionHandler
getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
-
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.capabilities.CapabilitiesHandler
getCapabilities
-
Methods inherited from interface moa.MOAObject
measureByteSize
-
Methods inherited from interface moa.options.OptionHandler
getCLICreationString, getOptions, prepareForUse, prepareForUse
-
-
-
-
Field Detail
-
maxNestingLevelOption
public IntOption maxNestingLevelOption
-
maxSubtreesPerNodeOption
public IntOption maxSubtreesPerNodeOption
-
restartAtDrift
protected final boolean restartAtDrift
- See Also:
- Constant Field Values
-
interchangedTrees
protected int interchangedTrees
-
deletedTrees
protected int deletedTrees
-
numTrees
protected int numTrees
-
lastPrediction
protected int lastPrediction
-
lastPredictionInLeaf
protected int lastPredictionInLeaf
-
treeLevel
protected int treeLevel
-
subtreeList
protected AutoExpandVector<Iadem3Subtree> subtreeList
-
currentSplitState
protected int currentSplitState
-
SPLIT_BY_TIE_BREAKING
protected final int SPLIT_BY_TIE_BREAKING
- See Also:
- Constant Field Values
-
SPLIT_WITH_CONFIDENCE
protected final int SPLIT_WITH_CONFIDENCE
- See Also:
- Constant Field Values
-
numSplitsByBreakingTies
public int numSplitsByBreakingTies
-
-
Method Detail
-
getModelMeasurementsImpl
protected Measurement[] getModelMeasurementsImpl()
Description copied from class:AbstractClassifier
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. Note that this will produce compiler errors if not overridden.- Overrides:
getModelMeasurementsImpl
in classIadem2
- Returns:
- an array of measurements to be used in evaluation tasks
-
getEstimatorCopy
public AbstractChangeDetector getEstimatorCopy()
-
createRoot
public void createRoot(Instance instance)
- Overrides:
createRoot
in classIadem2
-
addSubtree
public void addSubtree(Iadem3Subtree subtree)
-
removeSubtree
public void removeSubtree(Iadem3Subtree subtree)
-
canCreateSubtree
public boolean canCreateSubtree()
-
newLeafNode
public Iadem2.LeafNode newLeafNode(Iadem2.Node parent, long instTreeCountSinceVirtual, long instNodeCountSinceVirtual, double[] initialClassCount, Instance instance)
- Overrides:
newLeafNode
in classIadem2
-
getTreeLevel
public int getTreeLevel()
-
getMaxAltSubtreesPerNode
public int getMaxAltSubtreesPerNode()
-
getMaxNestingLevels
public int getMaxNestingLevels()
-
isRestaurarVectoresPrediccion
public boolean isRestaurarVectoresPrediccion()
-
numDeletedTrees
public int numDeletedTrees()
-
numTrees
public int numTrees()
-
newTreeChange
public void newTreeChange()
-
newDeletedTree
public void newDeletedTree()
-
numSubtrees
public int numSubtrees()
-
hasTree
protected boolean hasTree(Iadem2.Node node)
-
learnFromInstance
public void learnFromInstance(Instance instance) throws IademException
- Overrides:
learnFromInstance
in classIadem2
- Throws:
IademException
-
getClassVotesFromLeaf
protected void getClassVotesFromLeaf(Instance instance)
-
copyTree
public void copyTree(Iadem3Subtree arbol)
-
getChangedTrees
public int getChangedTrees()
-
getClassVotes
public double[] getClassVotes(Instance instance)
- Overrides:
getClassVotes
in classIadem2
-
getNumberOfSubtrees
public int getNumberOfSubtrees()
-
getMainTree
protected Iadem3 getMainTree()
-
updateNumberOfLeaves
public void updateNumberOfLeaves(int amount)
-
updateNumberOfNodes
public void updateNumberOfNodes(int amount)
-
updateNumberOfNodesSplitByTieBreaking
public void updateNumberOfNodesSplitByTieBreaking(int amount)
-
-