Nested sampler written for LALInference.
Independent of model.
Nested Sampling algorithm defined using the LALInference Infrastructure. This code should be independent of choice of model. Provided are a LALAlgorithm function and a LALEvolveOneStepFunction which implement the evidence calculation
Prototypes | |
| void | LALInferenceNestedSamplingAlgorithmInit (LALInferenceRunState *runState) |
| Initialise the nested sampling algorithm by reading from the commandLine and setting up algorithmParams. More... | |
| void | LALInferenceNestedSamplingAlgorithm (LALInferenceRunState *runState) |
| NestedSamplingAlgorithm implements the nested sampling algorithm, see e.g. More... | |
| INT4 | LALInferenceNestedSamplingOneStep (LALInferenceRunState *runState) |
| A single iteration of the NS algorithm. More... | |
| LALInferenceVariables * | LALInferenceComputeAutoCorrelation (LALInferenceRunState *runState, UINT4 max_iterations, LALInferenceEvolveOneStepFunction evolve) |
| Compute the autocorrelation length from the sampler at the current global iteration. More... | |
| UINT4 | LALInferenceMCMCSamplePrior (LALInferenceRunState *runState) |
| Perform one MCMC iteration on runState->currentParams. More... | |
| UINT4 | LALInferenceMCMCSamplePriorNTimes (LALInferenceRunState *runState, UINT4 N) |
| Sample the prior N times, returns number of acceptances. More... | |
| INT4 | LALInferenceNestedSamplingSloppySample (LALInferenceRunState *runState) |
| Sample the limited prior distribution using the MCMC method as usual, but run a sub-chain of x iterations which doesn't check the likelihood bound. More... | |
| INT4 | LALInferenceNestedSamplingCachedSampler (LALInferenceRunState *runState) |
| void | LALInferenceSetupLivePointsArray (LALInferenceRunState *runState) |
| Setup the live points by calling runState->initVariables on each of them if it is specified. More... | |
| void | LALInferenceProjectSampleOntoEigenvectors (LALInferenceVariables *params, gsl_matrix *eigenvectors, REAL8Vector **projection) |
| Project the sample in params onto the eigenvectors given in eigenvectors. More... | |
| void LALInferenceNestedSamplingAlgorithmInit | ( | LALInferenceRunState * | runState | ) |
Initialise the nested sampling algorithm by reading from the commandLine and setting up algorithmParams.
Definition at line 575 of file LALInferenceNestedSampler.c.
| void LALInferenceNestedSamplingAlgorithm | ( | LALInferenceRunState * | runState | ) |
NestedSamplingAlgorithm implements the nested sampling algorithm, see e.g.
Sivia "Data Analysis: A Bayesian Tutorial, 2nd edition
Definition at line 726 of file LALInferenceNestedSampler.c.
| INT4 LALInferenceNestedSamplingOneStep | ( | LALInferenceRunState * | runState | ) |
A single iteration of the NS algorithm.
Definition at line 1621 of file LALInferenceNestedSampler.c.
| LALInferenceVariables * LALInferenceComputeAutoCorrelation | ( | LALInferenceRunState * | runState, |
| UINT4 | max_iterations, | ||
| LALInferenceEvolveOneStepFunction | evolve | ||
| ) |
Compute the autocorrelation length from the sampler at the current global iteration.
Definition at line 1158 of file LALInferenceNestedSampler.c.
| UINT4 LALInferenceMCMCSamplePrior | ( | LALInferenceRunState * | runState | ) |
Perform one MCMC iteration on runState->currentParams.
Return 1 if accepted or 0 if not
Definition at line 1338 of file LALInferenceNestedSampler.c.
| UINT4 LALInferenceMCMCSamplePriorNTimes | ( | LALInferenceRunState * | runState, |
| UINT4 | N | ||
| ) |
Sample the prior N times, returns number of acceptances.
Definition at line 1391 of file LALInferenceNestedSampler.c.
| INT4 LALInferenceNestedSamplingSloppySample | ( | LALInferenceRunState * | runState | ) |
Sample the limited prior distribution using the MCMC method as usual, but run a sub-chain of x iterations which doesn't check the likelihood bound.
x=LALInferenceGetVariable(runState->algorithmParams,"sloppyratio")
Definition at line 1485 of file LALInferenceNestedSampler.c.
| INT4 LALInferenceNestedSamplingCachedSampler | ( | LALInferenceRunState * | runState | ) |
Definition at line 1429 of file LALInferenceNestedSampler.c.
| void LALInferenceSetupLivePointsArray | ( | LALInferenceRunState * | runState | ) |
Setup the live points by calling runState->initVariables on each of them if it is specified.
Otherwise clones runState->currentParams (legacy)
Definition at line 1627 of file LALInferenceNestedSampler.c.
| void LALInferenceProjectSampleOntoEigenvectors | ( | LALInferenceVariables * | params, |
| gsl_matrix * | eigenvectors, | ||
| REAL8Vector ** | projection | ||
| ) |
Project the sample in params onto the eigenvectors given in eigenvectors.
Definition at line 1399 of file LALInferenceNestedSampler.c.