Package weka.estimators

# Class UnivariateNormalEstimator

java.lang.Object
weka.estimators.UnivariateNormalEstimator

All Implemented Interfaces:
  `Serializable`, `RevisionHandler`, `UnivariateDensityEstimator`, `UnivariateIntervalEstimator`, `UnivariateQuantileEstimator`

public class UnivariateNormalEstimator extends Object implements UnivariateDensityEstimator, UnivariateIntervalEstimator, UnivariateQuantileEstimator, 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 final double`
  `CONST`
  Constant for Gaussian density

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UnivariateNormalEstimator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addValue(double value, double weight)`
  Adds a value to the density estimator.
  `String`
  `getRevision()`
  Returns the revision string.
  `String`
  `globalInfo()`
  Returns a string describing the estimator.
  `double`
  `logDensity(double value)`
  Returns the natural logarithm of the density estimate at the given point.
  `static void`
  `main(String[] args)`
  Main method, used for testing this class.
  `double[][]`
  `predictIntervals(double conf)`
  Returns the interval for the given confidence value.
  `double`
  `predictQuantile(double percentage)`
  Returns the quantile for the given percentage.
  `String`
  `toString()`
  Returns textual description of this estimator.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### CONST

    public static final double CONST
    Constant for Gaussian density

- ## Constructor Details

  - ### UnivariateNormalEstimator

    public UnivariateNormalEstimator()

- ## Method Details

  - ### globalInfo

    public 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:
      `addValue` in interface `UnivariateDensityEstimator`
    Specified by:
      `addValue` in interface `UnivariateIntervalEstimator`
    Specified by:
      `addValue` in interface `UnivariateQuantileEstimator`
    Parameters:
      `value` - the value to add
      `weight` - the weight of the value

  - ### predictIntervals

    public double[][] predictIntervals(double conf)
    Returns the interval for the given confidence value.
    Specified by:
      `predictIntervals` in interface `UnivariateIntervalEstimator`
    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:
      `predictQuantile` in interface `UnivariateQuantileEstimator`
    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:
      `logDensity` in interface `UnivariateDensityEstimator`
    Parameters:
      `value` - the value at which to evaluate
    Returns:
      the natural logarithm of the density estimate at the given value

  - ### toString

    public String toString()
    Returns textual description of this estimator.
    Overrides:
      `toString` in class `Object`

  - ### getRevision

    public String getRevision()
    Returns the revision string.
    Specified by:
      `getRevision` in interface `RevisionHandler`
    Returns:
      the revision

  - ### main

    public static void main(String[] args)
    Main method, used for testing this class.