edu.indiana.iucbrf.feature.stats
Class FeatureStats

java.lang.Object
  extended by edu.indiana.iucbrf.feature.stats.FeatureStats

public class FeatureStats
extends java.lang.Object


Field Summary
protected  CaseBase cb
           
protected  java.util.HashMap dependencies
          Maps FeatureKeys to feature's dependencies
protected  Domain domain
           
protected  java.util.HashMap maxVals
          Maps FeatureKeys to feature's maximum observed value
protected  java.util.HashMap means
          Maps FeatureKeys to mean feature values
protected  java.util.HashMap minVals
          Maps FeatureKeys to feature's minimum observed value
protected  double mostDependentThreshold
           
protected  java.util.HashMap stdDevs
          Maps FeatureKeys to feature's standard deviation
 
Constructor Summary
FeatureStats(CaseBase cb, Domain domain)
          For this constructor, calcStats is called, but calcDependencies() is not.
FeatureStats(CaseBase cb, Domain domain, double mostDependentThreshold)
          For this constructor, both calcStats and calcDpendencies() are called.
 
Method Summary
 void calcDependencies(double mostDependentThreshold)
           
protected  double calcMeanAndMinMax(FeatureKey featureKey)
           
protected  void calcStats()
          This method calls calcMean() and calcStdDev() as well, so they do not need to be called separately.
protected  double calcStdDev(FeatureKey featureKey, double mean)
           
 double getDependence(FeatureKey primary, FeatureKey other)
          Dependence is not necessarily symmetric.
 FeatureDependence getFeatureDependence(FeatureKey primary)
           
 double getMaxValue(FeatureKey key)
           
 double getMean(FeatureKey key)
           
 double getMinValue(FeatureKey key)
           
 java.util.HashSet getMostDependent(FeatureKey primary)
           
 double getStdDev(FeatureKey key)
           
 void setDependencies(double mostDependentThreshold, FeatureKey[] allKeys, double[][] deps)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

means

protected java.util.HashMap means
Maps FeatureKeys to mean feature values


stdDevs

protected java.util.HashMap stdDevs
Maps FeatureKeys to feature's standard deviation


dependencies

protected java.util.HashMap dependencies
Maps FeatureKeys to feature's dependencies


minVals

protected java.util.HashMap minVals
Maps FeatureKeys to feature's minimum observed value


maxVals

protected java.util.HashMap maxVals
Maps FeatureKeys to feature's maximum observed value


mostDependentThreshold

protected double mostDependentThreshold

cb

protected CaseBase cb

domain

protected Domain domain
Constructor Detail

FeatureStats

public FeatureStats(CaseBase cb,
                    Domain domain)
For this constructor, calcStats is called, but calcDependencies() is not. If dependence information is needed, either calcDependencies() or setDependencies() may subsequently be called.


FeatureStats

public FeatureStats(CaseBase cb,
                    Domain domain,
                    double mostDependentThreshold)
For this constructor, both calcStats and calcDpendencies() are called.

Method Detail

getMean

public double getMean(FeatureKey key)

getStdDev

public double getStdDev(FeatureKey key)

getMinValue

public double getMinValue(FeatureKey key)

getMaxValue

public double getMaxValue(FeatureKey key)

calcStats

protected void calcStats()
This method calls calcMean() and calcStdDev() as well, so they do not need to be called separately.


calcMeanAndMinMax

protected double calcMeanAndMinMax(FeatureKey featureKey)

calcStdDev

protected double calcStdDev(FeatureKey featureKey,
                            double mean)

getFeatureDependence

public FeatureDependence getFeatureDependence(FeatureKey primary)

getDependence

public double getDependence(FeatureKey primary,
                            FeatureKey other)
Dependence is not necessarily symmetric. This method returns the degree of effect that other has on primary. Dependence is measured from 0 (completely independent) to 1 (completely dependent).


getMostDependent

public java.util.HashSet getMostDependent(FeatureKey primary)

setDependencies

public void setDependencies(double mostDependentThreshold,
                            FeatureKey[] allKeys,
                            double[][] deps)

calcDependencies

public void calcDependencies(double mostDependentThreshold)

toString

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