edu.indiana.iucbrf.feature.unknown
Class FullAggregate

java.lang.Object
  extended by edu.indiana.iucbrf.feature.unknown.AbstractUnknownFeatureHandler
      extended by edu.indiana.iucbrf.feature.unknown.DefaultValue
          extended by edu.indiana.iucbrf.feature.unknown.FullAggregate
All Implemented Interfaces:
UnknownFeatureHandler, java.io.Serializable

public class FullAggregate
extends DefaultValue

Provides a "default" value for an unknown feature, obtained from the average value of that feature for all cases in the case base. Note that when cases are added to the case base that was sent to the constructor, aggregates are automatically updated, since this is registered as a CaseBaseListener.

See Also:
Serialized Form

Field Summary
 AggregateFeatureValueSet aggs
           
protected  double currentConf
           
protected  double totalNumFeaturesPlus1
           
 
Fields inherited from class edu.indiana.iucbrf.feature.unknown.DefaultValue
defaultValue, defaultValueMap, domain, storeEstimates, useEstimates
 
Fields inherited from class edu.indiana.iucbrf.feature.unknown.AbstractUnknownFeatureHandler
debugMode
 
Constructor Summary
protected FullAggregate()
           
  FullAggregate(Domain domain, CaseBase cb)
          Creates a new instance of FullAggregate The MeanFeatureValueSet will be a CaseBaseListener for changes in cb.
 
Method Summary
 double differenceOfUnknownFeatureImpl(Problem p1, Problem p2, FeatureKey featureOfInterest, java.util.Collection indicesToUse)
           
 boolean equals(java.lang.Object otherObj)
           
 java.lang.String getAbbreviatedName()
          The abbreviated name of this unknown feature handler.
protected  double getCurrentConf()
          Get the confidence in the value most recently calculated by getDefaultValue().
 double getDefaultValueImpl(Problem problemWithUnknownFeature, Problem otherProblem, FeatureKey key)
          Overrides DefaultValue.getDefaultValue().
 java.lang.String getName()
          The name of this unknown feature handler.
 int hashCode()
           
 void recalculateAggValues(CaseBase cb)
           
 java.lang.String toString()
           
 
Methods inherited from class edu.indiana.iucbrf.feature.unknown.DefaultValue
getDefaultValue, setStoreEstimates, setUseEstimates, useEstimates
 
Methods inherited from class edu.indiana.iucbrf.feature.unknown.AbstractUnknownFeatureHandler
differenceOfUnknownFeature, getDebugMode, setDebugMode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

aggs

public AggregateFeatureValueSet aggs

currentConf

protected double currentConf

totalNumFeaturesPlus1

protected double totalNumFeaturesPlus1
Constructor Detail

FullAggregate

protected FullAggregate()

FullAggregate

public FullAggregate(Domain domain,
                     CaseBase cb)
Creates a new instance of FullAggregate The MeanFeatureValueSet will be a CaseBaseListener for changes in cb.

Method Detail

recalculateAggValues

public void recalculateAggValues(CaseBase cb)

differenceOfUnknownFeatureImpl

public double differenceOfUnknownFeatureImpl(Problem p1,
                                             Problem p2,
                                             FeatureKey featureOfInterest,
                                             java.util.Collection indicesToUse)
Overrides:
differenceOfUnknownFeatureImpl in class DefaultValue

getDefaultValueImpl

public double getDefaultValueImpl(Problem problemWithUnknownFeature,
                                  Problem otherProblem,
                                  FeatureKey key)
Overrides DefaultValue.getDefaultValue().

Overrides:
getDefaultValueImpl in class DefaultValue

getCurrentConf

protected double getCurrentConf()
Get the confidence in the value most recently calculated by getDefaultValue().

Overrides:
getCurrentConf in class DefaultValue

getName

public java.lang.String getName()
The name of this unknown feature handler.

Specified by:
getName in interface UnknownFeatureHandler
Overrides:
getName in class DefaultValue

getAbbreviatedName

public java.lang.String getAbbreviatedName()
The abbreviated name of this unknown feature handler.

Specified by:
getAbbreviatedName in interface UnknownFeatureHandler
Overrides:
getAbbreviatedName in class DefaultValue

equals

public boolean equals(java.lang.Object otherObj)
Overrides:
equals in class DefaultValue

hashCode

public int hashCode()
Overrides:
hashCode in class DefaultValue

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object