pymc
pymc copied to clipboard
Remove NormalMixture comp_shape kwarg
Description
This has no effect besides what shape already does
CC @lucianopaz do you remember why this existed? I imagine it had something to do with the old way that weight used to work.
@ricardoV94 Can you elaborate this issue more,I wish to contribute to this issue.
@ricardoV94, in version 3.x it used to be necessary to supply the component distribution shape. This could be used to do weird things like making multivariate mixture components out of scalar distributions (what I mean is that the shape of the support dimensions could effectively be changed). As far as I understand, this is no longer the case since version 4.x. Mixtures reshape their component batch dimensions so that they broadcast correctly with the mixture shape, and there is no way of changing the sport dimensions.
Thanks for the context Luciano!
We may reintroduce something like that later down the road but for now seems safe to remove the useless kwarg
@mohammed052 sorry for the delay. If you are still interested, it's as simple as removing any mentions of comp_shape in https://github.com/pymc-devs/pymc/blob/2051d0b422a10ef0477cff0b3994ede4ec7c26ad/pymc/distributions/mixture.py#L496-L560
Thank you @ricardoV94 and @lucianopaz for explanation of the issue and its solution As I see, comp_shape is passed as parameter in new and dist functions So removing comp_shape from the argument list of these functions and removing size passed to Normal.dist parameter list must solve this issue Correct me if I am wrong,I am new to open source community
Yes, that's about it
If it's your first time, you may find this guide useful: https://www.pymc.io/projects/docs/en/latest/contributing/pr_tutorial.html
@ricardoV94 can you review the pull request I sent on 11th jan for closing this issue