edu.indiana.iucbrf.feature.unknown
Class DefaultValue

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

public class DefaultValue
extends AbstractUnknownFeatureHandler

Provides a default value for an unknown feature, with which a difference is calculated.

See Also:
Serialized Form

Field Summary
protected  double defaultValue
          The default value, to be used for any feature for which no specific mapping value is provided.
protected  DoubleMap defaultValueMap
          Exceptions to the defaultValue member variable above, for specified features.
protected  Domain domain
           
protected  boolean storeEstimates
          When true, estimated values (calculated by getDefaultValue()) and the confidence are stored in the associated problem.
protected  boolean useEstimates
          When true, estimates are used (if applicable) just as definitely known features in this unknown feature handler.
 
Fields inherited from class edu.indiana.iucbrf.feature.unknown.AbstractUnknownFeatureHandler
debugMode
 
Constructor Summary
protected DefaultValue()
           
protected DefaultValue(Domain domain)
           
  DefaultValue(Domain domain, double defaultValue)
          Creates a new instance of DefaultValue
  DefaultValue(Domain domain, double defaultValue, DoubleMap defaultValueMap)
           
 
Method Summary
 double differenceOfUnknownFeatureImpl(Problem p1, Problem p2, FeatureKey featureOfInterest, java.util.Collection indicesToUse)
           
 boolean equals(java.lang.Object other)
           
 java.lang.String getAbbreviatedName()
          The abbreviated name of this unknown feature handler.
protected  double getCurrentConf()
           
 double getDefaultValue(Problem problemWithUnknownFeature, Problem otherProblem, FeatureKey key)
          If storeEstimates is true, then this will update problemWithUnknownFeature with the estimated feature and corresponding confidence.
 double getDefaultValueImpl(Problem problemWithUnknownFeature, Problem otherProblem, FeatureKey key)
           
 java.lang.String getName()
          The name of this unknown feature handler.
 int hashCode()
           
 void setStoreEstimates(boolean storeEstimates)
          When true, estimated values (calculated by getDefaultValue()) and the confidence are stored in the associated problem.
 void setUseEstimates(boolean useEstimates)
          When true, estimates are used (if applicable) just as definitely known features in this unknown feature handler.
 boolean useEstimates()
          When true, estimates are used (if applicable) just as definitely known features in this unknown feature handler.
 
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, toString, wait, wait, wait
 

Field Detail

defaultValue

protected double defaultValue
The default value, to be used for any feature for which no specific mapping value is provided.


defaultValueMap

protected DoubleMap defaultValueMap
Exceptions to the defaultValue member variable above, for specified features.


storeEstimates

protected boolean storeEstimates
When true, estimated values (calculated by getDefaultValue()) and the confidence are stored in the associated problem.


domain

protected Domain domain

useEstimates

protected boolean useEstimates
When true, estimates are used (if applicable) just as definitely known features in this unknown feature handler.

Constructor Detail

DefaultValue

protected DefaultValue()

DefaultValue

protected DefaultValue(Domain domain)

DefaultValue

public DefaultValue(Domain domain,
                    double defaultValue)
Creates a new instance of DefaultValue


DefaultValue

public DefaultValue(Domain domain,
                    double defaultValue,
                    DoubleMap defaultValueMap)
Method Detail

setUseEstimates

public void setUseEstimates(boolean useEstimates)
When true, estimates are used (if applicable) just as definitely known features in this unknown feature handler.


useEstimates

public boolean useEstimates()
When true, estimates are used (if applicable) just as definitely known features in this unknown feature handler.


setStoreEstimates

public void setStoreEstimates(boolean storeEstimates)
When true, estimated values (calculated by getDefaultValue()) and the confidence are stored in the associated problem.


differenceOfUnknownFeatureImpl

public double differenceOfUnknownFeatureImpl(Problem p1,
                                             Problem p2,
                                             FeatureKey featureOfInterest,
                                             java.util.Collection indicesToUse)
Specified by:
differenceOfUnknownFeatureImpl in class AbstractUnknownFeatureHandler

getDefaultValue

public double getDefaultValue(Problem problemWithUnknownFeature,
                              Problem otherProblem,
                              FeatureKey key)
If storeEstimates is true, then this will update problemWithUnknownFeature with the estimated feature and corresponding confidence.


getCurrentConf

protected double getCurrentConf()

getDefaultValueImpl

public double getDefaultValueImpl(Problem problemWithUnknownFeature,
                                  Problem otherProblem,
                                  FeatureKey key)

getName

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


getAbbreviatedName

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


equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object