Class FIMTDDNumericAttributeClassObserver
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.classifiers.core.attributeclassobservers.BinaryTreeNumericAttributeClassObserver
-
- moa.classifiers.core.attributeclassobservers.FIMTDDNumericAttributeClassObserver
-
- All Implemented Interfaces:
Configurable
,Serializable
,AttributeClassObserver
,NumericAttributeClassObserver
,MOAObject
,OptionHandler
- Direct Known Subclasses:
FIMTDDNumericAttributeClassLimitObserver
public class FIMTDDNumericAttributeClassObserver extends BinaryTreeNumericAttributeClassObserver implements NumericAttributeClassObserver
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
FIMTDDNumericAttributeClassObserver.Node
-
Field Summary
Fields Modifier and Type Field Description protected FIMTDDNumericAttributeClassObserver.Node
root
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description FIMTDDNumericAttributeClassObserver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeSplitSuggestion
getBestEvaluatedSplitSuggestion(SplitCriterion criterion, double[] preSplitDist, int attIndex, boolean binaryOnly)
Gets the best split suggestion given a criterion and a class distributionvoid
getDescription(StringBuilder sb, int indent)
Returns a string representation of this object.void
observeAttributeClass(double attVal, double classVal, double weight)
protected void
prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
This method describes the implementation of how to prepare this object for use.double
probabilityOfAttributeValueGivenClass(double attVal, int classVal)
Gets the probability for an attribute value given a classvoid
removeBadSplits(SplitCriterion criterion, double lastCheckRatio, double lastCheckSDR, double lastCheckE)
A method to remove all nodes in the E-BST in which it and all it's children represent 'bad' split pointsprotected AttributeSplitSuggestion
searchForBestSplitOption(FIMTDDNumericAttributeClassObserver.Node currentNode, AttributeSplitSuggestion currentBestOption, SplitCriterion criterion, int attIndex)
Implementation of the FindBestSplit algorithm from E.Ikonomovska et al.-
Methods inherited from class moa.classifiers.core.attributeclassobservers.BinaryTreeNumericAttributeClassObserver
observeAttributeClass, observeAttributeTarget, searchForBestSplitOption
-
Methods inherited from class moa.options.AbstractOptionHandler
copy, getCLICreationString, getOptions, getPreparedClassOption, getPurposeString, 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.classifiers.core.attributeclassobservers.AttributeClassObserver
observeAttributeClass, observeAttributeTarget
-
Methods inherited from interface moa.MOAObject
measureByteSize
-
Methods inherited from interface moa.options.OptionHandler
copy, getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
-
-
-
-
Field Detail
-
root
protected FIMTDDNumericAttributeClassObserver.Node root
-
-
Method Detail
-
observeAttributeClass
public void observeAttributeClass(double attVal, double classVal, double weight)
-
probabilityOfAttributeValueGivenClass
public double probabilityOfAttributeValueGivenClass(double attVal, int classVal)
Description copied from interface:AttributeClassObserver
Gets the probability for an attribute value given a class- Specified by:
probabilityOfAttributeValueGivenClass
in interfaceAttributeClassObserver
- Overrides:
probabilityOfAttributeValueGivenClass
in classBinaryTreeNumericAttributeClassObserver
- Parameters:
attVal
- the attribute valueclassVal
- the class- Returns:
- probability for an attribute value given a class
-
getBestEvaluatedSplitSuggestion
public AttributeSplitSuggestion getBestEvaluatedSplitSuggestion(SplitCriterion criterion, double[] preSplitDist, int attIndex, boolean binaryOnly)
Description copied from interface:AttributeClassObserver
Gets the best split suggestion given a criterion and a class distribution- Specified by:
getBestEvaluatedSplitSuggestion
in interfaceAttributeClassObserver
- Overrides:
getBestEvaluatedSplitSuggestion
in classBinaryTreeNumericAttributeClassObserver
- Parameters:
criterion
- the split criterion to usepreSplitDist
- the class distribution before the splitattIndex
- the attribute indexbinaryOnly
- true to use binary splits- Returns:
- suggestion of best attribute split
-
searchForBestSplitOption
protected AttributeSplitSuggestion searchForBestSplitOption(FIMTDDNumericAttributeClassObserver.Node currentNode, AttributeSplitSuggestion currentBestOption, SplitCriterion criterion, int attIndex)
Implementation of the FindBestSplit algorithm from E.Ikonomovska et al.
-
removeBadSplits
public void removeBadSplits(SplitCriterion criterion, double lastCheckRatio, double lastCheckSDR, double lastCheckE)
A method to remove all nodes in the E-BST in which it and all it's children represent 'bad' split points
-
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.- Specified by:
getDescription
in interfaceMOAObject
- Overrides:
getDescription
in classBinaryTreeNumericAttributeClassObserver
- Parameters:
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indent
-
prepareForUseImpl
protected void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
Description copied from class:AbstractOptionHandler
This method describes the implementation of how to prepare this object for use. All classes that extends this class have to implementprepareForUseImpl
and notprepareForUse
sinceprepareForUse
callsprepareForUseImpl
.- Overrides:
prepareForUseImpl
in classBinaryTreeNumericAttributeClassObserver
- Parameters:
monitor
- the TaskMonitor to userepository
- the ObjectRepository to use
-
-