test9.cpp File Reference


Detailed Description

Test of DensityTreePdf.

This test:

Results are as follows:

Mixture mean
[2](0.295305,0.261496)
Mixture covariance
[2,2]((0.728494,-0.0597473),(-0.0597473,0.938613))
Sample mean
[2](0.294434,0.261816)
Sample covariance
[2,2]((0.728574,-0.0593636),(-0.0593636,0.938486))
Density tree mean
[2](0.298064,0.274742)
Density tree covariance
[2,2]((0.888996,-0.0492226),(-0.0492226,1.12449))
Density tree sample mean
[2](0.299049,0.274198)
Density tree sample covariance
[2,2]((0.890722,-0.0633334),(-0.0633334,1.1234))
Density tree importance sample mean
[2](0.385459,0.213461)
Density tree importance sample covariance
[2,2]((1.63716,-0.159855),(-0.159855,2.25733))

test9_mixture.png

Original Gaussian mixture

test9_tree.png

Density tree approximation

Definition in file test9.cpp.

Go to the source code of this file.

Functions

aux::GaussianPdf createRandomGaussian (const unsigned int M, const double minMean=-1.0, const double maxMean=1.0, const double minCov=-1.0, const double maxCov=1.0)
 Create random Gaussian distribution.
int main (int argc, const char *argv[])
 Run tests.

Variables

unsigned int M = 2
 Dimensionality of the distribution.
unsigned int COMPONENTS = 4
 Number of components in the Gaussian mixture.
unsigned int P = 1000000
 Number of samples to take.
unsigned int RES = 200
 Resolution of plots.


Function Documentation

aux::GaussianPdf createRandomGaussian ( const unsigned int  M,
const double  minMean = -1.0,
const double  maxMean = 1.0,
const double  minCov = -1.0,
const double  maxCov = 1.0 
)

Create random Gaussian distribution.

Parameters:
M Dimensionality of the Gaussian.
minMean Minimum value of any component of the mean.
maxMean Maximum value of any component of the mean.
minCov Minimum value of any component of the covariance.
maxCov Maximum value of any component of the covariance.
Returns:
Gaussian with given dimensionality, with mean and covariance randomly generated uniformly from within the given bounds.

Definition at line 78 of file test9.cpp.

int main ( int  argc,
const char *  argv[] 
)

Run tests.

Definition at line 106 of file test9.cpp.


Variable Documentation

unsigned int COMPONENTS = 4

Number of components in the Gaussian mixture.

Definition at line 53 of file test9.cpp.

unsigned int M = 2

Dimensionality of the distribution.

Definition at line 48 of file test9.cpp.

unsigned int P = 1000000

Number of samples to take.

Definition at line 58 of file test9.cpp.

unsigned int RES = 200

Resolution of plots.

Definition at line 63 of file test9.cpp.


Generated on Wed Mar 5 16:36:30 2008 for dysii Probability Distributions Test Suite by  doxygen 1.5.2