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 CholeskyDecomposition
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 correlated
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 decomposition solver.
| Modifier and Type | Field and Description |
|---|---|
| private int | rank
Rank of the symmetric positive semidefinite matrix. |
| private final RealMatrix | root
Permutated Cholesky root of the symmetric positive semidefinite matrix. |
| Access | Constructor and Description |
|---|---|
| public | RectangularCholeskyDecomposition(RealMatrix
Symmetric positive semidefinite matrix. matrix)Decompose a symmetric positive semidefinite matrix. |
| public | RectangularCholeskyDecomposition(RealMatrix
Symmetric positive semidefinite matrix. matrix, double Diagonal elements threshold under which columns are
considered to be dependent on previous ones and are discarded. small)Decompose a symmetric positive semidefinite matrix. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: r of the square matrix.Get the rank of the symmetric positive semidefinite matrix. |
| public RealMatrix |
| rank | back to summary |
|---|---|
| private int rank Rank of the symmetric positive semidefinite matrix. | |
| root | back to summary |
|---|---|
| private final RealMatrix root Permutated Cholesky root of the symmetric positive semidefinite matrix. | |
| RectangularCholeskyDecomposition | back to summary |
|---|---|
| public RectangularCholeskyDecomposition(RealMatrix matrix) throws NonPositiveDefiniteMatrixException Decompose a symmetric positive semidefinite matrix. Note this constructor follows the linpack method to detect dependent columns by proceeding with the Cholesky algorithm until a nonpositive diagonal element is encountered.
| |
| RectangularCholeskyDecomposition | back to summary |
|---|---|
| public RectangularCholeskyDecomposition(RealMatrix matrix, double small) throws NonPositiveDefiniteMatrixException Decompose a symmetric positive semidefinite matrix.
| |
| getRank | back to summary |
|---|---|
| public int getRank() Get the rank of the symmetric positive semidefinite matrix. The r is the number of independent rows in the symmetric positive semidefinite matrix, it is also the number of columns of the rectangular matrix of the decomposition.
| |
| getRootMatrix | back to summary |
|---|---|
| public RealMatrix getRootMatrix() Get the root of the covariance matrix.
The root is the rectangular matrix
| |