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 INDArray
invert(INDArray arr, boolean inPlace)
Inverts a matrixstatic INDArray
pinvert(INDArray arr, boolean inPlace)
Calculates pseudo inverse of a matrix using QR decompositionstatic INDArray
pLeftInvert(INDArray arr, boolean inPlace)
Compute the left pseudo inverse.static INDArray
pRightInvert(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 matrixarr
did 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 matrixarr
did not have full row rank.
-
-