edu.indiana.iucbrf.feature.unknown
Class RegionAggregate

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.RegionAggregate
All Implemented Interfaces:
FeatureCollectionListener, UnknownFeatureHandler, java.io.Serializable, java.util.EventListener
Direct Known Subclasses:
BayesianConsistentRegionAggregate, OracleRegionAggregate

public class RegionAggregate
extends DefaultValue
implements FeatureCollectionListener

Provides a "default" value for an unknown feature, obtained from the aggregate value of that feature for all cases in the current class.

See Also:
Serialized Form

Field Summary
protected  PartitionedCaseBase cb
           
protected  int currentEqClass
          The ID of the equivalence class corresponding to currentProblem.
protected  Problem currentProblem
          The most recent problem for which an equivalence class was found.
protected  FullAggregate[] fullAggValues
           
 
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
RegionAggregate(PartitionedCaseBase cb)
          Creates a new instance of CaseBasedMeanValue
 
Method Summary
 double differenceOfUnknownFeatureImpl(Problem p1, Problem p2, FeatureKey featureOfInterest, java.util.Collection indicesToUse)
           
 void featureAdded(FeatureCollectionEvent cle)
           
 void featureChanged(FeatureCollectionEvent list_event)
           
 void featureRemoved(FeatureCollectionEvent list_event)
           
 void featureReplaced(FeatureCollectionEvent list_event)
           
 void featuresCleared(FeatureCollectionEvent list_event)
           
protected  void finalize()
          Returns the nearest equivalence class index.
 java.lang.String getAbbreviatedName()
          The abbreviated name of this unknown feature handler.
protected  double getCurrentConf()
           
 double getDefaultValueImpl(Problem problemWithUnknownFeature, Problem otherProblem, FeatureKey key)
           
 java.lang.String getName()
          The name of this unknown feature handler.
protected  int getNearestEqClass(Problem newP)
           
protected  int getNearestEqClassImpl(Problem searchProblem)
           
 int getPreviouslySetGuessOfEqClass()
          Returns currentEqClass, the eq class most recently guessed to be the correct one by this RA ufh.
 
Methods inherited from class edu.indiana.iucbrf.feature.unknown.DefaultValue
equals, getDefaultValue, hashCode, setStoreEstimates, setUseEstimates, useEstimates
 
Methods inherited from class edu.indiana.iucbrf.feature.unknown.AbstractUnknownFeatureHandler
differenceOfUnknownFeature, getDebugMode, setDebugMode
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cb

protected PartitionedCaseBase cb

fullAggValues

protected FullAggregate[] fullAggValues

currentProblem

protected Problem currentProblem
The most recent problem for which an equivalence class was found.


currentEqClass

protected int currentEqClass
The ID of the equivalence class corresponding to currentProblem.

Constructor Detail

RegionAggregate

public RegionAggregate(PartitionedCaseBase cb)
Creates a new instance of CaseBasedMeanValue

Method Detail

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:
getDefaultValueImpl in class DefaultValue

getCurrentConf

protected double getCurrentConf()
Overrides:
getCurrentConf in class DefaultValue

getNearestEqClass

protected int getNearestEqClass(Problem newP)

getNearestEqClassImpl

protected int getNearestEqClassImpl(Problem searchProblem)

finalize

protected void finalize()
Returns the nearest equivalence class index. This is either from the cache, or calculated from scratch if necessary.

Overrides:
finalize in class java.lang.Object

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

getPreviouslySetGuessOfEqClass

public int getPreviouslySetGuessOfEqClass()
Returns currentEqClass, the eq class most recently guessed to be the correct one by this RA ufh.

Returns:
int

featureAdded

public void featureAdded(FeatureCollectionEvent cle)
Specified by:
featureAdded in interface FeatureCollectionListener

featureChanged

public void featureChanged(FeatureCollectionEvent list_event)
Specified by:
featureChanged in interface FeatureCollectionListener

featureRemoved

public void featureRemoved(FeatureCollectionEvent list_event)
Specified by:
featureRemoved in interface FeatureCollectionListener

featureReplaced

public void featureReplaced(FeatureCollectionEvent list_event)
Specified by:
featureReplaced in interface FeatureCollectionListener

featuresCleared

public void featuresCleared(FeatureCollectionEvent list_event)
Specified by:
featuresCleared in interface FeatureCollectionListener