|
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.diagonalization.Bidiagonalization
public class Bidiagonalization
Given a tall (m x n) matrix A, where m ≥ n,
we find orthogonal matrices U and V such that
U' %*% A %*% V = B
B is an upper bi-diagonal matrix.
That is,
| d1 f1 ... |
| 0 d2 f2 ... |
U' %*% A %*% V = | 0 |
| . d(n-1) f(n-1) |
| . d(n) |
| 0 ... 0 |
| ... |
| 0 ... 0 |
This implementation uses the Householder reflection process to repeatedly zero out the columns and the rows (partially).
For example, the first step is to left multiply A with the Householder matrix U1' so that
matrix U1 %*% A has zeros in the left column (except for the first row).
That is,
| a11 * ... * |
| 0 |
U1' %*% A = | 0 |
| . A' |
| . |
| 0 |
Then, we right multiply A with V1.
(Note that the V's are Hermitian.)
We have
| a11 a12 0 ... 0 |
| 0 |
U1' %*% A %*% V1 = | 0 |
| . A'' |
| . |
| 0 |
At the end,
(U1 %*% ... %*% Un)' %*% A %*% (V1 %*% ... %*% Vn) = B
where B is upper bi-diagonal.
The upper part of B, n x n, is a square, bi-diagonal matrix.
This transformation always succeeds.
| Constructor Summary | |
|---|---|
Bidiagonalization(Matrix A)
Run the Householder bidiagonalization for a tall matrix. |
|
| Method Summary | |
|---|---|
BidiagonalMatrix |
B()
Get a copy of the B matrix. |
Matrix |
U()
Get a copy of U, where
U' = Uk %*% ... %*% U1
where
k = A.nCols(). |
Matrix |
V()
Get a copy of V, where
V' = Vk %*% ... %*% V1
where
k = A.nCols() - 2. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Bidiagonalization(Matrix A)
A - a square matrix
java.lang.IllegalArgumentException - if A is not square| Method Detail |
|---|
public Matrix U()
U, where
U' = Uk %*% ... %*% U1
where
k = A.nCols().
Dimension of U is mxm.
To compute U,
instead of explicitly doing this multiplication, we can improve the performance
by applying Ui's repeatedly on an identity matrix.
We take the transpose afterward.
U matrixpublic Matrix V()
V, where
V' = Vk %*% ... %*% V1
where
k = A.nCols() - 2.
Dimension of V is n x n.
To compute V,
instead of explicitly doing this multiplication, we can improve the performance
by applying Vi's repeatedly on an identity matrix.
We take the transpose afterward.
V matrixpublic BidiagonalMatrix B()
B matrix.
B is the square upper part of U.t().multiply(A).multiply(V).
Dimension of B is n x n.
B
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||