Posterior distribution clustering

First, thank you very much for the detailed answer. Maybe it was extremely easy for you, but I got stuck in the construction of the posterior similarity matrix. I will study your answer in detail.

Thank you again!