next up previous contents
Next: Displaying models Up: New model spaces Previous: New model spaces   Contents


Likelihood

To actually hook your likelihood function to MCMCMS you need to define
 lhood_canonical( +MODst, +MODi, -LLst, +LLi, -Ratio ).
 and model_llhood( +Model, -Llhood )

Figs 6, 14 and 17 in the tutorial provide examples of definitions of these predicates. Variables prefixed by $+$ stand for `input' variables which are instantiated at the time of the call, while those prefixed by $-$ are `output' variables which are not instantiated until exit time. $MODst$ is the proposed model, $MODi$ is the current model, $LLst$ is the log-likelihood of $MODst$, $LLi$ is the log-likelihood of $MODi$ and $Ratio$ is the likelihood ratio of $MODst$ over $MODi$.

For model_likelihood/2, $Model$ is a model, and $Llhood$ is its log-likelihood. This predicate should always be defined but if it is not called from lhood_canonical/5 then it can instantiate $Llhood$ to any odd non-numeric value, e.g. model_llhood( _, dont_know_it ).



Nicos Angelopoulos 2008-06-02