SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.operation
Class PseudoInverse

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixMathImpl<T>
      extended by com.numericalmethod.suanshu.matrix.doubles.matrixtype.MatrixStorageImpl<DenseMatrix>
          extended by com.numericalmethod.suanshu.matrix.doubles.matrixtype.dense.DenseMatrix
              extended by 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

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.
 
Method Summary
 
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.MatrixStorageImpl
equals, get, hashCode, set, setMatrixData
 
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
 

Field Detail

precision

public final double precision
the precision used to truncate the negligible singular values

Constructor Detail

PseudoInverse

public PseudoInverse(Matrix A,
                     double epsilon)
Construct the Moore–Penrose pseudoinverse matrix of A.

Parameters:
A - a m x n matrix
epsilon - 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

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.