next up previous contents
Next: Writing SLPs Up: New model spaces Previous: Likelihood   Contents

Displaying models

This is not a necessary step for MCMCMS but it is used when visualisation of the current and proposed models is requested. You simply need to define
display_model( +Title, +Model, +Llhood ).
$Title$ is the title of the model, i.e. where it is the current or the proposal of iteration $i$. $Model$ is the representation of the model to be displayed, and $Llhood$ is its log-likelihood. When the predicate is entered all three arguments should be instantiated appropriately, with the possible exception of $Llhood$. This depends on whether model_llhood/2, see preceeding sub-Section, instantiated the likelihood correctly. Your program should be aware and take appropriate action if that is not the case (e.g. not display the log-likelihood).

The main route for displaying models is via the run/1 option. This provides a hookable mechanism, the details of which can be found in the sources: mcmcms/run.pl. Here we document an implemented hook invoked by
display(next_display_at). This always prints the first pair of models (current and proposed) and interrogates the user for when the next display should be. The number 1 and any non integer input will result in the display of the next pair of models, while 0 will halt the execution. A positive integer will display the Nth comparison from the current position. A negative integer will skip the Nth jump from the current position.


next up previous contents
Next: Writing SLPs Up: New model spaces Previous: Likelihood   Contents
Nicos Angelopoulos 2008-06-02