Mixture models - pm.Potential or pm.transforms.ordered


I have seen a different ways of dealing with label switching issue for mixture models - mainly constraining the mixture component variables to be ordered.

pm.Potential() and pm.transforms.ordered have both been used to make the components ordered. Which one is preferred? How do these differ? When would you use one over the other?

Many thanks

Ordered is better, because it transforms the distribution so that NUTS can sample in this “ordered” space without constraints.

1 Like

thanks @ricardoV94