You can definitely use multi-column matrices. But instead of using the multiplication operator, think of matrix multiplication (“dot” operator). You can find all kinds of operations in the theano.tensor
library (tt
), for example you can also stack column vectors. So try something like:
[…] + tt.dot(spend, B_spend)
The tricky part is getting the dimensionality right for B_spend
(assuming spend
is the n
by 2
pm.Data
tensor). I’m sure there are examples in the docs (search for theano.tensor
). I also recently put one here.
Cheers!