Wiki
Clone wikicosmosis / demos / Demo21
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 demo21.ini
file).
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.
Running
Simply run Demo 21 with the command
cosmosis demos/demo21.ini
and inspect the outputs in demo21.txt.
Cosmosis Configuration
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.
nsample
is 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.
Updated