Hi, I am wondering whether Dask currently supports parallelization for the Cholesky factorization of a sparse, banded matrix? I know that Dask supports sparse arrays but at first glance it doesn’t seem like there is a sparse Cholesky factorization akin to the old sksparse.cholmod
.
I am trying to (efficiently) sample a high-dimensional Gaussian with a banded precision matrix Q, which requires me to factorize Q = L L^T and solve the linear system L^T x = b. If Dask won’t work for this, other suggestions appreciated!
@jlindbloom Sorry for letting this slip!
I see Dask Array has linalg.cholesky
, would this help?
import numpy as np
import dask.array as da
s = np.array([[1,-2j],[2j,5]])
m = np.ma.masked_array(A)
np.linalg.cholesky(s)
# array([[1.+0.j, 0.+0.j],
# [0.+2.j, 1.+0.j]])
np.linalg.cholesky(m)
# masked_array(
# data=[[1.+0.j, 0.+0.j],
# [0.+2.j, 1.+0.j]],
# mask=False,
# fill_value=(1e+20+0j))
ds = da.from_array(m, chunks=2)
da.linalg.cholesky(ds).compute()
# masked_array(
# data=[[1.+0.j, 0.+2.j],
# [0.+0.j, 1.+0.j]],
# mask=False,
# fill_value=(1e+20+0j))
In general though, Dask mainly supports pydata-sparse, so I wouldn’t expect Dask to work reliably with scikit-sparse operations.