adelie.matrix.eager_cov#

adelie.matrix.eager_cov(mat: ndarray, n_threads: int = 1)[source]#

Creates an eager covariance matrix.

The eager covariance matrix \(A\) uses the underlying matrix \(X\) given by mat to compute the values of \(A = X^\top X\) eagerly. In other words, it computes the entire \(A\) matrix. This is useful in adelie.solver.gaussian_cov() where the dimensions of \(A\) are small enough that that it is faster to construct the entire matrix upfront.

Note

This matrix only works for covariance method!

Parameters:
mat(n, p) ndarray

The data matrix from which to eagerly compute the covariance.

n_threadsint, optional

Number of threads. Default is 1.

Returns:
covndarray

The dense covariance matrix.