
Definition at line 23 of file DiracMixturePdf.hpp.
Public Member Functions | |
| DiracMixturePdf () | |
| Default constructor. | |
| DiracMixturePdf (Pdf &o, const unsigned int P) | |
| Sampling constructor. | |
| DiracMixturePdf (const unsigned int N) | |
| Constructor. | |
| virtual | ~DiracMixturePdf () |
| Destructor. | |
| double | calculateEss () |
| Calculate effective sample size on the local node. | |
| double | calculateDistributedEss () |
| Calculate effective sample size of the full distribution. | |
| virtual void | standardise () |
| Standardise components on the local node to zero mean and identity covariance. | |
| virtual void | standardise (const vector &mu, const lower_triangular_matrix &sd) |
| Standardise components on the local node using given mean and standard deviation. | |
| virtual void | standardise (const vector &mu, const symmetric_matrix &sigma) |
| Standardise components on the local node using given mean and covariance. | |
| virtual void | distributedStandardise () |
| Standardise components across all nodes to zero mean and identity covariance. | |
| 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. | |
| lower_triangular_matrix | getStandardDeviation () |
| Get the standard deviation of the distribution. | |
| lower_triangular_matrix | getDistributedStandardDeviation () |
| Get the standard deviation of the full distribution. | |
| void | redistributeBySpace () |
| Redistribute components across nodes by space. | |
Protected Member Functions | |
| virtual void | dirty () |
| Called when changes are made to the distribution, such as when a new component is added. | |
| DiracMixturePdf | ( | ) |
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 22 of file DiracMixturePdf.cpp.
| DiracMixturePdf | ( | Pdf & | o, | |
| const unsigned int | P | |||
| ) |
Sampling constructor.
| o | Distribution to approximate. | |
| P | Number of samples with which to approximate the distribution. |
P equally weighted samples from the distribution o.
Definition at line 27 of file DiracMixturePdf.cpp.
| DiracMixturePdf | ( | const unsigned int | N | ) |
Constructor.
One or more components should be added with addComponent() after construction.
| N | Dimensionality of the distribution. |
Definition at line 37 of file DiracMixturePdf.cpp.
| ~DiracMixturePdf | ( | ) | [virtual] |
| double calculateEss | ( | ) |
Calculate effective sample size on the local node.
Definition at line 46 of file DiracMixturePdf.cpp.
| double calculateDistributedEss | ( | ) |
Calculate effective sample size of the full distribution.
Definition at line 60 of file DiracMixturePdf.cpp.
| void standardise | ( | ) | [virtual] |
Standardise components on the local node to zero mean and identity covariance.
Definition at line 76 of file DiracMixturePdf.cpp.
| void standardise | ( | const vector & | mu, | |
| const lower_triangular_matrix & | sd | |||
| ) | [virtual] |
Standardise components on the local node using given mean and standard deviation.
| mu | Mean to use for standardisation. | |
| sd | Standard deviation to use for standardisation. |
Definition at line 80 of file DiracMixturePdf.cpp.
| void standardise | ( | const vector & | mu, | |
| const symmetric_matrix & | sigma | |||
| ) | [virtual] |
Standardise components on the local node using given mean and covariance.
| mu | Mean to use for standardisation. | |
| sigma | Covariance to use for standardisation. |
Definition at line 97 of file DiracMixturePdf.cpp.
| void distributedStandardise | ( | ) | [virtual] |
Standardise components across all nodes to zero mean and identity covariance.
Definition at line 112 of file DiracMixturePdf.cpp.
| void setDimensions | ( | const unsigned int | N, | |
| const bool | preserve = false | |||
| ) | [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 117 of file DiracMixturePdf.cpp.
| const symmetric_matrix & getCovariance | ( | ) | [virtual] |
Get the covariance of the distribution.
; covariance of the distribution. Implements Pdf.
Definition at line 125 of file DiracMixturePdf.cpp.
| symmetric_matrix getDistributedCovariance | ( | ) |
Get the covariance of the full distribution.
; covariance of the full distribution. Definition at line 132 of file DiracMixturePdf.cpp.
| lower_triangular_matrix getStandardDeviation | ( | ) |
Get the standard deviation of the distribution.
; standard deviation of the distribution. Definition at line 163 of file DiracMixturePdf.cpp.
| lower_triangular_matrix getDistributedStandardDeviation | ( | ) |
Get the standard deviation of the full distribution.
; standard deviation of the full distribution. Definition at line 182 of file DiracMixturePdf.cpp.
| void redistributeBySpace | ( | ) |
Redistribute components across nodes by space.
This builds a shallow
tree distributed across all nodes such that the number of leaves equals the number of nodes in the parallel environment. Using
th element splits, the algorithm ensures the same number of samples in each leaf node. Each node in the parallel environment then adopts all the samples at one of these leaf nodes. In this way, there is some spatial locality to all the samples on one node, ideal for further building of a distributed mixture of
trees using KernelDensityMixturePdf.
Definition at line 204 of file DiracMixturePdf.cpp.
| void dirty | ( | ) | [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 276 of file DiracMixturePdf.cpp.
1.5.3