Class PseudoInverse
- java.lang.Object
-
- dev.nm.algebra.linear.matrix.doubles.matrixtype.dense.DenseMatrix
-
- dev.nm.algebra.linear.matrix.doubles.operation.PseudoInverse
-
- All Implemented Interfaces:
Matrix
,MatrixAccess
,MatrixRing
,MatrixTable
,Densifiable
,AbelianGroup<Matrix>
,Monoid<Matrix>
,Ring<Matrix>
,Table
,DeepCopyable
public class PseudoInverse extends DenseMatrix
The Moore-Penrose pseudo-inverse of an m x n matrix A is A+. It is a generalization of the inverse matrix. This implementation uses the Singular Value decomposition to compute the pseudo-inverse. Specifically,
The properties areA = U * D * V' A+ = V * D+ * U'
- A+ has the dimension of n x m.
- A * A+ * A = A
- A+ * A * A+ = A+
- (A * A+)' = A * A+
- (A+ * A)' = A+ * A
- See Also:
SVD
, Wikipedia: Moore-Penrose pseudo-inverse
-
-
Constructor Summary
Constructors Constructor Description PseudoInverse(Matrix A)
Construct the Moore-Penrose pseudo-inverse matrix of A.PseudoInverse(Matrix A, double epsilon)
Construct the Moore-Penrose pseudo-inverse matrix of a matrix.
-
Method Summary
-
Methods inherited from class dev.nm.algebra.linear.matrix.doubles.matrixtype.dense.DenseMatrix
add, deepCopy, equals, get, getColumn, getColumn, getRow, getRow, hashCode, minus, multiply, multiply, nCols, nRows, ONE, opposite, scaled, set, setColumn, setRow, t, toDense, toString, ZERO
-
-
-
-
Constructor Detail
-
PseudoInverse
public PseudoInverse(Matrix A, double epsilon)
Construct the Moore-Penrose pseudo-inverse matrix of a matrix.- Parameters:
A
- an m x n matrixepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0. This threshold truncates negligible singular values less than 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 pseudo-inverse matrix of A.- Parameters:
A
- an m x n matrix
-
-