public class FIMTDDNumericAttributeClassObserver extends BinaryTreeNumericAttributeClassObserver implements NumericAttributeClassObserver
Modifier and Type | Class and Description |
---|---|
protected class |
FIMTDDNumericAttributeClassObserver.Node |
Modifier and Type | Field and Description |
---|---|
protected FIMTDDNumericAttributeClassObserver.Node |
root |
classOptionNamesToPreparedObjects, options
Constructor and Description |
---|
FIMTDDNumericAttributeClassObserver() |
Modifier and Type | Method and Description |
---|---|
AttributeSplitSuggestion |
getBestEvaluatedSplitSuggestion(SplitCriterion criterion,
double[] preSplitDist,
int attIndex,
boolean binaryOnly)
Gets the best split suggestion given a criterion and a class distribution
|
void |
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 class
|
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
|
protected AttributeSplitSuggestion |
searchForBestSplitOption(FIMTDDNumericAttributeClassObserver.Node currentNode,
AttributeSplitSuggestion currentBestOption,
SplitCriterion criterion,
int attIndex)
Implementation of the FindBestSplit algorithm from E.Ikonomovska et al.
|
observeAttributeClass, observeAttributeTarget, searchForBestSplitOption
copy, discoverOptionsViaReflection, getCLICreationString, getOptions, getPreparedClassOption, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
observeAttributeClass, observeAttributeTarget
copy, getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
measureByteSize
protected FIMTDDNumericAttributeClassObserver.Node root
public void observeAttributeClass(double attVal, double classVal, double weight)
public double probabilityOfAttributeValueGivenClass(double attVal, int classVal)
AttributeClassObserver
probabilityOfAttributeValueGivenClass
in interface AttributeClassObserver
probabilityOfAttributeValueGivenClass
in class BinaryTreeNumericAttributeClassObserver
attVal
- the attribute valueclassVal
- the classpublic AttributeSplitSuggestion getBestEvaluatedSplitSuggestion(SplitCriterion criterion, double[] preSplitDist, int attIndex, boolean binaryOnly)
AttributeClassObserver
getBestEvaluatedSplitSuggestion
in interface AttributeClassObserver
getBestEvaluatedSplitSuggestion
in class BinaryTreeNumericAttributeClassObserver
criterion
- the split criterion to usepreSplitDist
- the class distribution before the splitattIndex
- the attribute indexbinaryOnly
- true to use binary splitsprotected AttributeSplitSuggestion searchForBestSplitOption(FIMTDDNumericAttributeClassObserver.Node currentNode, AttributeSplitSuggestion currentBestOption, SplitCriterion criterion, int attIndex)
public void removeBadSplits(SplitCriterion criterion, double lastCheckRatio, double lastCheckSDR, double lastCheckE)
public void getDescription(StringBuilder sb, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.getDescription
in interface MOAObject
getDescription
in class BinaryTreeNumericAttributeClassObserver
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indentprotected void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractOptionHandler
prepareForUseImpl
and not prepareForUse
since
prepareForUse
calls prepareForUseImpl
.prepareForUseImpl
in class BinaryTreeNumericAttributeClassObserver
monitor
- the TaskMonitor to userepository
- the ObjectRepository to useCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.