Package org.nd4j.linalg.inverse
Class InvertMatrix
- java.lang.Object
-
- org.nd4j.linalg.inverse.InvertMatrix
-
public class InvertMatrix extends Object
-
-
Constructor Summary
Constructors Constructor Description InvertMatrix()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static INDArrayinvert(INDArray arr, boolean inPlace)Inverts a matrixstatic INDArraypinvert(INDArray arr, boolean inPlace)Calculates pseudo inverse of a matrix using QR decompositionstatic INDArraypLeftInvert(INDArray arr, boolean inPlace)Compute the left pseudo inverse.static INDArraypRightInvert(INDArray arr, boolean inPlace)Compute the right pseudo inverse.
-
-
-
Method Detail
-
invert
public static INDArray invert(INDArray arr, boolean inPlace)
Inverts a matrix- Parameters:
arr- the array to invertinPlace- Whether to store the result inarr- Returns:
- the inverted matrix
-
pinvert
public static INDArray pinvert(INDArray arr, boolean inPlace)
Calculates pseudo inverse of a matrix using QR decomposition- Parameters:
arr- the array to invert- Returns:
- the pseudo inverted matrix
-
pLeftInvert
public static INDArray pLeftInvert(INDArray arr, boolean inPlace)
Compute the left pseudo inverse. Input matrix must have full column rank. See also: Moore–Penrose inverse- Parameters:
arr- Input matrixinPlace- Whether to store the result inarr- Returns:
- Left pseudo inverse of
arr - Throws:
IllegalArgumentException- Input matrixarrdid not have full column rank.
-
pRightInvert
public static INDArray pRightInvert(INDArray arr, boolean inPlace)
Compute the right pseudo inverse. Input matrix must have full row rank. See also: Moore–Penrose inverse- Parameters:
arr- Input matrixinPlace- Whether to store the result inarr- Returns:
- Right pseudo inverse of
arr - Throws:
IllegalArgumentException- Input matrixarrdid not have full row rank.
-
-