MeanWalker
|
This class uses the Goodman-Weare method to take samples from a probability distribution and automatically creates histograms for the marginalized distributions corresponding to each of the coordinates. More...
#include <goodmanwearehistogrambuilder.h>
Public Member Functions | |
GoodmanWeareHistogramBuilder (RandomNumberGenerator *pRng) | |
The constructor of the class, in which the random number generator to be used must be specified. | |
bool | init (Function *pProbFunction, const double *pStartCoordCenter, double startCoordRadius, size_t numBins, const double *pHistMinCoords=0, const double *pHistMaxCoords=0, double a=2.0, int Nwalkers=0) |
Initialize the builder. | |
bool | init (Function *pProbFunction, const double *pStartCoordCenter, const double *pStartCoordRadii, size_t numBins, const double *pHistMinCoords=0, const double *pHistMaxCoords=0, double a=2.0, int Nwalkers=0) |
Initialize the builder. |
This class uses the Goodman-Weare method to take samples from a probability distribution and automatically creates histograms for the marginalized distributions corresponding to each of the coordinates.
This class uses the Goodman-Weare method to take samples from a probability distribution and automatically creates histograms for the marginalized distributions corresponding to each of the coordinates. It uses a GoodmanWeareWalkers instance to take the samples.
meanwalker::GoodmanWeareHistogramBuilder::GoodmanWeareHistogramBuilder | ( | RandomNumberGenerator * | pRng | ) |
The constructor of the class, in which the random number generator to be used must be specified.
bool meanwalker::GoodmanWeareHistogramBuilder::init | ( | Function * | pProbFunction, |
const double * | pStartCoordCenter, | ||
double | startCoordRadius, | ||
size_t | numBins, | ||
const double * | pHistMinCoords = 0 , |
||
const double * | pHistMaxCoords = 0 , |
||
double | a = 2.0 , |
||
int | Nwalkers = 0 |
||
) |
Initialize the builder.
Initialize the builder.
pProbFunction | The probability density to be sampled. |
pStartCoordCenter | If the number of dimensions is larger than one, the starting coordinates of the walkers will be chosen randomly on a hypersphere with this center. In the dimension is equal to one, the walkers will be placed randomly in the interval [center-radius, center+radius]. |
startCoordRadius | Radius of the hypersphere, or size of the interval (see previous parameter). |
numBins | Number of bins the histograms will have. |
pHistMinCoords | If not null, this specifies the minimum coordinates of the histograms. This does not impose a minimum coordinate a walker can have. If null, the width of the histograms will be determined automatically. |
pHistMaxCoords | If not null, this specifies the maximum coordinates of the histograms. Again, this does not impose a maximum coordinate a walker can have. If null, the width of the histograms will be determined automatically. |
a | Scale factor for the stretch move from the Goodman-Weare algorithm. |
Nwalkers | The number of walkers which will sample the probability distribution. Must be at least one more than the dimension, which is also the default value (specified when setting this parameter to 0). |
bool meanwalker::GoodmanWeareHistogramBuilder::init | ( | Function * | pProbFunction, |
const double * | pStartCoordCenter, | ||
const double * | pStartCoordRadii, | ||
size_t | numBins, | ||
const double * | pHistMinCoords = 0 , |
||
const double * | pHistMaxCoords = 0 , |
||
double | a = 2.0 , |
||
int | Nwalkers = 0 |
||
) |
Initialize the builder.
Initialize the builder.
pProbFunction | The probability density to be sampled. |
pStartCoordCenter | If the number of dimensions is larger than one, the starting coordinates of the walkers will be chosen randomly on a hypersphere, or rather a hyperellipsoid, with this center. In the dimension is equal to one, the walkers will be placed randomly in the interval [center-radius, center+radius]. |
pStartCoordRadii | Radii of of the hyperellipsoid along each axis, or size of the interval (see previous parameter). |
numBins | Number of bins the histograms will have. |
pHistMinCoords | If not null, this specifies the minimum coordinates of the histograms. This does not impose a minimum coordinate a walker can have. If null, the width of the histograms will be determined automatically. |
pHistMaxCoords | If not null, this specifies the maximum coordinates of the histograms. Again, this does not impose a maximum coordinate a walker can have. If null, the width of the histograms will be determined automatically. |
a | Scale factor for the stretch move from the Goodman-Weare algorithm. |
Nwalkers | The number of walkers which will sample the probability distribution. Must be at least one more than the dimension, which is also the default value (specified when setting this parameter to 0). |