public class MultiLabelNominalAttributeObserver extends AbstractOptionHandler implements NominalStatisticsObserver
Modifier and Type | Field and Description |
---|---|
protected FlagOption |
addUndeclaredValuesOption |
protected HashMap<Integer,DoubleVector[]> |
statisticsByNominalValue |
config
Constructor and Description |
---|
MultiLabelNominalAttributeObserver() |
Modifier and Type | Method and Description |
---|---|
AttributeExpansionSuggestion |
getBestEvaluatedSplitSuggestion(MultiLabelSplitCriterion criterion,
DoubleVector[] preSplitStatistics,
int inputAttributeIndex)
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 |
observeAttribute(double inputAttributeValue,
DoubleVector[] observedStatistics)
Updates statistics of this observer given an attribute value, the index of the statistic
and the weight of the instance observed
|
protected void |
prepareForUseImpl(TaskMonitor monitor,
ObjectRepository repository)
This method describes the implementation of how to prepare this object for use.
|
copy, getCLICreationString, getOptions, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
copy, getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
measureByteSize
protected FlagOption addUndeclaredValuesOption
protected HashMap<Integer,DoubleVector[]> statisticsByNominalValue
public void observeAttribute(double inputAttributeValue, DoubleVector[] observedStatistics)
AttributeStatisticsObserver
observeAttribute
in interface AttributeStatisticsObserver
inputAttributeValue
- the value for the attribute attributeobservedStatistics
- numOutputs x numStatistics the index of the statistic to storepublic AttributeExpansionSuggestion getBestEvaluatedSplitSuggestion(MultiLabelSplitCriterion criterion, DoubleVector[] preSplitStatistics, int inputAttributeIndex)
AttributeStatisticsObserver
getBestEvaluatedSplitSuggestion
in interface AttributeStatisticsObserver
criterion
- the split criterion to usepublic void getDescription(StringBuilder sb, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.getDescription
in interface MOAObject
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 AbstractOptionHandler
monitor
- the TaskMonitor to userepository
- the ObjectRepository to useCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.