com.numericalmethod.suanshu.matrix.doubles.operation
Class PseudoInverse
java.lang.Object
com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixMathImpl<T>
com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixStorageImpl<DenseMatrix>
com.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.DenseMatrix
com.numericalmethod.suanshu.matrix.doubles.operation.PseudoInverse
- All Implemented Interfaces:
- DeepCopyable, AbelianGroup<Matrix>, Monoid<Matrix>, Ring<Matrix>, Matrix, MatrixAccessor, MatrixRing, Densifiable, MatrixDimension
public class PseudoInverse
- extends DenseMatrix
The Moore–Penrose pseudoinverse of an m x n matrix A is A+.
It is a generalization of the inverse matrix.
To compute the pseudoinverse of A, we use the Singular Value decomposition.
Specifically,
A = U %*% D %*% V'
A+ = V %*% D+ %*% U'
It satisfies
A+ has the dimension of n x m.
A %*% A+ %*% A = A
A+ %*% A %*% A+ = A+
(A %*% A+)' = A %*% A+
(A+ %*% A)' = A+ %*% A
For an invertible A, its pseudoinverse coincides with its inverse.
- See Also:
SVD,
Wikipedia: Moore–Penrose pseudoinverse
|
Field Summary |
double |
precision
the precision used to truncate the negligible singular values |
|
Constructor Summary |
PseudoInverse(Matrix A)
Construct the Moore–Penrose pseudoinverse matrix of A. |
PseudoInverse(Matrix A,
double epsilon)
Construct the Moore–Penrose pseudoinverse matrix of A. |
| Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.DenseMatrix |
add, deepCopy, getColumn, getColumn, getMatrixData, getRow, getRow, getSample, minus, multiply, multiply, ONE, overwrite, scaled, t, toDense, ZERO |
| Methods inherited from class com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixMathImpl |
add, call, minus, multiply, nCols, nRows, opposite, setColumn, setColumn, setRow, setRow, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
precision
public final double precision
- the precision used to truncate the negligible singular values
PseudoInverse
public PseudoInverse(Matrix A,
double epsilon)
- Construct the Moore–Penrose pseudoinverse matrix of
A.
- Parameters:
A - a m x n matrixepsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0.
The threshold to truncate negligible singular values are the smaller of ε and t = machine_ε * max(m,n) * max(D).- See Also:
- Wikipedia: The general case and the SVD method
PseudoInverse
public PseudoInverse(Matrix A)
- Construct the Moore–Penrose pseudoinverse matrix of
A.
- Parameters:
A - an m x n matrix
Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.