pymc-devs / pytensor

PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.
https://pytensor.readthedocs.io
Other
297 stars 91 forks source link

Default MvNormal covariance doesn't make sense #833

Open ricardoV94 opened 2 weeks ago

ricardoV94 commented 2 weeks ago

https://github.com/pymc-devs/pytensor/blob/5d4b0c4b9a1e478dda48e912ee708a9e557e9343/pytensor/tensor/random/basic.py#L897-L903

It is not allowed to broadcast with mu so it should be aware of its shape. And should probably be eye(mu.shape[-1]), not ones. Or we can just remove it, since numpy does not provide a default covariance either?

aseyboldt commented 2 weeks ago

I don't think we should have a default covariance. If anything, that should be the identity, but if that's what you want, why would you use MvNormal and not Normal?

ricardoV94 commented 2 weeks ago

So let's take away the default