next up previous contents
Next: Backtracking proposals Up: MCMCMS 0.4.0 User Guide Previous: Development and bug reports   Contents


Running experiments

Predicate run/1, defined in mcmcms/run.pl can be used to run a number of experiments producing a number of output files. We will refer to calls of run/1 as a `run'. Each run will execute a number of experiments according to the arguments of run_data/11. For each clause of run_data/11 the MCMC algorithm will be run with the corresponding parameters (see Appendix B). As a result a number of files will be created for each experiment. All filenames associated with a single experiment share a common stem, reflecting the parameters of the experiment. The extension of each file, reveals the kind of output stored in it. The core extentions are:

.gz the gzipped main output of the experiment. This usually records the current and proposed models at each iteration. Possibly along with their likelihoods and model size characteristics.
.stats execution statistics and the internal form of the SLP used are recorded here.
.stays for each model the chain moves to, this records the number of iterations the chain remains stuck at that model. You must load the file auxil/create_visits.pl to get this.
.visits the total number of times a single model appears in the chain. You must load the file auxil/create_visits.pl to get this.
Additional post-processing on the pre-gzipped output file can be effected by defining exec_extension(Ext,Stem). For instance see auxil/create_mgraphs.pl or Fig 14 in the tutorial. Other aspects of the behaviour for run/1 are controlled by the list of options given as its argument (see Appendix A). Each `run' prints some simple diagnostics on how things are proceeding. These are written on the error stream which is connected to the terminal.

Throughout the model specific directories we have used simple Prolog programs which (a) make sure all the appropriate files are loaded, and (b) call run/1. For example consider file bns/run_test.pl in Table 1. The first directive loads run.pl from top-level directory. The second, loads the likelihood to be used and the third the code for displaying Bayesian networks (only included here for illustration). The last four ensure_loaded directives, load predicates that post-process the output files. The commented out directive bb_put( sr, off ) can be added to force all output to the terminal; this is useful for debugging. Finally run_test/0, is a wrap for calling run_test/1 with run_data/11 defined in runs/simple.pl creating output at `points' 24, 28 and 29, and putting all resulting files into directory test/. (See Appendix A for further information on the use of output `points'.)


Table 1: bns/run_test.pl
\begin{table}\begin{verbatim}:- ensure_loaded( '../run' ).
:- ensure_loaded( '...
...( [24,28,29] ),
results_dir(test)
],
run( Runs ).\end{verbatim}
\end{table}




Subsections
next up previous contents
Next: Backtracking proposals Up: MCMCMS 0.4.0 User Guide Previous: Development and bug reports   Contents
Nicos Angelopoulos 2008-06-02