public class RectangularCholeskyDecomposition extends Object
The rectangular Cholesky decomposition of a real symmetric positive semidefinite matrix A consists of a rectangular matrix B with the same number of rows such that: A is almost equal to BBT, depending on a user-defined tolerance. In a sense, this is the square root of A.
The difference with respect to the regular
is that rows/columns may be permuted (hence the rectangular shape instead
of the traditional triangular shape) and there is a threshold to ignore
small diagonal elements. This is used for example to generate
random n-dimensions vectors in a p-dimension subspace (p < n).
In other words, it allows generating random vectors from a covariance
matrix that is only positive semidefinite, and not positive definite.
Rectangular Cholesky decomposition is not suited for solving
linear systems, so it does not provide any
|Constructor and Description|
Decompose a symmetric positive semidefinite matrix.
|Modifier and Type||Method and Description|
Get the rank of the symmetric positive semidefinite matrix.
Get the root of the covariance matrix.
public RectangularCholeskyDecomposition(RealMatrix matrix, double small) throws NonPositiveDefiniteMatrixException
matrix- Symmetric positive semidefinite matrix.
small- Diagonal elements threshold under which column are considered to be dependent on previous ones and are discarded.
NonPositiveDefiniteMatrixException- if the matrix is not positive semidefinite.
public RealMatrix getRootMatrix()
Bsuch that the covariance matrix is equal to
public int getRank()
Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.