Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Mixture distribution mode computation and logp dimensions #3995

Merged

Conversation

brandonwillard
Copy link
Contributor

Closes #3994.

@brandonwillard
Copy link
Contributor Author

While working on this fix, I noticed that Mixture allows its comp_dists field to be either a single distribution or a list of distributions. This design choice seems to produce quite a bit of overly complex and repetitive logic throughout Mixture's methods. Is there a hard restriction preventing that field from always being a list or tuple?

Copy link
Member

@junpenglao junpenglao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@junpenglao
Copy link
Member

Is there a hard restriction preventing that field from always being a list or tuple?

I think the initial thinking is to have a same family mixture. For example there is MixtureSameFamily in TFP - and they distinguish it with two different class
I think at this point unfortunately it's a bit too late to change.

@brandonwillard brandonwillard merged commit 8770259 into pymc-devs:master Jul 4, 2020
@brandonwillard brandonwillard deleted the fix-mixture-dimensions branch July 4, 2020 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mixture of mixtures works, but not Mixture of Mixture and Single distribution
2 participants