Mixture of hierarchical model

Hi thanks for the quick replies.

I tried to add this:

but I got

ValueError: Bad initial energy: inf. The model might be misspecified.

With respect to your second suggestion

I am not sure where I should get inspiration from. Are you suggesting to “switch label by hand”?