aicenter / ConditionalDists.jl

Conditional probability distributions powered by DistributionsAD.jl
MIT License
21 stars 4 forks source link

Variance of CMeanVarGaussian #23

Closed nmheim closed 3 years ago

nmheim commented 4 years ago

Currently the CMeanVarGaussian{ScalaVar} is returning a (1,batchsize) array for variance. we agreed with @smidl at some point that variance should always return a proper vector, so I will change this accordingly, such that we get (xlen,batchsize) from var. I assume we also want this to be the case for the covariance matrices, so we would end up with (xlen, xlen, batchsize). The memory overhead would be acceptable if we use Diagonals for the covariances. What do you all think? @vitskvara @pevnak

smidl commented 4 years ago

I definitely agree with the vector part. Not sure about matrices, but I guess your suggestion is the most logical. I just worried how to broadcast it. Can you think of a way how to write quadratic form x^T \Sigma^{-1} x with matrix3darraymatrix?

nmheim commented 4 years ago

Sorry closed this with the pullrequest without checking in here first. We could overload multiplication, but I am not sure if this is what we want...