StandardMixturePdf Class Template Reference

Inheritance diagram for StandardMixturePdf:

Inheritance graph
[legend]

List of all members.


Detailed Description

template<class T>
class indii::ml::aux::StandardMixturePdf< T >

Mixture probability density with standard calculation of covariance.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
Rev
Date:
Date
Parameters:
T Component type, should be derivative of Pdf.
See also:
MixturePdf for more information regarding the serialization and parallelisation features of this class.

Definition at line 22 of file StandardMixturePdf.hpp.


Public Member Functions

 StandardMixturePdf ()
 Default constructor.
 StandardMixturePdf (const unsigned int N)
 Constructor.
 StandardMixturePdf (const T &x, const double w=1.0)
 Constructor.
virtual ~StandardMixturePdf ()
 Destructor.
virtual void setDimensions (const unsigned int N, const bool preserve=false)
 Set the dimensionality of the distribution.
virtual const
symmetric_matrix
getCovariance ()
 Get the covariance of the distribution.
symmetric_matrix getDistributedCovariance ()
 Get the covariance of the full distribution.

Protected Member Functions

virtual void dirty ()
 Called when changes are made to the distribution, such as when a new component is added.

Constructor & Destructor Documentation

StandardMixturePdf (  )  [inline]

Default constructor.

Initialises the mixture with zero dimensions. This should generally only be used when the object is to be restored from a serialization. Indeed, there is no other way to resize the mixture to nonzero dimensionality except by subsequently restoring from a serialization.

Definition at line 150 of file StandardMixturePdf.hpp.

StandardMixturePdf ( const unsigned int  N  )  [inline]

Constructor.

One or more components should be added with add() after construction.

Parameters:
N Dimensionality of the distribution.

Definition at line 156 of file StandardMixturePdf.hpp.

StandardMixturePdf ( const T &  x,
const double  w = 1.0 
) [inline]

Constructor.

Parameters:
x The first component.
w Unnormalised weight of the component.
This is particularly useful for creating single component mixtures of any type for parallel environments.

Definition at line 163 of file StandardMixturePdf.hpp.

~StandardMixturePdf (  )  [inline, virtual]

Destructor.

Definition at line 171 of file StandardMixturePdf.hpp.


Member Function Documentation

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

Set the dimensionality of the distribution.

Parameters:
N Dimensionality of the distribution.
preserve True to preserve the current sufficient statistics of the distribution in the lower dimensional space, false if these may be discarded.

Reimplemented from MixturePdf.

Definition at line 176 of file StandardMixturePdf.hpp.

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

Get the covariance of the distribution.

The covariance is defined as:

\[ \frac{1}{W}\sum_{i=1}^{K} w^{(i)}(\Sigma^{(i)} + \mathbf{\mu}^{(i)} (\mathbf{\mu}^{(i)})^{T}) - \mathbf{\mu}\mathbf{\mu}^{T} \]

where $\mathbf{\mu}^{(i)}$, $\Sigma^{(i)}$ and $w^{(i)}$ are the mean, covariance and weight of the $i$th component, respectively, and $\mathbf{\mu}$ the overall mean.

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

Implements Pdf.

Definition at line 186 of file StandardMixturePdf.hpp.

indii::ml::aux::symmetric_matrix getDistributedCovariance (  )  [inline]

Get the covariance of the full distribution.

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

Definition at line 195 of file StandardMixturePdf.hpp.

void dirty (  )  [inline, protected, virtual]

Called when changes are made to the distribution, such as when a new component is added.

This allows pre-calculations to be refreshed.

Reimplemented from MixturePdf.

Definition at line 227 of file StandardMixturePdf.hpp.


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