Generate random matrices $L$ and $D$ such that $LL^T + D$ is positive definite

29 Views Asked by At

How do I generate random matrices $L$ and $D$ such that $LL^T + D$ is positive definite. I need to apply stochastic variational inference and I want to initialise my parameters $L$ and $D$ randomly such that the matrix $LL^T + D$ is always positive definite and then apply Cholesky decomposition on it. How do I achieve this?

I understood that randomly initialising my matrices is not a good idea and there needs to be some pattern. Any help would be great!

Edit: Yes $D$ is a diagonal matrix