

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object gov.sandia.cognition.util.AbstractCloneableSerializable gov.sandia.cognition.statistics.AbstractSufficientStatistic<Double,UnivariateGaussian> gov.sandia.cognition.statistics.distribution.UnivariateGaussian.SufficientStatistic
@PublicationReference(author="Wikipedia", title="Algorithms for calculating variance", year=2011, type=WebPage, url="http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance") public static class UnivariateGaussian.SufficientStatistic
Captures the sufficient statistics of a UnivariateGaussian, which are the values to estimate the mean and variance.
Field Summary  

protected double 
mean
The mean of the Gaussian. 
protected double 
sumSquaredDifferences
This is the sumsquared differences 
Fields inherited from class gov.sandia.cognition.statistics.AbstractSufficientStatistic 

count 
Constructor Summary  

UnivariateGaussian.SufficientStatistic()
Creates a new, empty SufficientStatistic . 

UnivariateGaussian.SufficientStatistic(double defaultVariance)
Creates a new SufficientStatistic with the given value
to initialize the variance. 
Method Summary  

void 
clear()
Resets this set of sufficient statistics to its empty state. 
UnivariateGaussian.SufficientStatistic 
clone()
This makes public the clone method on the Object class and
removes the exception that it throws. 
UnivariateGaussian.PDF 
create()
Creates a new instance of an object. 
void 
create(UnivariateGaussian distribution)
Modifies the given distribution with the parameters indicated by the sufficient statistics 
double 
getMean()
Gets the mean of the Gaussian. 
double 
getSumSquaredDifferences()
Gets the sum of squared differences from the mean. 
double 
getVariance()
Gets the variance of the Gaussian. 
UnivariateGaussian.SufficientStatistic 
plus(UnivariateGaussian.SufficientStatistic other)
Adds this set of sufficient statistics to another and returns the combined sufficient statistics. 
void 
plusEquals(UnivariateGaussian.SufficientStatistic other)
Adds another sufficient statistic to this one. 
void 
update(double value)
Adds a value to the sufficient statistics for the Gaussian. 
void 
update(Double value)
Updates the sufficient statistics from the given value 
Methods inherited from class gov.sandia.cognition.statistics.AbstractSufficientStatistic 

getCount, setCount, update 
Methods inherited from class java.lang.Object 

equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Field Detail 

protected double mean
protected double sumSquaredDifferences
Constructor Detail 

public UnivariateGaussian.SufficientStatistic()
SufficientStatistic
.
public UnivariateGaussian.SufficientStatistic(double defaultVariance)
SufficientStatistic
with the given value
to initialize the variance. This is the initial value for the
sum of squared differences. As the number of elements becomes
larger, the impact of the default variance will decrease.
defaultVariance
 The default variance to use. Must be greater than or equal
to zero.Method Detail 

public UnivariateGaussian.SufficientStatistic clone()
AbstractCloneableSerializable
Object
class and
removes the exception that it throws. Its default behavior is to
automatically create a clone of the exact type of object that the
clone is called on and to copy all primitives but to keep all references,
which means it is a shallow copy.
Extensions of this class may want to override this method (but call
super.clone()
to implement a "smart copy". That is, to target
the most common use case for creating a copy of the object. Because of
the default behavior being a shallow copy, extending classes only need
to handle fields that need to have a deeper copy (or those that need to
be reset). Some of the methods in ObjectUtil
may be helpful in
implementing a custom clone method.
Note: The contract of this method is that you must use
super.clone()
as the basis for your implementation.
clone
in interface CloneableSerializable
clone
in class AbstractSufficientStatistic<Double,UnivariateGaussian>
public void clear()
public UnivariateGaussian.PDF create()
Factory
public void create(UnivariateGaussian distribution)
SufficientStatistic
distribution
 Distribution to modify by side effectpublic void update(Double value)
SufficientStatistic
value
 Value to update the sufficient statisticspublic void update(double value)
value
 The value to add.public UnivariateGaussian.SufficientStatistic plus(UnivariateGaussian.SufficientStatistic other)
other
 The other set of sufficient statistics.
public void plusEquals(UnivariateGaussian.SufficientStatistic other)
other
 The other set of sufficient statistics.public double getMean()
public double getVariance()
public double getSumSquaredDifferences()


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 