KernelDensityPdf Class Template Reference

Inheritance diagram for KernelDensityPdf:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<class NT = Almost2Norm, class KT = AlmostGaussianKernel>
class indii::ml::aux::KernelDensityPdf< NT, KT >

Kernel density estimator.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
Rev
Date:
Date
Parameters:
NT Norm type.
KT Kernel type.
The kernel density estimator is constructed over a KDTree for efficient evaluations. After construction, it acts as any other Pdf.

Serialization

This class supports serialization through the Boost.Serialization library.

References

Silverman, B.W. Density Estimation for Statistics and Data Analysis. Chapman and Hall, 1986.

Definition at line 38 of file KernelDensityPdf.hpp.


Public Member Functions

 KernelDensityPdf ()
 Default constructor.
 KernelDensityPdf (PartitionTree *tree, const NT &N, const KT &K)
 Constructor.
virtual ~KernelDensityPdf ()
 Destructor.
virtual void setDimensions (const unsigned int N, const bool preserve=false)
 Not supported.
virtual const vectorgetExpectation ()
 Get the expected value of the distribution.
virtual const
symmetric_matrix
getCovariance ()
 Get the covariance of the distribution.
virtual vector sample ()
 Sample from the distribution.
virtual double densityAt (const vector &x)
 Calculate the density at a given point.
vector densityAt (PartitionTree &tree)
 Calculate the density for all points in a tree.

Constructor & Destructor Documentation

KernelDensityPdf (  )  [inline]

Default constructor.

Initialises the distribution with zero dimensions. This should generally only be used when the object is to be restored from a serialization.

Definition at line 168 of file KernelDensityPdf.hpp.

KernelDensityPdf ( PartitionTree tree,
const NT &  N,
const KT &  K 
) [inline]

Constructor.

Parameters:
tree Partition tree over which to define distribution. Caller has ownership.
N $\|\mathbf{x}\|_p$; a norm.
K $K(\|\mathbf{x}\|_p) $; density kernel.

Definition at line 174 of file KernelDensityPdf.hpp.

~KernelDensityPdf (  )  [inline, virtual]

Destructor.

Definition at line 183 of file KernelDensityPdf.hpp.


Member Function Documentation

void setDimensions ( const unsigned int  N,
const bool  preserve = false 
) [inline, virtual]

Not supported.

See also:
Pdf::setDimensions()

Implements Pdf.

Definition at line 188 of file KernelDensityPdf.hpp.

const indii::ml::aux::vector & getExpectation (  )  [inline, virtual]

Get the expected value of the distribution.

Returns:
$\mathbf{\mu}$; expected value of the distribution.

Implements Pdf.

Definition at line 195 of file KernelDensityPdf.hpp.

const indii::ml::aux::symmetric_matrix & getCovariance (  )  [inline, virtual]

Get the covariance of the distribution.

Returns:
$\Sigma$; covariance of the distribution.

Implements Pdf.

Definition at line 205 of file KernelDensityPdf.hpp.

indii::ml::aux::vector sample (  )  [inline, virtual]

Sample from the distribution.

Returns:
A sample from the distribution.

Implements Pdf.

Definition at line 214 of file KernelDensityPdf.hpp.

double densityAt ( const vector x  )  [inline, virtual]

Calculate the density at a given point.

Parameters:
x $\mathbf{x}$; point at which to evaluate the density.
Returns:
$p(\mathbf{x})$; the density at $\mathbf{x}$.

Implements Pdf.

Definition at line 224 of file KernelDensityPdf.hpp.

indii::ml::aux::vector densityAt ( PartitionTree tree  )  [inline]

Calculate the density for all points in a tree.

Parameters:
tree Query tree.
Returns:
Density at all points in the tree, ordered according to the underlying DiracMixturePdf ordering.
Uses a dual-tree algorithm to efficiently calculate the density at all points in the query tree.

Definition at line 266 of file KernelDensityPdf.hpp.


Generated on Wed Dec 17 15:11:58 2008 for dysii Dynamical Systems Library by  doxygen 1.5.3