This function is intended to allow new users to quickly see how the UGM data structures and function calls work. In particular, it shows how to use UGM to perform the tasks of decoding/inference/sampling in a tree-structure graphical model, as well as parameter estimation in both MRFs and CRFs. Note that this function requires the UGM_makeMRFmaps.m and UGM_makeCRFmaps.m functions below.

This function is intended to allow new users to quickly see how the UGM
data structures and function calls work. In particular, it shows how to
use UGM to perform the tasks of decoding/inference/sampling in a
tree-structure graphical model, as well as parameter estimation in both
MRFs and CRFs. Note that this function requires the UGM_makeMRFmaps.m
and UGM_makeCRFmaps.m functions below.