public static class UnivariateGaussian.MaximumLikelihoodEstimator extends AbstractCloneableSerializable implements DistributionEstimator<java.lang.Double,UnivariateGaussian.PDF>
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_VARIANCE
Typical value of a defaultVariance, 1.0E-5
|
Constructor and Description |
---|
MaximumLikelihoodEstimator()
Default constructor
|
MaximumLikelihoodEstimator(double defaultVariance)
Creates a new instance of MaximumLikelihoodEstimator
|
Modifier and Type | Method and Description |
---|---|
double |
getDefaultVariance()
Gets the default variance, which is the amount added to the variance.
|
UnivariateGaussian.PDF |
learn(java.util.Collection<? extends java.lang.Double> data)
Creates a new instance of UnivariateGaussian from the given data
|
static UnivariateGaussian.PDF |
learn(java.util.Collection<? extends java.lang.Number> data,
double defaultVariance)
Creates a new instance of UnivariateGaussian from the given data
|
void |
setDefaultVariance(double defaultVariance)
Sets the default variance, which is the amount added to the variance.
|
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
public static final double DEFAULT_VARIANCE
public MaximumLikelihoodEstimator()
public MaximumLikelihoodEstimator(double defaultVariance)
defaultVariance
- Amount to add to the variance to keep it from being 0.0public UnivariateGaussian.PDF learn(java.util.Collection<? extends java.lang.Double> data)
learn
in interface BatchLearner<java.util.Collection<? extends java.lang.Double>,UnivariateGaussian.PDF>
data
- Data to fit a UnivariateGaussian againstpublic static UnivariateGaussian.PDF learn(java.util.Collection<? extends java.lang.Number> data, double defaultVariance)
data
- Data to fit a UnivariateGaussian againstdefaultVariance
- Amount to add to the variance to keep it from being 0.0public double getDefaultVariance()
public void setDefaultVariance(double defaultVariance)
defaultVariance
- The default variance. Cannot be negative.