Package weka.estimators
Class UnivariateNormalEstimator
- java.lang.Object
-
- weka.estimators.UnivariateNormalEstimator
-
- All Implemented Interfaces:
java.io.Serializable,RevisionHandler,UnivariateDensityEstimator,UnivariateIntervalEstimator,UnivariateQuantileEstimator
public class UnivariateNormalEstimator extends java.lang.Object implements UnivariateDensityEstimator, UnivariateIntervalEstimator, UnivariateQuantileEstimator, java.io.Serializable
Simple weighted normal density estimator.- Version:
- $Revision: 11318 $
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static doubleCONSTConstant for Gaussian density
-
Constructor Summary
Constructors Constructor Description UnivariateNormalEstimator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(double value, double weight)Adds a value to the density estimator.java.lang.StringgetRevision()Returns the revision string.java.lang.StringglobalInfo()Returns a string describing the estimator.doublelogDensity(double value)Returns the natural logarithm of the density estimate at the given point.static voidmain(java.lang.String[] args)Main method, used for testing this class.double[][]predictIntervals(double conf)Returns the interval for the given confidence value.doublepredictQuantile(double percentage)Returns the quantile for the given percentage.java.lang.StringtoString()Returns textual description of this estimator.
-
-
-
Method Detail
-
globalInfo
public java.lang.String globalInfo()
Returns a string describing the estimator.
-
addValue
public void addValue(double value, double weight)Adds a value to the density estimator.- Specified by:
addValuein interfaceUnivariateDensityEstimator- Specified by:
addValuein interfaceUnivariateIntervalEstimator- Specified by:
addValuein interfaceUnivariateQuantileEstimator- Parameters:
value- the value to addweight- the weight of the value
-
predictIntervals
public double[][] predictIntervals(double conf)
Returns the interval for the given confidence value.- Specified by:
predictIntervalsin interfaceUnivariateIntervalEstimator- Parameters:
conf- the confidence value in the interval [0, 1]- Returns:
- the interval
-
predictQuantile
public double predictQuantile(double percentage)
Returns the quantile for the given percentage.- Specified by:
predictQuantilein interfaceUnivariateQuantileEstimator- Parameters:
percentage- the percentage- Returns:
- the quantile
-
logDensity
public double logDensity(double value)
Returns the natural logarithm of the density estimate at the given point.- Specified by:
logDensityin interfaceUnivariateDensityEstimator- Parameters:
value- the value at which to evaluate- Returns:
- the natural logarithm of the density estimate at the given value
-
toString
public java.lang.String toString()
Returns textual description of this estimator.- Overrides:
toStringin classjava.lang.Object
-
getRevision
public java.lang.String getRevision()
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-
main
public static void main(java.lang.String[] args)
Main method, used for testing this class.
-
-