Demo 21: The apriori sampler
This sampler chooses successive points in parameter space, independently of each other, from the a priori distributions of the parameters decreed by the values.ini file (more specifically, the file referred to in the
[pipeline]/values item of the main
Along with the grid and star samplers, the outputs can be inspected to reveal the overall shape of the likelihood surface, and the distribution of output sample points should provide an indication that the a priori parametersʼ sample distribution is reasonable and workable.
In this demonstration we use the sampler to explore the likelihood of the parameters leading to the BBN data set on the assumption of the Standard model of Big-Bang nucleosynthesis.
Simply run Demo 21 with the command
and inspect the outputs in demo21.txt.
Regarding demo21.ini, the apriori sampler is selected in the top section,
[runtime], of the file, and a new section called
apriori is accordingly added to the file. There is a single parameter to set here.
nsampleis very simply the number of samples, and consequently runs of the Cosmosis pipeline and lines in the output file, that are drawn from the prior distribution.