UltraNest
|
#include "common.h"
Go to the source code of this file.
Data Structures | |
struct | ultranest_results |
Functions | |
ultranest_results | ultranest (LikelihoodFunc, const char *root, const int ndim, const int max_samples, const double logZtol, const int nlive_points, unsigned int nsteps) |
ultranest_results ultranest | ( | LikelihoodFunc | , |
const char * | root, | ||
const int | ndim, | ||
const int | max_samples, | ||
const double | logZtol, | ||
const int | nlive_points, | ||
unsigned int | nsteps | ||
) |
Run UltraNest.
Like | Likelihood function. For example |
root | prefix for output files |
ndim | dimensionality of the problem |
max_samples | maximum number of likelihood evaluations to perform Set to -1 to not set a limit. |
logZtol | tolerance on the evidence to achieve (e.g. log(10)). Once this tolerance is achieved, integration is done. Higher values mean the integration finishes earlier. |
nlive_points | number of live points to use Use 50 for a quick look, 400 or 1000 for a real, typical problem. |
nsteps | number of MCMC proposal steps |
Additionally, the results are written to files:
<root>posterior_samples.txt: Contains coordinates, likelihood and weights as a table. <root>evidence.txt: Contains 4 lines, with one number each: evidence, uncertainty, number of iterations and the number of likelihood evaluations.
Additional output files are produces so a run can be continued.
Uses ultranest_draw_init, ultranest_sampler_init, ultranest_sampler_next and ultranest_sampler_integrate_remainder
References ultranest_results::H, point::L, ultranest_state::Lmax, ultranest_results::logZ, ultranest_results::logZerr, ultranest_state::ndim, ultranest_results::ndraws, ultranest_state::ndraws, ultranest_results::niter, ultranest_state::nlive_points, ultranest_state::remainderZ, ultranest_state::remainderZerr, ultranest_results::root, ultranest_draw_init(), ultranest_sampler_init(), ultranest_sampler_integrate_remainder(), ultranest_sampler_next(), and ultranest_results::weighted_points.
Referenced by main().