Open JonathanWenger opened 4 years ago
I can try to do this. I might have some Normal
questions though.
How many of those do we want? I'd need a from_cholesky
. Is there demand for from_svd
or from_eigen(decomposition)
? If not, I'll only do the cholesky/matrix-square-root.
We need from_svd
as well for LinearOperators
where one can compute the SVD but not the cholesky decomposition.
Currently when initializing a normal random variable one cannot simply specify a Cholesky factor of the covariance but has to pass a covariance as well.
The desired behaviour as discussed in the software meeting is to only allow construction with either a covariance, a cholesky factor, a diagonal vector of singular values and an orthogonal matrix or a vector of eigenvalues and an orthogonal matrix.
This avoids inconsistencies between covariance and matrix root at the expense of having to compute the full covariance via a matrix-matrix multiplication. This behavior is also consistent with
tensorflow
.One way to implement this would be to use
@classmethod
s (from_cholesky
,from_svd
,from_eigendecomposition
) and an__init__(mean, cov, random_state)
.