|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.matrix.doubles.factorization.svd.GloubKahanSVD
public class GloubKahanSVD
This class implements the SVD decomposition of a tall matrix using the Gloub-Kahan SVD algorithm.
There are two steps.
If only the singular values are needed, we can save computation by not computing U and V.
| Field Summary | |
|---|---|
double |
epsilon
a precision parameter: when a number |x| ≤ ε, it is considered 0 |
| Constructor Summary | |
|---|---|
GloubKahanSVD(Matrix A,
boolean doUV,
boolean normalize,
double epsilon)
Perform the Gloub-Kahan SVD decomposition. |
|
| Method Summary | |
|---|---|
DiagonalMatrix |
D()
Get a copy of D as in
U' %*% A %*% V = D
U %*% D %*% V' = A
|
double[] |
singularValues()
Get an array of the normalized, hence positive, singular values. |
Matrix |
U()
Get a copy of U as in
U' %*% A %*% V = D
U %*% D %*% V' = A
|
Matrix |
Ut()
Get a copy of U.t() as in
U.t() %*% A %*% V = D
U %*% D %*% V' = A
|
Matrix |
V()
Get a copy of V as in
U' %*% A %*% V = D
U %*% D %*% V' = A
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final double epsilon
| Constructor Detail |
|---|
public GloubKahanSVD(Matrix A,
boolean doUV,
boolean normalize,
double epsilon)
A - a tall matrixdoUV - true if only the singular values are wanted; U and V are not computednormalize - true if to sort the singular values in descending order and make them positiveepsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
java.lang.IllegalArgumentException - if A is not tall| Method Detail |
|---|
public double[] singularValues()
SVDDecompositionD if this class is constructed with normalization off.
singularValues in interface SVDDecompositionpublic DiagonalMatrix D()
SVDDecompositionD as in
U' %*% A %*% V = D
U %*% D %*% V' = A
D in interface SVDDecompositionDpublic Matrix U()
SVDDecompositionU as in
U' %*% A %*% V = D
U %*% D %*% V' = A
U in interface SVDDecompositionUpublic Matrix Ut()
SVDDecompositionU.t() as in
U.t() %*% A %*% V = D
U %*% D %*% V' = A
Ut in interface SVDDecompositionU.t()public Matrix V()
SVDDecompositionV as in
U' %*% A %*% V = D
U %*% D %*% V' = A
V in interface SVDDecompositionV
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||