public class SVD extends Object implements SVDDecomposition
Modifier and Type | Class and Description |
---|---|
static class |
SVD.Method |
Modifier and Type | Field and Description |
---|---|
static SVD.Method |
DEFAULT_METHOD
The default algorithm for computing SVD.
|
Constructor and Description |
---|
SVD(Matrix A,
boolean doUV)
Runs the SVD decomposition on a matrix.
|
SVD(Matrix A,
boolean doUV,
double epsilon)
Runs the SVD decomposition on a matrix.
|
SVD(Matrix A,
boolean doUV,
double epsilon,
SVD.Method method)
Runs the SVD decomposition on a 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 static final SVD.Method DEFAULT_METHOD
public SVD(Matrix A, boolean doUV)
A
- a matrixdoUV
- false
if to compute only the singular values but not U and
Vpublic SVD(Matrix A, boolean doUV, double epsilon)
A
- a matrixdoUV
- false
if to compute only the singular values but not U and
Vepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0public SVD(Matrix A, boolean doUV, double epsilon, SVD.Method method)
A
- a matrixdoUV
- false
if to compute only the singular values but not U and
Vepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0method
- the algorithm for computing the decompositionpublic 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.