covmats.eigen_factorize_cov_mat#

covmats.eigen_factorize_cov_mat(cov_mat: CovarianceMatrix | CovKernelAsLinop, n_pc: int, random_state: int | RandomState | Generator | None = None) CovViaEigenFactorization[source]#

Return an eigen factorized covariance matrix from the input covariance matrix.

Parameters:
  • cov_mat (Union[CovarianceMatrix, CovKernelAsLinop]) – The covariance matrix instance to decompose.

  • n_pc (int) – Number of principal component in the matrix.

  • random_state (Optional[Union[int, np.random.Generator, np.random.RandomState]]) – Pseudorandom number generator state used to generate resamples. If random_state is None (or np.random), the numpy.random.RandomState singleton is used. If random_state is an int, a new RandomState instance is used, seeded with random_state. If random_state is already a Generator or RandomState instance then that instance is used.

Returns:

Decomposed matrix instance.

Return type:

CovViaEigenFactorization