public class GolubKahanSVD extends Object implements SVDDecomposition
Constructor and Description |
---|
GolubKahanSVD(Matrix A,
boolean doUV,
boolean normalize,
double epsilon)
Run the Golub-Kahan SVD decomposition on a tall matrix.
|
GolubKahanSVD(Matrix A,
boolean doUV,
boolean normalize,
double epsilon,
int maxIterations)
Runs the Golub-Kahan SVD decomposition on a tall matrix.
|
Modifier and Type | Method and Description |
---|---|
DiagonalMatrix |
D()
Get the D matrix as in SVD decomposition.
|
double[] |
getSingularValues()
Get the normalized, hence positive, singular values.
|
Matrix |
U()
Get the U matrix as in SVD decomposition.
|
Matrix |
Ut()
Get the transpose of U, i.e.,
U().t() . |
Matrix |
V()
Get the V matrix as in SVD decomposition.
|
public GolubKahanSVD(Matrix A, boolean doUV, boolean normalize, double epsilon)
A
- a tall matrixdoUV
- false
if to compute only the singular values but not U and
Vnormalize
- true
if to sort the singular values in descending order and make
them positiveepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0IllegalArgumentException
- if A is not tallpublic GolubKahanSVD(Matrix A, boolean doUV, boolean normalize, double epsilon, int maxIterations)
A
- a tall matrixdoUV
- false
if to compute only the singular values but not U
and Vnormalize
- true
if to sort the singular values in descending order and make
them positiveepsilon
- a precision parameter: when a number |x| ≤ ε, it is
considered 0maxIterations
- the maximum number of iterationsIllegalArgumentException
- if A is not tallpublic double[] getSingularValues()
SVDDecomposition
getSingularValues
in interface SVDDecomposition
public DiagonalMatrix D()
SVDDecomposition
D
in interface SVDDecomposition
public Matrix U()
SVDDecomposition
U
in interface SVDDecomposition
public Matrix Ut()
SVDDecomposition
U().t()
.Ut
in interface SVDDecomposition
U().t()
public Matrix V()
SVDDecomposition
V
in interface SVDDecomposition
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.