public class BinaryTreeNumericAttributeClassObserver extends AbstractOptionHandler implements NumericAttributeClassObserver
| Modifier and Type | Class and Description |
|---|---|
class |
BinaryTreeNumericAttributeClassObserver.Node |
| Modifier and Type | Field and Description |
|---|---|
BinaryTreeNumericAttributeClassObserver.Node |
root |
classOptionNamesToPreparedObjects, options| Constructor and Description |
|---|
BinaryTreeNumericAttributeClassObserver() |
| 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,
int classVal,
double weight)
Updates statistics of this observer given an attribute value, a class
and the weight of the instance observed
|
void |
observeAttributeTarget(double attVal,
double target) |
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
|
protected AttributeSplitSuggestion |
searchForBestSplitOption(BinaryTreeNumericAttributeClassObserver.Node currentNode,
AttributeSplitSuggestion currentBestOption,
double[] actualParentLeft,
double[] parentLeft,
double[] parentRight,
boolean leftChild,
SplitCriterion criterion,
double[] preSplitDist,
int attIndex) |
copy, discoverOptionsViaReflection, getCLICreationString, getOptions, getPreparedClassOption, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUsecopy, measureByteSize, measureByteSize, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcopy, getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUsemeasureByteSizepublic BinaryTreeNumericAttributeClassObserver.Node root
public BinaryTreeNumericAttributeClassObserver()
public void observeAttributeClass(double attVal,
int classVal,
double weight)
AttributeClassObserverobserveAttributeClass in interface AttributeClassObserverattVal - the value of the attributeclassVal - the classweight - the weight of the instancepublic double probabilityOfAttributeValueGivenClass(double attVal,
int classVal)
AttributeClassObserverprobabilityOfAttributeValueGivenClass in interface AttributeClassObserverattVal - the attribute valueclassVal - the classpublic AttributeSplitSuggestion getBestEvaluatedSplitSuggestion(SplitCriterion criterion, double[] preSplitDist, int attIndex, boolean binaryOnly)
AttributeClassObservergetBestEvaluatedSplitSuggestion in interface AttributeClassObservercriterion - the split criterion to usepreSplitDist - the class distribution before the splitattIndex - the attribute indexbinaryOnly - true to use binary splitsprotected AttributeSplitSuggestion searchForBestSplitOption(BinaryTreeNumericAttributeClassObserver.Node currentNode, AttributeSplitSuggestion currentBestOption, double[] actualParentLeft, double[] parentLeft, double[] parentRight, boolean leftChild, SplitCriterion criterion, double[] preSplitDist, int attIndex)
public void getDescription(StringBuilder sb, int indent)
MOAObjectAbstractMOAObject.toString
to give a string representation of the object.getDescription in interface MOAObjectsb - the stringbuilder to add the descriptionindent - the number of characters to indentprotected void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractOptionHandlerprepareForUseImpl
and not prepareForUse since
prepareForUse calls prepareForUseImpl.prepareForUseImpl in class AbstractOptionHandlermonitor - the TaskMonitor to userepository - the ObjectRepository to usepublic void observeAttributeTarget(double attVal,
double target)
observeAttributeTarget in interface AttributeClassObserverCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.