Hi. Is there a way to group various subsets of random variables into a single vector to use in vector operations? For example, say my model looks something like:
a = pm.Normal(…, shape=4)
b = pm.Normal(…, shape=7)
and I would like to compute something like the dot product of [ a, b, b, b, b ] with a 5-element vector x = [x1, x2, x3, x4, x5]. How would I go about doing that?
I have tried doing approximately these two solutions:
vec = pm.math.concatenate( (a, b[1:5] )
vec = pm.math.stack( (a, b[1:5] )
but I get errors about joining Tensors of different dimensions.
I think I am missing something very simple here, anybody know what it is?