next up previous contents
Next: Using continuous distributions Up: Tutorial Previous: Changing the likelihood   Contents


A mixture prior

Because of the nature of the prior distributions defined by SLPs, it is very easy to formulate mixture priors. Fig 16 contains our original hyp/1 prior over rectangles, a new circ_hyp/1 prior over circles and a mixture prior mix_hyp/1 which mixes the hyp/1 and circ_hyp/1 priors to give a distribution over rectangles and circles. The likelihood function must now be extended to compute the likelihood of circles: see Fig 17 to see how this is done. Since the mixture prior has a bias towards circles, circles are visited more frequently when MCMCMS is run.

Figure 16: Mixture prior over rectangles and circles (found in the file tutorial/slps/mixture.slp).
\begin{figure}\centering
\begin{verbatim}0.4 :: mix_hyp(Rectangle) :- hyp(Rect...
...: x_dist(6).y_dist(D) :-
x_dist(XD),
D is XD + 1.\end{verbatim}
\end{figure}

Figure 17: The file tutorial/mixture_concept_learning.pl which includes additional clauses to compute `noisy' likelihoods for circle hypotheses
\begin{figure}\centering
\begin{verbatim}:- ensure_loaded( '../run.pl' ).run...
...ert uniq -c >', File, '.counts'],Com),
shell(Com).\end{verbatim}
\end{figure}



Nicos Angelopoulos 2008-06-02