Faster Cholesky factorization of $diag(\mathbf{x}_{i}) \otimes \mathbf{A} + \mathbf{B}$ for $i=1,\ldots,n$?

91 Views Asked by At

I have many positive integer vectors $\mathbf{x}_{i} \in \mathcal{N}^{d_1}$, $i=1,\ldots,n$, a p.s.d. matrix $\mathbf{A} \in \Re^{d_2\times d_2}$ and a p.s.d. matrix $\mathbf{B} \in \Re^{d_1d_2\times d_1d_2}$. For every $\mathbf{x}_{i}$ I want to compute the following Cholesky factorization:

$chol\bigg(diag(\mathbf{x}_{i}) \otimes \mathbf{A} + \mathbf{B}\bigg)$

My $d_1$ and $d_2$ are not small and I have a large $n$ hence computing the above Cholesky factorization for all $x_{i}$ is really time-consuming.

Since the matrix inside chol() is very structured and the only thing that is varying is $x_i$, is there a more efficient way to compute all these factorizations?

The problem arises in my Markov Chain Monte Carlo algorithm from my Bayesian statistics project. And I feel this problem is quite commonly encountered especially in hierarchical Gaussian models. Hence it would be great if there is a much more efficient solution. Any advice will be helpful! Thanks ahead for your time.