gov.sandia.cognition.statistics.distribution
Class UnivariateGaussian.IncrementalEstimator

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.AbstractBatchAndIncrementalLearner<DataType,SufficientStatisticsType>
          extended by gov.sandia.cognition.statistics.AbstractIncrementalEstimator<Double,UnivariateGaussian,UnivariateGaussian.SufficientStatistic>
              extended by gov.sandia.cognition.statistics.distribution.UnivariateGaussian.IncrementalEstimator
All Implemented Interfaces:
BatchAndIncrementalLearner<Double,UnivariateGaussian.SufficientStatistic>, BatchLearner<Collection<? extends Double>,UnivariateGaussian.SufficientStatistic>, IncrementalLearner<Double,UnivariateGaussian.SufficientStatistic>, IncrementalEstimator<Double,UnivariateGaussian,UnivariateGaussian.SufficientStatistic>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
UnivariateGaussian

public static class UnivariateGaussian.IncrementalEstimator
extends AbstractIncrementalEstimator<Double,UnivariateGaussian,UnivariateGaussian.SufficientStatistic>

Implements an incremental estimator for the sufficient statistics for a UnivariateGaussian.

See Also:
Serialized Form

Field Summary
static double DEFAULT_DEFAULT_VARIANCE
          The default value for the default variance is 1.0E-5.
protected  double defaultVariance
          Amount to add to the variance to keep it from being 0.0.
 
Constructor Summary
UnivariateGaussian.IncrementalEstimator()
          Creates a new IncrementalEstimator.
UnivariateGaussian.IncrementalEstimator(double defaultVariance)
          Creates a new IncrementalEstimator with the given default variance.
 
Method Summary
 UnivariateGaussian.SufficientStatistic createInitialLearnedObject()
          Creates a new initial learned object, before any data is given.
 double getDefaultVariance()
          Gets the default variance, which is the amount added to the variance.
 void setDefaultVariance(double defaultVariance)
          Sets the default variance, which is the amount added to the variance.
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractIncrementalEstimator
clone, update
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.AbstractBatchAndIncrementalLearner
learn, learn, update
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.BatchAndIncrementalLearner
learn
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.BatchLearner
learn
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.IncrementalLearner
update
 

Field Detail

DEFAULT_DEFAULT_VARIANCE

public static final double DEFAULT_DEFAULT_VARIANCE
The default value for the default variance is 1.0E-5.

See Also:
Constant Field Values

defaultVariance

protected double defaultVariance
Amount to add to the variance to keep it from being 0.0.

Constructor Detail

UnivariateGaussian.IncrementalEstimator

public UnivariateGaussian.IncrementalEstimator()
Creates a new IncrementalEstimator.


UnivariateGaussian.IncrementalEstimator

public UnivariateGaussian.IncrementalEstimator(double defaultVariance)
Creates a new IncrementalEstimator with the given default variance.

Parameters:
defaultVariance - The default variance. Cannot be negative.
Method Detail

createInitialLearnedObject

public UnivariateGaussian.SufficientStatistic createInitialLearnedObject()
Description copied from interface: IncrementalLearner
Creates a new initial learned object, before any data is given.

Returns:
The initial learned object.

getDefaultVariance

public double getDefaultVariance()
Gets the default variance, which is the amount added to the variance. If this is greater than zero, it avoids creating zero variance.

Returns:
The default variance. Cannot be negative.

setDefaultVariance

public void setDefaultVariance(double defaultVariance)
Sets the default variance, which is the amount added to the variance. If this is greater than zero, it avoids creating zero variance.

Parameters:
defaultVariance - The default variance. Cannot be negative.