Consider parametrizing RVs in terms of shape #52
Replies: 1 comment 1 reply
-
After #388 this is even more relevant. It is not possible to guess automatically the support shape of a multivariate random variable by definition. Until #388 we made a guess that the last dimensions of the shape of the first argument corresponds to the support shape, which is not a general correct answer and caused confusion when users tried to implement their own RVs, so we removed it. This breaks PyMC multivariate From now on, we would need to ask users to give us a callable that returns the support shape. This is really silly because most users will use From interacting with RVs for a while I haven't seen any practical use of size. Manipulations are usually done on shapes, and the only time size plays a role is when we need to juggle the shape back into the size argument to recreate an RV. |
Beta Was this translation helpful? Give feedback.
-
First off, implementation is pretty straightforward, it just requires adding an assert about the support shape of multivariate RVs
These two would be roughly equivalent (but done by the
perform
method)Cons
Pros
(shape - support shape)
, whereas usually it'sprod(shape)
.size
, we always need to break away the last shape dimension into a parameter.Related discussions:
Beta Was this translation helpful? Give feedback.
All reactions