Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## weka.estimators
Class UnivariateKernelEstimator

    java.lang.Object
      weka.estimators.UnivariateKernelEstimator

All Implemented Interfaces:
  UnivariateDensityEstimator, UnivariateIntervalEstimator

    public class UnivariateKernelEstimator

extends java.lang.Object
implements UnivariateDensityEstimator, UnivariateIntervalEstimator

Simple weighted kernel density estimator.

Version:
  $Revision: 5680 $
Author:
  Eibe Frank (eibe@cs.waikato.ac.nz)

Field Summary
`static double` | `CONST` Constant for Gaussian density.

Constructor Summary
`UnivariateKernelEstimator()`

Method Summary
`void` | `addValue(double value, double weight)` Adds a value to the density estimator.
`double` | `logDensity(double value)` Returns the natural logarithm of the density estimate at the given point.
`static void` | `main(java.lang.String[] args)` Main method, used for testing this class.
`double[][]` | `predictIntervals(double conf)` Returns the interval for the given confidence value.
`java.lang.String` | `toString()` Returns textual description of this estimator.
`void` | `updateWidth()` Updates bandwidth: the sample standard deviation is multiplied by the total weight to the power of the given exponent.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### CONST

    public static final double CONST

  Constant for Gaussian density.

Constructor Detail

### UnivariateKernelEstimator

    public UnivariateKernelEstimator()

Method Detail

### 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`
  Parameters:
    `value` - the value to add
    `weight` - the weight of the value

### updateWidth

    public void updateWidth()

  Updates bandwidth: the sample standard deviation is multiplied by the total weight to the power of the given exponent. If the total weight is not greater than zero, the width is set to Double.MAX_VALUE. If that is not the case, but the width becomes smaller than m_MinWidth, the width is set to the value of m_MinWidth.

### 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

### 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 java.lang.String toString()

  Returns textual description of this estimator.

  Overrides:
    `toString` in class `java.lang.Object`

### main

    public static void main(java.lang.String[] args)

  Main method, used for testing this class.

Overview | Package | Class | Tree | Deprecated | Index | Help | Weka's home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD