
| T | Component type, should be derivative of Pdf. |
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. | |
| 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.
| N | Dimensionality of the distribution. |
Definition at line 156 of file StandardMixturePdf.hpp.
| StandardMixturePdf | ( | const T & | x, | |
| const double | w = 1.0 | |||
| ) | [inline] |
Constructor.
| x | The first component. | |
| w | Unnormalised weight of the component. |
Definition at line 163 of file StandardMixturePdf.hpp.
| ~StandardMixturePdf | ( | ) | [inline, virtual] |
| void setDimensions | ( | const unsigned int | N, | |
| const bool | preserve = false | |||
| ) | [inline, virtual] |
Set the dimensionality of the distribution.
| 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:
where
,
and
are the mean, covariance and weight of the
th component, respectively, and
the overall mean.
; 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.
; 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.
1.5.3