Bayesian Estimation of Latently-grouped Parameters in Undirected Graphical Models